Skip to content

Commit

Permalink
Added tests to event_source_mapping and alias_ref for namespace refer…
Browse files Browse the repository at this point in the history
…ence check
  • Loading branch information
Michael Tewoldemedhin committed Jul 30, 2024
1 parent 9c894c2 commit c43f4f8
Show file tree
Hide file tree
Showing 28 changed files with 399 additions and 41 deletions.
6 changes: 3 additions & 3 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ack_generate_info:
build_date: "2024-07-19T23:01:33Z"
build_hash: f0a0f42d507c550c2b063a192b3b43e4522bdd9c
build_date: "2024-07-30T00:06:18Z"
build_hash: 49afe38983d285f926b51b6d34e39a4d9aeffb85
go_version: go1.22.5
version: v0.35.0
version: v0.35.0-2-g49afe38
api_directory_checksum: 93229b2f11a89ef43fc0ef07ea1beb425e9aaf17
api_version: v1alpha1
aws_sdk_go_version: v1.44.181
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/lambda.services.k8s.aws_aliases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
functionVersion:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
filterCriteria:
Expand Down Expand Up @@ -193,6 +195,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
functionResponseTypes:
Expand Down Expand Up @@ -255,6 +259,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
type: array
Expand Down
10 changes: 10 additions & 0 deletions config/crd/bases/lambda.services.k8s.aws_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
s3Key:
Expand Down Expand Up @@ -221,6 +223,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
layers:
Expand Down Expand Up @@ -289,6 +293,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
runtime:
Expand Down Expand Up @@ -353,6 +359,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
type: array
Expand All @@ -375,6 +383,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
type: array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
qualifier:
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/lambda.services.k8s.aws_versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
provisionedConcurrencyConfig:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/aws-controllers-k8s/kafka-controller v0.0.0-20230615185632-102279061de1
github.com/aws-controllers-k8s/kms-controller v0.1.2
github.com/aws-controllers-k8s/mq-controller v0.0.22
github.com/aws-controllers-k8s/runtime v0.35.0
github.com/aws-controllers-k8s/runtime v0.35.1-0.20240719172343-a132c887e8d4
github.com/aws-controllers-k8s/s3-controller v0.1.5
github.com/aws/aws-sdk-go v1.49.0
github.com/go-logr/logr v1.4.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ github.com/aws-controllers-k8s/kms-controller v0.1.2 h1:9lb98jspqOpFpmIFHOJ6pRnO
github.com/aws-controllers-k8s/kms-controller v0.1.2/go.mod h1:6CoV0UMFd03EUF9dXgOTTScGdBhJzsWn9W0dw2n0kA4=
github.com/aws-controllers-k8s/mq-controller v0.0.22 h1:XxFSQL9yaaiiuZ6E/fh/+Y9C+3DG2c5oXWG/4ZNwd1w=
github.com/aws-controllers-k8s/mq-controller v0.0.22/go.mod h1:p+YVFjpwlgRC+1cPeCabk1xTB1hTCU+RwYtFzrTnJmE=
github.com/aws-controllers-k8s/runtime v0.35.0 h1:kLRLFOAcaFJRv/aEiWtb0qhlxFpwvmx6shCWNc1Tuas=
github.com/aws-controllers-k8s/runtime v0.35.0/go.mod h1:gI2pWb20UGLP2SnHf1a1VzTd7iVVy+/I9VAzT0Y+Dew=
github.com/aws-controllers-k8s/runtime v0.35.1-0.20240719172343-a132c887e8d4 h1:CW58T4qFJpoF37hCPlV1NHCc6mdxNf6jdvLobVolSY0=
github.com/aws-controllers-k8s/runtime v0.35.1-0.20240719172343-a132c887e8d4/go.mod h1:gI2pWb20UGLP2SnHf1a1VzTd7iVVy+/I9VAzT0Y+Dew=
github.com/aws-controllers-k8s/s3-controller v0.1.5 h1:5zb7jsh0fgbPM8cIvcsuH1dta1dKzaAnlwgvb6u3hOc=
github.com/aws-controllers-k8s/s3-controller v0.1.5/go.mod h1:8Z8JlO5Hc1dZX2YELu94+lnOgKM0FioAHJBsyaWvtx8=
github.com/aws/aws-sdk-go v1.49.0 h1:g9BkW1fo9GqKfwg2+zCD+TW/D36Ux+vtfJ8guF4AYmY=
Expand Down
2 changes: 2 additions & 0 deletions helm/crds/lambda.services.k8s.aws_aliases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
functionVersion:
Expand Down
6 changes: 6 additions & 0 deletions helm/crds/lambda.services.k8s.aws_eventsourcemappings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
filterCriteria:
Expand Down Expand Up @@ -193,6 +195,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
functionResponseTypes:
Expand Down Expand Up @@ -255,6 +259,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
type: array
Expand Down
10 changes: 10 additions & 0 deletions helm/crds/lambda.services.k8s.aws_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
s3Key:
Expand Down Expand Up @@ -221,6 +223,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
layers:
Expand Down Expand Up @@ -289,6 +293,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
runtime:
Expand Down Expand Up @@ -353,6 +359,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
type: array
Expand All @@ -375,6 +383,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
type: array
Expand Down
2 changes: 2 additions & 0 deletions helm/crds/lambda.services.k8s.aws_functionurlconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
qualifier:
Expand Down
2 changes: 2 additions & 0 deletions helm/crds/lambda.services.k8s.aws_versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
type: object
provisionedConcurrencyConfig:
Expand Down
11 changes: 10 additions & 1 deletion helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -355,4 +355,13 @@ rules:
- get
- patch
- update
{{- end }}
{{- end }}

{{/* Convert k/v map to string like: "key1=value1,key2=value2,..." */}}
{{- define "ack-lambda-controller.feature-gates" -}}
{{- $list := list -}}
{{- range $k, $v := .Values.featureGates -}}
{{- $list = append $list (printf "%s=%s" $k ( $v | toString)) -}}
{{- end -}}
{{ join "," $list }}
{{- end -}}
8 changes: 8 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ spec:
{{- range $key, $value := .Values.reconcile.resourceMaxConcurrentSyncs }}
- --reconcile-resource-max-concurrent-syncs
- "$(RECONCILE_RESOURCE_MAX_CONCURRENT_SYNCS_{{ $key | upper }})"
{{- end }}
{{- if .Values.featureGates}}
- --feature-gates
- "$(FEATURE_GATES)"
{{- end }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand Down Expand Up @@ -122,6 +126,10 @@ spec:
{{- range $key, $value := .Values.reconcile.resourceMaxConcurrentSyncs }}
- name: RECONCILE_RESOURCE_MAX_CONCURRENT_SYNCS_{{ $key | upper }}
value: {{ $key }}={{ $value }}
{{- end }}
{{- if .Values.featureGates}}
- name: FEATURE_GATES
value: {{ include "ack-lambda-controller.feature-gates" . }}
{{- end }}
{{- if .Values.aws.credentials.secretName }}
- name: AWS_SHARED_CREDENTIALS_FILE
Expand Down
7 changes: 7 additions & 0 deletions helm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,13 @@
"type": "object"
}
},
"featureGates": {
"description": "Feature gates settings",
"type": "object",
"additionalProperties": {
"type": "boolean"
}
},
"required": [
"image",
"deployment",
Expand Down
7 changes: 7 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,10 @@ leaderElection:
# will attempt to use the namespace of the service account mounted to the Controller
# pod.
namespace: ""

# Configuration for feature gates. These are optional controller features that
# can be individually enabled ("true") or disabled ("false") by adding key/value
# pairs below.
featureGates: {}
# featureGate1: true
# featureGate2: false
8 changes: 5 additions & 3 deletions pkg/resource/alias/references.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c43f4f8

Please sign in to comment.