Skip to content

Commit

Permalink
fix(metrics-operator): remove duplicated CA injection annotations (#3232
Browse files Browse the repository at this point in the history
)

Signed-off-by: odubajDT <[email protected]>
  • Loading branch information
odubajDT authored Mar 11, 2024
1 parent 2c3f0b7 commit c1472be
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/scripts/.helm-tests/default/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8076,7 +8076,6 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.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
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ kind: ServiceAccount
metadata:
name: metrics-operator
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -18,6 +20,8 @@ kind: ConfigMap
metadata:
name: metrics-operator-config
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -46,7 +50,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
cert-manager.io/inject-ca-from: helmtests/keptn-certs
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
test/jj: test
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -402,6 +406,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
cert-manager.io/inject-ca-from: helmtests/keptn-certs
test/jj: test
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -1099,6 +1104,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
cert-manager.io/inject-ca-from: helmtests/keptn-certs
test/jj: test
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -1248,6 +1254,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
cert-manager.io/inject-ca-from: helmtests/keptn-certs
test/jj: test
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -1785,6 +1792,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
cert-manager.io/inject-ca-from: helmtests/keptn-certs
test/jj: test
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -2005,6 +2013,8 @@ kind: ClusterRole
metadata:
name: metrics-operator-role
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -2113,6 +2123,8 @@ kind: ClusterRole
metadata:
name: metrics-operator-server-resources
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2135,6 +2147,8 @@ kind: ClusterRoleBinding
metadata:
name: metrics-operator-rolebinding
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2156,6 +2170,8 @@ kind: ClusterRoleBinding
metadata:
name: system-auth-delegator
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2177,6 +2193,8 @@ kind: Role
metadata:
name: metrics-operator-leader-election-role
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -2222,6 +2240,8 @@ kind: RoleBinding
metadata:
name: metrics-operator-leader-election-rolebinding
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2243,6 +2263,8 @@ kind: RoleBinding
metadata:
name: metrics-operator-rolebinding
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2264,6 +2286,8 @@ kind: Service
metadata:
name: metrics-operator-service
namespace: "helmtests"
annotations:
test/jj: test
labels:
control-plane: metrics-operator
app.kubernetes.io/instance: keptn-test
Expand Down Expand Up @@ -2296,6 +2320,8 @@ kind: Service
metadata:
name: metrics-webhook-service
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2319,6 +2345,8 @@ kind: Deployment
metadata:
name: metrics-operator
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/part-of: keptn
app.kubernetes.io/component: metrics-operator
Expand Down Expand Up @@ -2436,6 +2464,7 @@ kind: ValidatingWebhookConfiguration
metadata:
name: metrics-validating-webhook-configuration
annotations:
test/jj: test
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
keptn.sh/inject-cert: "true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ global:
app.kubernetes.io/version: vmyversion
caInjectionAnnotations:
cert-manager.io/inject-ca-from: helmtests/keptn-certs
commonAnnotations:
test/jj: test
37 changes: 36 additions & 1 deletion .github/scripts/.helm-tests/metrics-only/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ kind: ServiceAccount
metadata:
name: metrics-operator
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -18,6 +20,8 @@ kind: ConfigMap
metadata:
name: metrics-operator-config
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -46,7 +50,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
cert-manager.io/inject-ca-from: helmtests/keptn-certs
cert-manager.io/inject-ca-from: 'helmtests/keptn-certs'
test/jj: test
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -402,6 +406,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
cert-manager.io/inject-ca-from: helmtests/keptn-certs
test/jj: test
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -1099,6 +1104,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
cert-manager.io/inject-ca-from: helmtests/keptn-certs
test/jj: test
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -1248,6 +1254,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
cert-manager.io/inject-ca-from: helmtests/keptn-certs
test/jj: test
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -1785,6 +1792,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
cert-manager.io/inject-ca-from: helmtests/keptn-certs
test/jj: test
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down Expand Up @@ -2005,6 +2013,8 @@ kind: ClusterRole
metadata:
name: metrics-operator-role
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -2113,6 +2123,8 @@ kind: ClusterRole
metadata:
name: metrics-operator-server-resources
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2135,6 +2147,8 @@ kind: ClusterRoleBinding
metadata:
name: metrics-operator-hpa-controller
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2156,6 +2170,8 @@ kind: ClusterRoleBinding
metadata:
name: metrics-operator-rolebinding
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2177,6 +2193,8 @@ kind: ClusterRoleBinding
metadata:
name: system-auth-delegator
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2198,6 +2216,8 @@ kind: Role
metadata:
name: metrics-operator-leader-election-role
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -2243,6 +2263,8 @@ kind: RoleBinding
metadata:
name: metrics-operator-leader-election-rolebinding
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2264,6 +2286,8 @@ kind: RoleBinding
metadata:
name: metrics-operator-rolebinding
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2285,6 +2309,8 @@ kind: Service
metadata:
name: metrics-operator-service
namespace: "helmtests"
annotations:
test/jj: test
labels:
control-plane: metrics-operator
app.kubernetes.io/instance: keptn-test
Expand Down Expand Up @@ -2317,6 +2343,8 @@ kind: Service
metadata:
name: metrics-webhook-service
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2340,6 +2368,8 @@ kind: Deployment
metadata:
name: metrics-operator
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/part-of: keptn
app.kubernetes.io/component: metrics-operator
Expand Down Expand Up @@ -2457,6 +2487,8 @@ kind: APIService
metadata:
name: v1beta1.custom.metrics.k8s.io
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2479,6 +2511,8 @@ kind: APIService
metadata:
name: v1beta2.custom.metrics.k8s.io
namespace: "helmtests"
annotations:
test/jj: test
labels:
app.kubernetes.io/instance: keptn-test
app.kubernetes.io/managed-by: Helm
Expand All @@ -2501,6 +2535,7 @@ kind: ValidatingWebhookConfiguration
metadata:
name: metrics-validating-webhook-configuration
annotations:
test/jj: test
cert-manager.io/inject-ca-from: helmtests/keptn-certs
labels:
keptn.sh/inject-cert: "true"
Expand Down
2 changes: 2 additions & 0 deletions .github/scripts/.helm-tests/metrics-only/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ global:
app.kubernetes.io/version: vmyversion
caInjectionAnnotations:
cert-manager.io/inject-ca-from: helmtests/keptn-certs
commonAnnotations:
test/jj: test
1 change: 0 additions & 1 deletion .github/scripts/.helm-tests/metrics-with-certs/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.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
3 changes: 1 addition & 2 deletions metrics-operator/chart/templates/analysis-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ metadata:
{{- with .Values.global.caInjectionAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/keptn-certs'
{{- include "common.annotations" ( dict "context" . ) }}
{{- include "common.annotations" ( dict "context" . ) }}
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
{{- with .Values.global.caInjectionAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- include "common.annotations" ( dict "context" . ) }}
{{- include "common.annotations" ( dict "context" . ) }}
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
{{- with .Values.global.caInjectionAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- include "common.annotations" ( dict "context" . ) }}
{{- include "common.annotations" ( dict "context" . ) }}
labels:
app.kubernetes.io/part-of: keptn
crdGroup: metrics.keptn.sh
Expand Down
Loading

0 comments on commit c1472be

Please sign in to comment.