Skip to content

Commit c9cbfa6

Browse files
joelanfordci-robot
authored andcommitted
UPSTREAM: <carry>: generate and mount service-ca server cert
Signed-off-by: Joe Lanford <[email protected]>
1 parent 5523ed7 commit c9cbfa6

File tree

5 files changed

+34
-0
lines changed

5 files changed

+34
-0
lines changed

openshift/kustomize/overlays/openshift/olmv1-ns/kustomization.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ resources:
77
- ../../../../../config/base/manager
88

99
patches:
10+
- target:
11+
kind: Service
12+
name: service
13+
path: patches/manager_service.yaml
1014
- target:
1115
kind: ClusterRole
1216
name: manager-role
@@ -15,6 +19,10 @@ patches:
1519
kind: Deployment
1620
name: controller-manager
1721
path: patches/manager_deployment_ca.yaml
22+
- target:
23+
kind: Deployment
24+
name: controller-manager
25+
path: patches/manager_deployment_certs.yaml
1826
- target:
1927
kind: Deployment
2028
name: controller-manager
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
- op: add
2+
path: /spec/template/spec/volumes/-
3+
value: {"name":"operator-controller-certs", "secret":{"optional":false,"secretName":"operator-controller-cert"}}
4+
- op: add
5+
path: /spec/template/spec/containers/0/volumeMounts/-
6+
value: {"name":"operator-controller-certs", "mountPath":"/var/certs"}
7+
- op: add
8+
path: /spec/template/spec/containers/0/args/-
9+
value: "--tls-cert=/var/certs/tls.crt"
10+
- op: add
11+
path: /spec/template/spec/containers/0/args/-
12+
value: "--tls-key=/var/certs/tls.key"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- op: add
2+
path: /metadata/annotations
3+
value:
4+
service.beta.openshift.io/serving-cert-secret-name: operator-controller-cert

openshift/manifests/18-service-openshift-operator-controller-operator-controller-service.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
apiVersion: v1
33
kind: Service
44
metadata:
5+
annotations:
6+
service.beta.openshift.io/serving-cert-secret-name: operator-controller-cert
57
labels:
68
control-plane: operator-controller-controller-manager
79
name: operator-controller-service

openshift/manifests/19-deployment-openshift-operator-controller-operator-controller-controller-manager.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ spec:
4444
- --metrics-bind-address=:8443
4545
- --leader-elect
4646
- --ca-certs-dir=/run/secrets/kubernetes.io/serviceaccount
47+
- --tls-cert=/var/certs/tls.crt
48+
- --tls-key=/var/certs/tls.key
4749
- --v=${LOG_VERBOSITY}
4850
- --global-pull-secret=openshift-config/pull-secret
4951
command:
@@ -76,6 +78,8 @@ spec:
7678
volumeMounts:
7779
- mountPath: /var/cache
7880
name: cache
81+
- mountPath: /var/certs
82+
name: operator-controller-certs
7983
- mountPath: /etc/containers
8084
name: etc-containers
8185
readOnly: true
@@ -103,6 +107,10 @@ spec:
103107
volumes:
104108
- emptyDir: {}
105109
name: cache
110+
- name: operator-controller-certs
111+
secret:
112+
optional: false
113+
secretName: operator-controller-cert
106114
- hostPath:
107115
path: /etc/containers
108116
type: Directory

0 commit comments

Comments
 (0)