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=(
36
36
for f in " ${catalogd_webhook_filelist[@]} " ; do
37
37
yq -i ' .metadata.labels["app.kubernetes.io/name"] = "catalogd"' " ${f} "
38
38
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} "
41
40
yq -i ' .webhooks[0].clientConfig.service.namespace = "olmv1-system"' " ${f} "
42
41
yq -i ' .webhooks[0].clientConfig.service.name = "catalogd-service"' " ${f} "
43
42
yq -i ' .webhooks[0].clientConfig.service.port = 9443' " ${f} "
@@ -65,6 +64,7 @@ for f in "${filelist[@]}"; do
65
64
yq -i ' .metadata.labels.replaceMe = "labels"' " ${f} "
66
65
# Replace with helm template - must be done last or yq will complain about the file format
67
66
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} "
68
68
sed -i.bak ' s/replaceMe: labels/{{- include "olmv1.labels" . | nindent 4 }}/g' " ${f} "
69
69
sed -i.bak ' s/olmv1-system/{{ .Values.namespaces.olmv1.name }}/g' " ${f} "
70
70
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:
7
7
app.kubernetes.io/name : catalogd
8
8
{{- include "olmv1.labels" . | nindent 4 }}
9
9
annotations :
10
- cert-manager.io/inject-ca-from-secret : cert-manager/ olmv1-ca
10
+ {{- include " olmv1.catalogd.webhook.annotations" . | nindent 4 }}
11
11
{{- include "olmv1.annotations" . | nindent 4 }}
12
12
webhooks :
13
13
- admissionReviewVersions :
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ metadata:
7
7
app.kubernetes.io/name : catalogd
8
8
{{- include "olmv1.labels" . | nindent 4 }}
9
9
annotations :
10
- cert-manager.io/inject-ca-from-secret : cert-manager/ olmv1-ca
10
+ {{- include " olmv1.catalogd.webhook.annotations" . | nindent 4 }}
11
11
{{- include "olmv1.annotations" . | nindent 4 }}
12
12
webhooks :
13
13
- admissionReviewVersions :
Original file line number Diff line number Diff line change @@ -43,6 +43,13 @@ Common annoations
43
43
olm.operatorframework.io/feature-set: { { .Values.featureSet -} }{ {- if .Values.components.e2e.enabled -} }-e2e{ {- end -} }
44
44
{ {- end } }
45
45
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
+
46
53
{ {/*
47
54
Insertion of additional rules for RBAC
48
55
*/} }
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ components:
46
46
rules : []
47
47
role :
48
48
rules : []
49
+ webhook :
50
+ annotations :
51
+ cert-manager.io/inject-ca-from-secret : cert-manager/olmv1-ca
49
52
certManager :
50
53
enabled : true
51
54
e2e :
You can’t perform that action at this time.
0 commit comments