File tree Expand file tree Collapse file tree 5 files changed +14
-4
lines changed
Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,7 @@ catalogd_webhook_filelist=(
3636for f in " ${catalogd_webhook_filelist[@]} " ; do
3737 yq -i ' .metadata.labels["app.kubernetes.io/name"] = "catalogd"' " ${f} "
3838 yq -i ' .metadata.name = "catalogd-mutating-webhook-configuration"' " ${f} "
39- # This really only applies to cert-manager configs, but it's an annotation
40- yq -i ' .metadata.annotations["cert-manager.io/inject-ca-from-secret"] = "cert-manager/olmv1-ca"' " ${f} "
39+ yq -i ' .metadata.annotations["catalogd-webhook-annotations"] = "replaceMe"' " ${f} "
4140 yq -i ' .webhooks[0].clientConfig.service.namespace = "olmv1-system"' " ${f} "
4241 yq -i ' .webhooks[0].clientConfig.service.name = "catalogd-service"' " ${f} "
4342 yq -i ' .webhooks[0].clientConfig.service.port = 9443' " ${f} "
@@ -65,6 +64,7 @@ for f in "${filelist[@]}"; do
6564 yq -i ' .metadata.labels.replaceMe = "labels"' " ${f} "
6665 # Replace with helm template - must be done last or yq will complain about the file format
6766 sed -i.bak ' s/replaceMe: annotations/{{- include "olmv1.annotations" . | nindent 4 }}/g' " ${f} "
67+ sed -i.bak ' s/catalogd-webhook-annotations: replaceMe/{{- include "olmv1.catalogd.webhook.annotations" . | nindent 4 }}/g' " ${f} "
6868 sed -i.bak ' s/replaceMe: labels/{{- include "olmv1.labels" . | nindent 4 }}/g' " ${f} "
6969 sed -i.bak ' s/olmv1-system/{{ .Values.namespaces.olmv1.name }}/g' " ${f} "
7070 sed -i.bak ' s/- replaceMe: catalogd-role-rules/{{- include "olmv1.catalogd.role.rules" . | nindent 2 }}/g' " ${f} "
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ metadata:
77 app.kubernetes.io/name : catalogd
88 {{- include "olmv1.labels" . | nindent 4 }}
99 annotations :
10- cert-manager.io/inject-ca-from-secret : cert-manager/ olmv1-ca
10+ {{- include " olmv1.catalogd.webhook.annotations" . | nindent 4 }}
1111 {{- include "olmv1.annotations" . | nindent 4 }}
1212webhooks :
1313 - admissionReviewVersions :
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ metadata:
77 app.kubernetes.io/name : catalogd
88 {{- include "olmv1.labels" . | nindent 4 }}
99 annotations :
10- cert-manager.io/inject-ca-from-secret : cert-manager/ olmv1-ca
10+ {{- include " olmv1.catalogd.webhook.annotations" . | nindent 4 }}
1111 {{- include "olmv1.annotations" . | nindent 4 }}
1212webhooks :
1313 - admissionReviewVersions :
Original file line number Diff line number Diff line change @@ -43,6 +43,13 @@ Common annoations
4343olm.operatorframework.io/feature-set: { { .Values.featureSet -} }{ {- if .Values.components.e2e.enabled -} }-e2e{ {- end -} }
4444{ {- end } }
4545
46+ { {/*
47+ Annotations for Catalogd Webhooks
48+ */} }
49+ { {- define " olmv1.catalogd.webhook.annotations" -} }
50+ cert-manager.io/inject-ca-from-secret: cert-manager/olmv1-ca
51+ { {- end } }
52+
4653{ {/*
4754Insertion of additional rules for RBAC
4855*/} }
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ components:
4646 rules : []
4747 role :
4848 rules : []
49+ webhook :
50+ annotations :
51+ cert-manager.io/inject-ca-from-secret : cert-manager/olmv1-ca
4952 certManager :
5053 enabled : true
5154 e2e :
You can’t perform that action at this time.
0 commit comments