Skip to content

Commit 7bd9c3c

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

36 files changed

+1356
-853
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-09T20:14:55Z"
3+
build_hash: 811e30bb8efe2855f79e6e946039247e23c0d03b
44
go_version: go1.19
5-
version: v0.25.0
6-
api_directory_checksum: a9fcef68210dd72b4b2e37052f2c1a9e971326c6
5+
version: v0.25.0-9-g811e30b-dirty
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/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/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/_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/values.schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@
196196
"type": "string",
197197
"enum": ["cluster", "namespace"]
198198
},
199+
"watchNamespace": {
200+
"type": "string"
201+
},
199202
"resourceTags": {
200203
"type": "array",
201204
"items": {

helm/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ log:
7272
# cluster wide.
7373
installScope: cluster
7474

75+
# Set the value of the "namespace" to be watched by the controller
76+
# This value is only used when the `installScope` is set to "namespace". If left empty, the default value is the release namespace for the chart.
77+
watchNamespace: ""
78+
7579
resourceTags:
7680
# Configures the ACK service controller to always set key/value pairs tags on
7781
# resources that it manages.

0 commit comments

Comments
 (0)