Skip to content

Commit

Permalink
Add trusted CA bundle to vsphere operators
Browse files Browse the repository at this point in the history
Use cluster's CA bundle when talking to vCenter.
  • Loading branch information
jsafrane committed Jun 21, 2021
1 parent 8750b59 commit 0bc0f12
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 9 deletions.
9 changes: 9 additions & 0 deletions assets/csidriveroperators/vsphere/02_configmap.yaml
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
labels:
# This label ensures that the OpenShift Certificate Authority bundle
# is added to the ConfigMap.
config.openshift.io/inject-trusted-cabundle: "true"
name: vsphere-csi-driver-operator-trusted-ca-bundle
namespace: openshift-cluster-csi-drivers
10 changes: 10 additions & 0 deletions assets/csidriveroperators/vsphere/08_deployment.yaml
Expand Up @@ -50,6 +50,9 @@ spec:
requests:
memory: 50Mi
cpu: 10m
volumeMounts:
- name: trusted-ca-bundle
mountPath: /etc/pki/ca-trust/extracted/pem
priorityClassName: system-cluster-critical
serviceAccountName: vmware-vsphere-csi-driver-operator
nodeSelector:
Expand All @@ -60,3 +63,10 @@ spec:
- key: node-role.kubernetes.io/master
operator: Exists
effect: "NoSchedule"
volumes:
- name: trusted-ca-bundle
configMap:
name: vsphere-csi-driver-operator-trusted-ca-bundle
items:
- key: ca-bundle.crt
path: tls-ca-bundle.pem
9 changes: 9 additions & 0 deletions assets/vsphere_problem_detector/06_configmap.yaml
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
labels:
# This label ensures that the OpenShift Certificate Authority bundle
# is added to the ConfigMap.
config.openshift.io/inject-trusted-cabundle: "true"
name: trusted-ca-bundle
namespace: openshift-cluster-storage-operator
Expand Up @@ -39,6 +39,9 @@ spec:
volumeMounts:
- mountPath: /var/run/secrets/serving-cert
name: vsphere-problem-detector-serving-cert
- name: trusted-ca-bundle
mountPath: /etc/pki/ca-trust/extracted/pem
readOnly: true
priorityClassName: system-cluster-critical
serviceAccountName: vsphere-problem-detector-operator
nodeSelector:
Expand All @@ -54,3 +57,9 @@ spec:
secret:
secretName: vsphere-problem-detector-serving-cert
optional: true
- name: trusted-ca-bundle
configMap:
name: trusted-ca-bundle
items:
- key: ca-bundle.crt
path: tls-ca-bundle.pem
95 changes: 86 additions & 9 deletions pkg/generated/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0bc0f12

Please sign in to comment.