Skip to content

Commit 6002067

Browse files
tmshortci-robot
authored andcommitted
UPSTREAM: <carry>: Add support for proxy trustedCAs
Just map the list of trusted ca certs into the deployment Signed-off-by: Todd Short <[email protected]>
1 parent b7e6581 commit 6002067

7 files changed

+45
-8
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ resources:
55
- ../../../../../config/base/crd
66
- ../../../../../config/base/rbac
77
- ../../../../../config/base/manager
8+
- trusted-ca/operator_controller_trusted_ca_configmap.yaml
89

910
patches:
1011
- target:
@@ -15,10 +16,6 @@ patches:
1516
kind: ClusterRole
1617
name: manager-role
1718
path: patches/manager_role.yaml
18-
- target:
19-
kind: Deployment
20-
name: controller-manager
21-
path: patches/manager_deployment_ca.yaml
2219
- target:
2320
kind: Deployment
2421
name: controller-manager

openshift/kustomize/overlays/openshift/olmv1-ns/patches/manager_deployment_ca.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
- op: add
22
path: /spec/template/spec/volumes/-
33
value: {"name":"operator-controller-certs", "secret":{"optional":false,"secretName":"operator-controller-cert"}}
4+
- op: add
5+
path: /spec/template/spec/volumes/-
6+
value: {"name":"trusted-ca-bundle", "configMap":{"optional":false,"name":"trusted-ca-bundle"}}
7+
- op: add
8+
path: /spec/template/spec/volumes/-
9+
value: {"name":"service-ca", "configMap":{"optional":false,"name":"openshift-service-ca.crt"}}
410
- op: add
511
path: /spec/template/spec/containers/0/volumeMounts/-
612
value: {"name":"operator-controller-certs", "mountPath":"/var/certs"}
13+
- op: add
14+
path: /spec/template/spec/containers/0/volumeMounts/-
15+
value: {"name":"trusted-ca-bundle", "mountPath":"/var/trusted-cas/ca-bundle.crt", "subPath":"ca-bundle.crt" }
16+
- op: add
17+
path: /spec/template/spec/containers/0/volumeMounts/-
18+
value: {"name":"service-ca", "mountPath":"/var/trusted-cas/service-ca.crt", "subPath":"service-ca.crt" }
719
- op: add
820
path: /spec/template/spec/containers/0/args/-
921
value: "--tls-cert=/var/certs/tls.crt"
1022
- op: add
1123
path: /spec/template/spec/containers/0/args/-
1224
value: "--tls-key=/var/certs/tls.key"
25+
- op: add
26+
path: /spec/template/spec/containers/0/args/-
27+
value: "--ca-certs-dir=/var/trusted-cas"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
labels:
5+
config.openshift.io/inject-trusted-cabundle: "true"
6+
name: trusted-ca-bundle
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
labels:
6+
config.openshift.io/inject-trusted-cabundle: "true"
7+
name: operator-controller-trusted-ca-bundle
8+
namespace: openshift-operator-controller
Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ spec:
4343
- --health-probe-bind-address=:8081
4444
- --metrics-bind-address=:8443
4545
- --leader-elect
46-
- --ca-certs-dir=/run/secrets/kubernetes.io/serviceaccount
4746
- --tls-cert=/var/certs/tls.crt
4847
- --tls-key=/var/certs/tls.key
48+
- --ca-certs-dir=/var/trusted-cas
4949
- --v=${LOG_VERBOSITY}
5050
- --global-pull-secret=openshift-config/pull-secret
5151
command:
@@ -80,6 +80,12 @@ spec:
8080
name: cache
8181
- mountPath: /var/certs
8282
name: operator-controller-certs
83+
- mountPath: /var/trusted-cas/ca-bundle.crt
84+
name: trusted-ca-bundle
85+
subPath: ca-bundle.crt
86+
- mountPath: /var/trusted-cas/service-ca.crt
87+
name: service-ca
88+
subPath: service-ca.crt
8389
- mountPath: /etc/containers
8490
name: etc-containers
8591
readOnly: true
@@ -111,6 +117,14 @@ spec:
111117
secret:
112118
optional: false
113119
secretName: operator-controller-cert
120+
- configMap:
121+
name: operator-controller-trusted-ca-bundle
122+
optional: false
123+
name: trusted-ca-bundle
124+
- configMap:
125+
name: openshift-service-ca.crt
126+
optional: false
127+
name: service-ca
114128
- hostPath:
115129
path: /etc/containers
116130
type: Directory

0 commit comments

Comments
 (0)