Skip to content

Commit d8996f1

Browse files
author
Jeff Peeler
committed
feat(templates): make use of TLS options in deployments
1 parent 3d2317f commit d8996f1

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

deploy/chart/templates/0000_50_olm_07-olm-operator.deployment.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,21 @@ spec:
3737
- -writeStatusName
3838
- {{ .Values.writeStatusName }}
3939
{{- end }}
40+
{{- if .Values.olm.tlsCertPath }}
41+
- -tls-cert
42+
- {{ .Values.olm.tlsCertPath }}
43+
{{- end }}
44+
{{- if .Values.olm.tlsKeyPath }}
45+
- -tls-key
46+
- {{ .Values.olm.tlsKeyPath }}
47+
{{- end }}
4048
image: {{ .Values.olm.image.ref }}
4149
imagePullPolicy: {{ .Values.olm.image.pullPolicy }}
4250
ports:
4351
- containerPort: {{ .Values.olm.service.internalPort }}
52+
- containerPort: 8081
53+
name: metrics
54+
protocol: TCP
4455
livenessProbe:
4556
httpGet:
4657
path: /healthz
@@ -64,6 +75,14 @@ spec:
6475
resources:
6576
{{ toYaml .Values.olm.resources | indent 12 }}
6677
{{- end}}
78+
volumeMounts:
79+
- mountPath: /var/run/secrets/serving-cert
80+
name: serving-cert
81+
volumes:
82+
- name: serving-cert
83+
secret:
84+
secretName: olm-operator-serving-cert
85+
optional: true
6786
{{- if .Values.olm.nodeSelector }}
6887
nodeSelector:
6988
{{ toYaml .Values.olm.nodeSelector | indent 8 }}

deploy/chart/templates/0000_50_olm_08-catalog-operator.deployment.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,21 @@ spec:
3939
- -writeStatusName
4040
- {{ .Values.writeStatusNameCatalog }}
4141
{{- end }}
42+
{{- if .Values.olm.tlsCertPath }}
43+
- -tls-cert
44+
- {{ .Values.olm.tlsCertPath }}
45+
{{- end }}
46+
{{- if .Values.olm.tlsKeyPath }}
47+
- -tls-key
48+
- {{ .Values.olm.tlsKeyPath }}
49+
{{- end }}
4250
image: {{ .Values.catalog.image.ref }}
4351
imagePullPolicy: {{ .Values.catalog.image.pullPolicy }}
4452
ports:
4553
- containerPort: {{ .Values.catalog.service.internalPort }}
54+
- containerPort: 8081
55+
name: metrics
56+
protocol: TCP
4657
livenessProbe:
4758
httpGet:
4859
path: /healthz
@@ -55,6 +66,14 @@ spec:
5566
resources:
5667
{{ toYaml .Values.catalog.resources | indent 12 }}
5768
{{- end}}
69+
volumeMounts:
70+
- mountPath: /var/run/secrets/serving-cert
71+
name: serving-cert
72+
volumes:
73+
- name: serving-cert
74+
secret:
75+
secretName: catalog-operator-serving-cert
76+
optional: true
5877
{{- if .Values.catalog.nodeSelector }}
5978
nodeSelector:
6079
{{ toYaml .Values.catalog.nodeSelector | indent 8 }}

deploy/ocp/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ olm:
1818
node-role.kubernetes.io/master: ""
1919
tolerations:
2020
- operator: Exists
21+
tlsCertPath: /var/run/secrets/serving-cert/tls.crt
22+
tlsKeyPath: /var/run/secrets/serving-cert/tls.key
2123
catalog:
2224
replicaCount: 1
2325
image:

0 commit comments

Comments
 (0)