Skip to content

Commit b3403ba

Browse files
committed
Adding functionality for EventInvokeConfig
1 parent 8a612d0 commit b3403ba

39 files changed

+800
-256
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2023-03-22T22:14:24Z"
3-
build_hash: fa24753ea8b657d8815ae3eac7accd0958f5f9fb
2+
build_date: "2023-05-30T00:08:25Z"
3+
build_hash: ad4217826c6d8f6f6e0e2f30944228b0d715be97
44
go_version: go1.19
5-
version: v0.25.0
6-
api_directory_checksum: a9fcef68210dd72b4b2e37052f2c1a9e971326c6
5+
version: v0.25.0-17-gad42178
6+
api_directory_checksum: ca34c731b281f29e80984c872002e220ddee5133
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.181
99
generator_config_info:
10-
file_checksum: 095af1082df5c34cdc12296dc085bc6b2b7eadb9
10+
file_checksum: d53a6ae44af0a12af854385908c6e09355b3a126
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/function.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1alpha1/generator.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ resources:
6161
from:
6262
operation: GetFunction
6363
path: Configuration.Layers
64+
FunctionEventInvokeConfig:
65+
from:
66+
operation: PutFunctionEventInvokeConfig
67+
path: .
6468
renames:
6569
operations:
6670
CreateFunction:

apis/v1alpha1/types.go

Lines changed: 15 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1alpha1/zz_generated.deepcopy.go

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/controller/main.go

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/controller/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ spec:
7373
capabilities:
7474
drop:
7575
- ALL
76+
securityContext:
77+
seccompProfile:
78+
type: RuntimeDefault
7679
terminationGracePeriodSeconds: 10
7780
serviceAccountName: ack-lambda-controller
7881
hostIPC: false

config/controller/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ kind: Kustomization
66
images:
77
- name: controller
88
newName: public.ecr.aws/aws-controllers-k8s/lambda-controller
9-
newTag: v1.0.0
9+
newTag: 1.0.0

config/crd/bases/lambda.services.k8s.aws_functions.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,37 @@ spec:
116116
type: string
117117
type: object
118118
type: array
119+
functionEventInvokeConfig:
120+
properties:
121+
destinationConfig:
122+
description: A configuration object that specifies the destination
123+
of an event after Lambda processes it.
124+
properties:
125+
onFailure:
126+
description: A destination for events that failed processing.
127+
properties:
128+
destination:
129+
type: string
130+
type: object
131+
onSuccess:
132+
description: A destination for events that were processed
133+
successfully.
134+
properties:
135+
destination:
136+
type: string
137+
type: object
138+
type: object
139+
functionName:
140+
type: string
141+
maximumEventAgeInSeconds:
142+
format: int64
143+
type: integer
144+
maximumRetryAttempts:
145+
format: int64
146+
type: integer
147+
qualifier:
148+
type: string
149+
type: object
119150
handler:
120151
description: The name of the method within your code that Lambda calls
121152
to run your function. Handler is required if the deployment package

generator.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ resources:
6161
from:
6262
operation: GetFunction
6363
path: Configuration.Layers
64+
FunctionEventInvokeConfig:
65+
from:
66+
operation: PutFunctionEventInvokeConfig
67+
path: .
6468
renames:
6569
operations:
6670
CreateFunction:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/aws-controllers-k8s/ec2-controller v0.0.21
77
github.com/aws-controllers-k8s/kms-controller v0.1.2
88
github.com/aws-controllers-k8s/mq-controller v0.0.22
9-
github.com/aws-controllers-k8s/runtime v0.25.0
9+
github.com/aws-controllers-k8s/runtime v0.26.0
1010
github.com/aws-controllers-k8s/s3-controller v0.1.5
1111
github.com/aws/aws-sdk-go v1.44.181
1212
github.com/go-logr/logr v1.2.3

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ github.com/aws-controllers-k8s/kms-controller v0.1.2 h1:9lb98jspqOpFpmIFHOJ6pRnO
4444
github.com/aws-controllers-k8s/kms-controller v0.1.2/go.mod h1:6CoV0UMFd03EUF9dXgOTTScGdBhJzsWn9W0dw2n0kA4=
4545
github.com/aws-controllers-k8s/mq-controller v0.0.22 h1:XxFSQL9yaaiiuZ6E/fh/+Y9C+3DG2c5oXWG/4ZNwd1w=
4646
github.com/aws-controllers-k8s/mq-controller v0.0.22/go.mod h1:p+YVFjpwlgRC+1cPeCabk1xTB1hTCU+RwYtFzrTnJmE=
47-
github.com/aws-controllers-k8s/runtime v0.25.0 h1:6SYa8qmbw+Yil5/LodF7LmIGxBhpjz4QEIvNjpeRuoc=
48-
github.com/aws-controllers-k8s/runtime v0.25.0/go.mod h1:jizDzKikL09cueIuA9ZxoZ+4pfn5U7oKW5s/ZAqOA6E=
47+
github.com/aws-controllers-k8s/runtime v0.26.0 h1:XKqygFzHSBtM74Ov9IroZbyCVeYei9Eskp4aKbJ2SFw=
48+
github.com/aws-controllers-k8s/runtime v0.26.0/go.mod h1:jizDzKikL09cueIuA9ZxoZ+4pfn5U7oKW5s/ZAqOA6E=
4949
github.com/aws-controllers-k8s/s3-controller v0.1.5 h1:5zb7jsh0fgbPM8cIvcsuH1dta1dKzaAnlwgvb6u3hOc=
5050
github.com/aws-controllers-k8s/s3-controller v0.1.5/go.mod h1:8Z8JlO5Hc1dZX2YELu94+lnOgKM0FioAHJBsyaWvtx8=
5151
github.com/aws/aws-sdk-go v1.44.181 h1:w4OzE8bwIVo62gUTAp/uEFO2HSsUtf1pjXpSs36cluY=

helm/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
22
name: lambda-chart
33
description: A Helm chart for the ACK service controller for AWS Lambda (Lambda)
4-
version: v1.0.0
5-
appVersion: v1.0.0
4+
version: 1.0.0
5+
appVersion: 1.0.0
66
home: https://github.com/aws-controllers-k8s/lambda-controller
77
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
88
sources:

helm/crds/lambda.services.k8s.aws_functions.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,37 @@ spec:
116116
type: string
117117
type: object
118118
type: array
119+
functionEventInvokeConfig:
120+
properties:
121+
destinationConfig:
122+
description: A configuration object that specifies the destination
123+
of an event after Lambda processes it.
124+
properties:
125+
onFailure:
126+
description: A destination for events that failed processing.
127+
properties:
128+
destination:
129+
type: string
130+
type: object
131+
onSuccess:
132+
description: A destination for events that were processed
133+
successfully.
134+
properties:
135+
destination:
136+
type: string
137+
type: object
138+
type: object
139+
functionName:
140+
type: string
141+
maximumEventAgeInSeconds:
142+
format: int64
143+
type: integer
144+
maximumRetryAttempts:
145+
format: int64
146+
type: integer
147+
qualifier:
148+
type: string
149+
type: object
119150
handler:
120151
description: The name of the method within your code that Lambda calls
121152
to run your function. Handler is required if the deployment package

helm/crds/services.k8s.aws_adoptedresources.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ spec:
145145
blockOwnerDeletion:
146146
description: If true, AND if the owner has the "foregroundDeletion"
147147
finalizer, then the owner cannot be deleted from the
148-
key-value store until this reference is removed. Defaults
148+
key-value store until this reference is removed. See
149+
https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion
150+
for how the garbage collector interacts with this
151+
field and enforces the foreground deletion. Defaults
149152
to false. To set this field, a user needs "delete"
150153
permission of the owner, otherwise 422 (Unprocessable
151154
Entity) will be returned.

helm/templates/NOTES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{ .Chart.Name }} has been installed.
2-
This chart deploys "public.ecr.aws/aws-controllers-k8s/lambda-controller:v1.0.0".
2+
This chart deploys "public.ecr.aws/aws-controllers-k8s/lambda-controller:1.0.0".
33

44
Check its status by running:
55
kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}"

helm/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ If release name contains chart name it will be used as a full name.
3333

3434
{{- define "watch-namespace" -}}
3535
{{- if eq .Values.installScope "namespace" -}}
36-
{{- .Release.Namespace -}}
36+
{{ .Values.watchNamespace | default .Release.Namespace }}
3737
{{- end -}}
3838
{{- end -}}
3939

helm/templates/deployment.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ spec:
1818
app.kubernetes.io/instance: {{ .Release.Name }}
1919
template:
2020
metadata:
21+
{{- if .Values.deployment.annotations }}
2122
annotations:
2223
{{- range $key, $value := .Values.deployment.annotations }}
2324
{{ $key }}: {{ $value | quote }}
2425
{{- end }}
26+
{{- end }}
2527
labels:
2628
app.kubernetes.io/name: {{ include "app.name" . }}
2729
app.kubernetes.io/instance: {{ .Release.Name }}
@@ -104,18 +106,29 @@ spec:
104106
value: {{ include "aws.credentials.path" . }}
105107
- name: AWS_PROFILE
106108
value: {{ .Values.aws.credentials.profile }}
109+
{{- end }}
110+
{{- if .Values.deployment.extraEnvVars -}}
111+
{{ toYaml .Values.deployment.extraEnvVars | nindent 8 }}
112+
{{- end }}
107113
volumeMounts:
114+
{{- if .Values.aws.credentials.secretName }}
108115
- name: {{ .Values.aws.credentials.secretName }}
109116
mountPath: {{ include "aws.credentials.secret_mount_path" . }}
110117
readOnly: true
111118
{{- end }}
119+
{{- if .Values.deployment.extraVolumeMounts -}}
120+
{{ toYaml .Values.deployment.extraVolumeMounts | nindent 12 }}
121+
{{- end }}
112122
securityContext:
113123
allowPrivilegeEscalation: false
114124
privileged: false
115125
runAsNonRoot: true
116126
capabilities:
117127
drop:
118128
- ALL
129+
securityContext:
130+
seccompProfile:
131+
type: RuntimeDefault
119132
terminationGracePeriodSeconds: 10
120133
nodeSelector: {{ toYaml .Values.deployment.nodeSelector | nindent 8 }}
121134
{{ if .Values.deployment.tolerations -}}
@@ -130,9 +143,12 @@ spec:
130143
hostIPC: false
131144
hostNetwork: false
132145
hostPID: false
133-
{{ if .Values.aws.credentials.secretName -}}
134146
volumes:
147+
{{- if .Values.aws.credentials.secretName -}}
135148
- name: {{ .Values.aws.credentials.secretName }}
136149
secret:
137150
secretName: {{ .Values.aws.credentials.secretName }}
138151
{{ end -}}
152+
{{- if .Values.deployment.extraVolumes }}
153+
{{ toYaml .Values.deployment.extraVolumes | indent 8}}
154+
{{- end }}

0 commit comments

Comments
 (0)