Skip to content

Commit 908ecef

Browse files
author
Nivedithaa Mahendran
committed
[minor] Ensure DRO is exposed through a route
1 parent 8230753 commit 908ecef

File tree

6 files changed

+56
-173
lines changed

6 files changed

+56
-173
lines changed

cluster-applications/030-ibm-dro/templates/08-postsync-update-sm_Job.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ spec:
190190
mountPath: /etc/mas/creds/aws
191191
- name: ibm-data-reporter-operator-api-token
192192
mountPath: /etc/mas/creds/ibm-data-reporter-operator-api-token
193-
- name: dro-client-tls
194-
mountPath: /etc/mas/creds/dro-client-tls
193+
- name: dro-tls-secret
194+
mountPath: /etc/mas/creds/dro-tls-secret
195195
command:
196196
- /bin/sh
197197
- -c
@@ -260,17 +260,17 @@ spec:
260260
261261
if [[ -n "${DRO_PUBLIC_DOMAIN}" ]]; then
262262
wait_for_resource "certificate" "dro-client-certificate" "${DRO_NAMESPACE}"
263-
export DRO_CLIENT_TLS_CA_CRT=$(cat /etc/mas/creds/dro-client-tls/ca.crt | base64 -w0)
263+
export DRO_CLIENT_TLS_CA_CRT=$(cat /etc/mas/creds/dro-tls-secret/ca.crt | base64 -w0)
264264
if [[ -z "${DRO_CLIENT_TLS_CA_CRT}" ]]; then
265265
echo "Failed to fetch ca.crt"
266266
exit 1
267267
fi
268-
export DRO_CLIENT_TLS_TLS_CRT=$(cat /etc/mas/creds/dro-client-tls/tls.crt | base64 -w0)
268+
export DRO_CLIENT_TLS_TLS_CRT=$(cat /etc/mas/creds/dro-tls-secret/tls.crt | base64 -w0)
269269
if [[ -z "${DRO_CLIENT_TLS_TLS_CRT}" ]]; then
270270
echo "Failed to fetch tls.crt"
271271
exit 1
272272
fi
273-
export DRO_CLIENT_TLS_TLS_KEY=$(cat /etc/mas/creds/dro-client-tls/tls.key | base64 -w0)
273+
export DRO_CLIENT_TLS_TLS_KEY=$(cat /etc/mas/creds/dro-tls-secret/tls.key | base64 -w0)
274274
if [[ -z "${DRO_CLIENT_TLS_TLS_KEY}" ]]; then
275275
echo "Failed to fetch tls.key"
276276
exit 1
@@ -307,9 +307,9 @@ spec:
307307
secretName: ibm-data-reporter-operator-api-token
308308
defaultMode: 420
309309
optional: false
310-
- name: dro-client-tls
310+
- name: dro-tls-secret
311311
secret:
312-
secretName: dro-client-tls
312+
secretName: dro-tls-secret
313313
defaultMode: 420
314314
optional: false
315315
backoffLimit: 4

cluster-applications/030-ibm-dro/templates/12-0-dro-cluster-issuer-staging.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and (eq .Values.dns_provider "cis") (not .Values.mas_manual_cert_mgmt) }}
1+
{{- if (eq .Values.dns_provider "cis") }}
22

33
{{ $cis_apiservice_group_name := "acme.cis.ibm.com" }}
44
{{ $cis_stg_issuer_name := printf "%s-cis-le-stg" .Values.cluster_id }}
@@ -10,6 +10,7 @@ metadata:
1010
annotations:
1111
argocd.argoproj.io/sync-wave: "138"
1212
name: "{{ $cis_stg_issuer_name }}"
13+
namespace: "{{ .Values.dro_namespace }}"
1314
{{- if .Values.custom_labels }}
1415
labels:
1516
{{ .Values.custom_labels | toYaml | indent 4 }}
Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
1-
{{- if and (eq .Values.dns_provider "cis") (not .Values.mas_manual_cert_mgmt) }}
1+
{{- if (eq .Values.dns_provider "cis") }}
22

33
{{ $cis_apiservice_group_name := "acme.cis.ibm.com" }}
44
{{ $cis_prod_issuer_name := printf "%s-cis-le-prod" .Values.cluster_id }}
55
---
6-
# apiVersion: cert-manager.io/v1
7-
# kind: ClusterIssuer
8-
# metadata:
9-
# annotations:
10-
# argocd.argoproj.io/sync-wave: "138"
11-
# name: "{{ $cis_prod_issuer_name }}"
12-
# {{- if .Values.custom_labels }}
13-
# labels:
14-
# {{ .Values.custom_labels | toYaml | indent 4 }}
15-
# {{- end }}
16-
# spec:
17-
# acme:
18-
# preferredChain: ''
19-
# privateKeySecretRef:
20-
# name: cis-letsencrypt-production-account-key
21-
# server: 'https://acme-v02.api.letsencrypt.org/directory'
22-
# solvers:
23-
# - dns01:
24-
# webhook:
25-
# config:
26-
# apiKeySecretRef:
27-
# key: key
28-
# name: cis-api-key
29-
# crn: >-
30-
# {{ .Values.cis_crn }}
31-
# groupName: {{ $cis_apiservice_group_name }}
32-
# solverName: cis
6+
apiVersion: cert-manager.io/v1
7+
kind: ClusterIssuer
8+
metadata:
9+
annotations:
10+
argocd.argoproj.io/sync-wave: "138"
11+
name: "{{ $cis_prod_issuer_name }}"
12+
namespace: "{{ .Values.dro_namespace }}"
13+
{{- if .Values.custom_labels }}
14+
labels:
15+
{{ .Values.custom_labels | toYaml | indent 4 }}
16+
{{- end }}
17+
spec:
18+
acme:
19+
preferredChain: ''
20+
privateKeySecretRef:
21+
name: cis-letsencrypt-production-account-key
22+
server: 'https://acme-v02.api.letsencrypt.org/directory'
23+
solvers:
24+
- dns01:
25+
webhook:
26+
config:
27+
apiKeySecretRef:
28+
key: key
29+
name: cis-api-key
30+
crn: >-
31+
{{ .Values.cis_crn }}
32+
groupName: {{ $cis_apiservice_group_name }}
33+
solverName: cis
3334

3435
{{- end }}

cluster-applications/030-ibm-dro/templates/13-0-dro-selfsigncertificate.yaml

Lines changed: 0 additions & 118 deletions
This file was deleted.
Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
{{- if and (eq .Values.dns_provider "cis") (not .Values.mas_manual_cert_mgmt) }}
1+
{{- if (eq .Values.dns_provider "cis") }}
22
{{- if .Values.dro_public_domain }}
33
---
4-
# apiVersion: cert-manager.io/v1
5-
# kind: Certificate
6-
# metadata:
7-
# name: dro-tls-cert
8-
# namespace: ibm-software-central
9-
# spec:
10-
# secretName: dro-tls-secret # The Secret that will be created
11-
# issuerRef:
12-
# name: letsencrypt-staging # Name of the ClusterIssuer created in Step 1
13-
# kind: ClusterIssuer
14-
# commonName: dro-{{ .Values.cluster_id }}
15-
# privateKey:
16-
# rotationPolicy: Always
4+
apiVersion: cert-manager.io/v1
5+
kind: Certificate
6+
metadata:
7+
annotations:
8+
argocd.argoproj.io/sync-wave: "139"
9+
name: dro-tls-cert
10+
namespace: "{{ .Values.dro_namespace }}"
11+
spec:
12+
secretName: dro-tls-secret
13+
issuerRef:
14+
name: letsencrypt-staging
15+
kind: ClusterIssuer
16+
commonName: dro-{{ .Values.cluster_id }}
17+
privateKey:
18+
rotationPolicy: Always
1719
{{- end }}
1820
{{- end }}

cluster-applications/031-ibm-dro-public/templates/01-dro-public-route.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
{{- if and (eq .Values.dns_provider "cis") (not .Values.mas_manual_cert_mgmt) }}
1+
{{- if (eq .Values.dns_provider "cis") }}
22
{{- if .Values.dro_public_domain }}
3-
# {{- $existingSecret := lookup "v1" "Secret" "ibm-software-central" "dro-client-tls" }}
43
---
54
kind: Route
65
apiVersion: route.openshift.io/v1
76
metadata:
87
name: ibm-data-reporter-public-route
9-
namespace: ibm-software-central
8+
namespace: "{{ .Values.dro_namespace }}"
109
labels:
1110
type: external
12-
route.openshift.io/destination-ca-certificate-secret: dro-server-tls
1311

1412
spec:
1513
host: "dro.{{ .Values.cluster_id }}.{{ .Values.dro_public_domain }}"
16-
# host: "dro.apps.noble6.cp.fyre.ibm.com"
1714
to:
1815
kind: Service
1916
name: ibm-data-reporter-operator-controller-manager-metrics-service

0 commit comments

Comments
 (0)