Skip to content

Commit e526bfa

Browse files
everettravenci-robot
authored and
ci-robot
committed
UPSTREAM: <carry>: add openshift kustomize overlay
to enable TLS communication with catalogd. Configure the CA certs using the configmap injection method via service-ca-operator Signed-off-by: everettraven <[email protected]>
1 parent 8dc7c77 commit e526bfa

7 files changed

+54
-1
lines changed

openshift/generate-manifests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ mkdir -p "$TMP_MANIFEST_DIR"
4848

4949
# Run kustomize, which emits a single yaml file
5050
TMP_KUSTOMIZE_OUTPUT="${TMP_MANIFEST_DIR}/temp.yaml"
51-
$KUSTOMIZE build "${TMP_CONFIG}/base" -o "$TMP_KUSTOMIZE_OUTPUT"
51+
$KUSTOMIZE build "${REPO_ROOT}"/openshift/kustomize/overlays/openshift -o "$TMP_KUSTOMIZE_OUTPUT"
5252

5353
for container_name in "${!IMAGE_MAPPINGS[@]}"; do
5454
placeholder="${IMAGE_MAPPINGS[$container_name]}"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Adds namespace to all resources.
2+
namespace: openshift-operator-controller
3+
4+
namePrefix: operator-controller-
5+
6+
resources:
7+
- resources/ca_configmap.yaml
8+
- ../../../../config/base/crd
9+
- ../../../../config/base/rbac
10+
- ../../../../config/base/manager
11+
12+
patches:
13+
- target:
14+
kind: Deployment
15+
name: controller-manager
16+
path: patches/manager_deployment_ca.yaml
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- op: add
2+
path: /spec/template/spec/volumes/-
3+
value: {"name":"olmv1-certificate", "configMap":{"name":"operator-controller-openshift-ca", "optional": false, "items": [{"key": "service-ca.crt", "path": "olm-ca.crt"}]}}
4+
- op: add
5+
path: /spec/template/spec/containers/0/volumeMounts/-
6+
value: {"name":"olmv1-certificate", "readOnly": true, "mountPath":"/var/certs/olm-ca.crt", "subPath":"olm-ca.crt"}
7+
- op: add
8+
path: /spec/template/spec/containers/0/args/-
9+
value: "--ca-certs-dir=/var/certs"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: openshift-ca
5+
annotations:
6+
service.beta.openshift.io/inject-cabundle: "true"
7+
data: {}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
apiVersion: v1
3+
data: {}
4+
kind: ConfigMap
5+
metadata:
6+
annotations:
7+
service.beta.openshift.io/inject-cabundle: "true"
8+
name: operator-controller-openshift-ca
9+
namespace: openshift-operator-controller
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ spec:
4343
- --health-probe-bind-address=:8081
4444
- --metrics-bind-address=127.0.0.1:8080
4545
- --leader-elect
46+
- --ca-certs-dir=/var/certs
4647
command:
4748
- /manager
4849
image: ${OPERATOR_CONTROLLER_IMAGE}
@@ -73,6 +74,10 @@ spec:
7374
volumeMounts:
7475
- mountPath: /var/cache
7576
name: cache
77+
- mountPath: /var/certs/olm-ca.crt
78+
name: olmv1-certificate
79+
readOnly: true
80+
subPath: olm-ca.crt
7681
- args:
7782
- --secure-listen-address=0.0.0.0:8443
7883
- --http2-disable
@@ -103,4 +108,11 @@ spec:
103108
volumes:
104109
- emptyDir: {}
105110
name: cache
111+
- configMap:
112+
items:
113+
- key: service-ca.crt
114+
path: olm-ca.crt
115+
name: operator-controller-openshift-ca
116+
optional: false
117+
name: olmv1-certificate
106118
priorityClassName: system-cluster-critical

0 commit comments

Comments
 (0)