Skip to content

Commit

Permalink
feat: introduce configurable support of cert-manager.io CA injection (#…
Browse files Browse the repository at this point in the history
…2811)

Signed-off-by: Geoffrey Israel <[email protected]>
Signed-off-by: sudipto baral <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Co-authored-by: Geoffrey Israel <[email protected]>
Co-authored-by: Sudipto Baral <[email protected]>
Co-authored-by: Giovanni Liva <[email protected]>
  • Loading branch information
4 people authored Jan 18, 2024
1 parent 6e992d7 commit d6d83c7
Show file tree
Hide file tree
Showing 55 changed files with 294 additions and 144 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/.helm-tests/certificates-only/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
certManager:
enabled: true
image:
tag: v0.0.0
lifecycleOperator:
Expand All @@ -8,6 +7,7 @@ metricsOperator:
enabled: false

global:
certManagerEnabled: true
imageRegistry: "testreg"
imagePullSecrets: []
commonAnnotations:
Expand Down
39 changes: 22 additions & 17 deletions .github/scripts/.helm-tests/default/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ metadata:
name: keptnapps.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -585,7 +585,7 @@ metadata:
name: keptnappcreationrequests.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -684,7 +684,7 @@ metadata:
name: keptnappversions.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -1820,7 +1820,7 @@ metadata:
name: keptnconfigs.options.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -1890,7 +1890,7 @@ metadata:
name: keptnevaluations.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -2419,7 +2419,7 @@ metadata:
name: keptnevaluationdefinitions.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -2674,7 +2674,7 @@ metadata:
name: keptntasks.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -3241,7 +3241,7 @@ metadata:
name: keptntaskdefinitions.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -6580,7 +6580,7 @@ metadata:
name: keptnworkloads.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -6977,7 +6977,7 @@ metadata:
name: keptnworkloadversions.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -7604,6 +7604,7 @@ metadata:
name: analyses.metrics.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: helmtests/keptn-certs
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
labels:
app.kubernetes.io/part-of: keptn
Expand Down Expand Up @@ -7949,7 +7950,7 @@ metadata:
name: analysisdefinitions.metrics.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -8636,7 +8637,7 @@ metadata:
name: analysisvaluetemplates.metrics.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -8775,7 +8776,7 @@ metadata:
name: keptnmetrics.metrics.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -9292,7 +9293,7 @@ metadata:
name: keptnmetricsproviders.metrics.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -10969,6 +10970,8 @@ spec:
value: "false"
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
- name: CERT_MANAGER_ENABLED
value: "true"
image: ghcr.io/keptn/lifecycle-operator:v0.0.0
imagePullPolicy: Always
name: lifecycle-operator
Expand Down Expand Up @@ -11154,6 +11157,8 @@ spec:
value: "0"
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
- name: CERT_MANAGER_ENABLED
value: "true"
image: ghcr.io/keptn/metrics-operator:v0.0.0
imagePullPolicy: Always
name: metrics-operator
Expand Down Expand Up @@ -11259,7 +11264,7 @@ kind: MutatingWebhookConfiguration
metadata:
name: lifecycle-mutating-webhook-configuration
annotations:
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
keptn.sh/inject-cert: "true"
app.kubernetes.io/part-of: "keptn"
Expand Down Expand Up @@ -11312,7 +11317,7 @@ kind: ValidatingWebhookConfiguration
metadata:
name: lifecycle-validating-webhook-configuration
annotations:
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
keptn.sh/inject-cert: "true"
app.kubernetes.io/instance: keptn-test
Expand Down Expand Up @@ -11348,7 +11353,7 @@ kind: ValidatingWebhookConfiguration
metadata:
name: metrics-validating-webhook-configuration
annotations:
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
keptn.sh/inject-cert: "true"
app.kubernetes.io/instance: keptn-test
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/.helm-tests/default/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
certManager:
enabled: true
image:
tag: v0.0.0
lifecycleOperator:
Expand All @@ -18,3 +17,5 @@ metricsOperator:
global:
commonLabels:
app.kubernetes.io/version: vmyversion
caInjectionAnnotations:
cert-manager.io/inject-ca-from: helmtests/keptn-certs
26 changes: 14 additions & 12 deletions .github/scripts/.helm-tests/lifecycle-only/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ metadata:
name: keptnapps.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -531,7 +531,7 @@ metadata:
name: keptnappcreationrequests.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -630,7 +630,7 @@ metadata:
name: keptnappversions.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -1766,7 +1766,7 @@ metadata:
name: keptnconfigs.options.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -1836,7 +1836,7 @@ metadata:
name: keptnevaluations.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -2365,7 +2365,7 @@ metadata:
name: keptnevaluationdefinitions.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -2620,7 +2620,7 @@ metadata:
name: keptntasks.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -3187,7 +3187,7 @@ metadata:
name: keptntaskdefinitions.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -6526,7 +6526,7 @@ metadata:
name: keptnworkloads.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -6923,7 +6923,7 @@ metadata:
name: keptnworkloadversions.lifecycle.keptn.sh
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
app.kubernetes.io/part-of: keptn
crdGroup: lifecycle.keptn.sh
Expand Down Expand Up @@ -8450,6 +8450,8 @@ spec:
value: "false"
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
- name: CERT_MANAGER_ENABLED
value: "false"
image: testreg/myrep:v0.0.1
imagePullPolicy: Always
name: lifecycle-operator
Expand Down Expand Up @@ -8581,7 +8583,7 @@ kind: MutatingWebhookConfiguration
metadata:
name: lifecycle-mutating-webhook-configuration
annotations:
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
keptn.sh/inject-cert: "true"
app.kubernetes.io/part-of: "keptn"
Expand Down Expand Up @@ -8634,7 +8636,7 @@ kind: ValidatingWebhookConfiguration
metadata:
name: lifecycle-validating-webhook-configuration
annotations:
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
keptn.sh/inject-cert: "true"
app.kubernetes.io/instance: keptn-test
Expand Down
5 changes: 3 additions & 2 deletions .github/scripts/.helm-tests/lifecycle-only/values.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
global:
certManagerEnabled: false
imageRegistry: "testreg"
commonLabels:
app.kubernetes.io/version: vmyversion
caInjectionAnnotations:
cert-manager.io/inject-ca-from: helmtests/keptn-certs

certManager:
enabled: false
lifecycleOperator:
enabled: true
lifecycleOperator:
Expand Down
Loading

0 comments on commit d6d83c7

Please sign in to comment.