Skip to content

Commit 1a9f810

Browse files
tmshortopenshift-merge-bot[bot]
authored andcommitted
UPSTREAM: <carry>: Handle service-ca cert availability/rotation
There is problem when the service-ca certificate is not available at pod start. This is an issue because the SystemCertPool is created from SSL_CERT_DIR, which may include the empty service-ca. The SystemCertPool is never regenerated during the lifetime of the program execution, so it will never get updated when the service-ca is filled. Thus, we need to use --pull-cas-dir to reference the CAs that we want to use. This will also allow OLMv1 to reload the service-ca when it is reloaded (after 2 years, mind you). Removing the SSL_CERT_DIR setting, and adding the --pull-cas-dir flag ought to be equivalent to what we have now (i.e. SSL_CERT_DIR and no --pull-cas-dir), except that rotation will be handled better. Signed-off-by: Todd Short <[email protected]>
1 parent 6f91d84 commit 1a9f810

File tree

6 files changed

+9
-15
lines changed

6 files changed

+9
-15
lines changed

openshift/catalogd/kustomize/overlays/openshift/olmv1-ns/patches/manager_deployment_certs.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
path: /spec/template/spec/containers/0/args/-
1818
value: "--tls-key=/var/certs/tls.key"
1919
- op: add
20+
path: /spec/template/spec/containers/0/args/-
21+
value: "--pull-cas-dir=/var/ca-certs"
22+
- op: remove
2023
path: /spec/template/spec/containers/0/env
21-
value: [{"name":"SSL_CERT_DIR", "value":"/var/ca-certs"}]
2224
- op: add
2325
path: /spec/template/spec/securityContext/seLinuxOptions
2426
value: {"type":"spc_t"}

openshift/catalogd/manifests-experimental/18-deployment-openshift-catalogd-catalogd-controller-manager.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,12 @@ spec:
4646
- --external-address=catalogd-service.openshift-catalogd.svc
4747
- --tls-cert=/var/certs/tls.crt
4848
- --tls-key=/var/certs/tls.key
49+
- --pull-cas-dir=/var/ca-certs
4950
- --v=${LOG_VERBOSITY}
5051
- --feature-gates=APIV1MetasHandler=true
5152
- --global-pull-secret=openshift-config/pull-secret
5253
command:
5354
- ./catalogd
54-
env:
55-
- name: SSL_CERT_DIR
56-
value: /var/ca-certs
5755
image: ${CATALOGD_IMAGE}
5856
imagePullPolicy: IfNotPresent
5957
livenessProbe:

openshift/catalogd/manifests/18-deployment-openshift-catalogd-catalogd-controller-manager.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@ spec:
4646
- --external-address=catalogd-service.openshift-catalogd.svc
4747
- --tls-cert=/var/certs/tls.crt
4848
- --tls-key=/var/certs/tls.key
49+
- --pull-cas-dir=/var/ca-certs
4950
- --v=${LOG_VERBOSITY}
5051
- --global-pull-secret=openshift-config/pull-secret
5152
command:
5253
- ./catalogd
53-
env:
54-
- name: SSL_CERT_DIR
55-
value: /var/ca-certs
5654
image: ${CATALOGD_IMAGE}
5755
imagePullPolicy: IfNotPresent
5856
livenessProbe:

openshift/operator-controller/kustomize/overlays/openshift/olmv1-ns/patches/manager_deployment_certs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
path: /spec/template/spec/containers/0/args/-
2121
value: "--catalogd-cas-dir=/var/ca-certs"
2222
- op: add
23-
path: /spec/template/spec/containers/0/env
24-
value: [{"name":"SSL_CERT_DIR", "value":"/var/ca-certs"}]
23+
path: /spec/template/spec/containers/0/args/-
24+
value: "--pull-cas-dir=/var/ca-certs"
2525
- op: add
2626
path: /spec/template/spec/securityContext/seLinuxOptions
2727
value: {"type":"spc_t"}

openshift/operator-controller/manifests-experimental/20-deployment-openshift-operator-controller-operator-controller-controller-manager.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,14 @@ spec:
4646
- --tls-cert=/var/certs/tls.crt
4747
- --tls-key=/var/certs/tls.key
4848
- --catalogd-cas-dir=/var/ca-certs
49+
- --pull-cas-dir=/var/ca-certs
4950
- --v=${LOG_VERBOSITY}
5051
- --feature-gates=PreflightPermissions=true
5152
- --feature-gates=SingleOwnNamespaceInstallSupport=true
5253
- --feature-gates=WebhookProviderOpenshiftServiceCA=true
5354
- --global-pull-secret=openshift-config/pull-secret
5455
command:
5556
- /operator-controller
56-
env:
57-
- name: SSL_CERT_DIR
58-
value: /var/ca-certs
5957
image: ${OPERATOR_CONTROLLER_IMAGE}
6058
imagePullPolicy: IfNotPresent
6159
livenessProbe:

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@ spec:
4646
- --tls-cert=/var/certs/tls.crt
4747
- --tls-key=/var/certs/tls.key
4848
- --catalogd-cas-dir=/var/ca-certs
49+
- --pull-cas-dir=/var/ca-certs
4950
- --v=${LOG_VERBOSITY}
5051
- --global-pull-secret=openshift-config/pull-secret
5152
command:
5253
- /operator-controller
53-
env:
54-
- name: SSL_CERT_DIR
55-
value: /var/ca-certs
5654
image: ${OPERATOR_CONTROLLER_IMAGE}
5755
imagePullPolicy: IfNotPresent
5856
livenessProbe:

0 commit comments

Comments
 (0)