Skip to content

Commit 9177668

Browse files
committed
Revert "add config for enabling tekton results dbssl"
This reverts commit 5e38cd4.
1 parent 41ee6fe commit 9177668

File tree

8 files changed

+5
-94
lines changed

8 files changed

+5
-94
lines changed

developer/openshift/apps/pipeline-service.sh

-43
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ configure_argocd_apps(){
3030
setup_tekton_results() {
3131
echo -n "- Tekton Results: "
3232
get_tekton_results_credentials
33-
generate_tekton_results_db_ssl_cert
3433
patch_tekton_results_manifests
3534
echo "OK"
3635
}
@@ -57,38 +56,6 @@ EOF
5756
TEKTON_RESULTS_S3_PASSWORD="$(yq ".s3_password" "$tekton_results_credentials")"
5857
}
5958

60-
generate_tekton_results_db_ssl_cert(){
61-
TEKTON_RESULTS_DB_SSL="$WORK_DIR/certificates/tekton-results"
62-
mkdir -p "$TEKTON_RESULTS_DB_SSL"
63-
openssl req -newkey rsa:4096 -nodes -text \
64-
-keyout "$TEKTON_RESULTS_DB_SSL/root.key" \
65-
-out "$TEKTON_RESULTS_DB_SSL/root.csr" \
66-
-subj "/CN=postgres-postgresql.tekton-results.svc.cluster.local" \
67-
-addext "subjectAltName=DNS:postgres-postgresql.tekton-results.svc.cluster.local" \
68-
> /dev/null 2>&1
69-
chmod og-rwx "$TEKTON_RESULTS_DB_SSL/root.key"
70-
openssl x509 -req -days 7 -text \
71-
-signkey "$TEKTON_RESULTS_DB_SSL/root.key" \
72-
-in "$TEKTON_RESULTS_DB_SSL/root.csr" \
73-
-extfile "/etc/ssl/openssl.cnf" \
74-
-extensions v3_ca \
75-
-out "$TEKTON_RESULTS_DB_SSL/ca.crt" \
76-
> /dev/null 2>&1
77-
openssl req -new -nodes -text \
78-
-out "$TEKTON_RESULTS_DB_SSL/root.csr" \
79-
-keyout "$TEKTON_RESULTS_DB_SSL/tls.key" \
80-
-subj "/CN=postgres-postgresql.tekton-results.svc.cluster.local" \
81-
-addext "subjectAltName=DNS:postgres-postgresql.tekton-results.svc.cluster.local" \
82-
> /dev/null 2>&1
83-
chmod og-rwx "$TEKTON_RESULTS_DB_SSL/tls.key"
84-
openssl x509 -req -text -days 7 -CAcreateserial \
85-
-in "$TEKTON_RESULTS_DB_SSL/root.csr" \
86-
-CA "$TEKTON_RESULTS_DB_SSL/ca.crt" \
87-
-CAkey "$TEKTON_RESULTS_DB_SSL/root.key" \
88-
-out "$TEKTON_RESULTS_DB_SSL/tls.crt" \
89-
> /dev/null 2>&1
90-
}
91-
9259
patch_tekton_results_manifests(){
9360
yq --inplace "
9461
.data.[\"db.password\"]=\"$(echo -n "$TEKTON_RESULTS_DATABASE_PASSWORD" | base64)\",
@@ -108,18 +75,8 @@ EOF
10875
yq --inplace "
10976
.data.[\"config.env\"]=\"$string_data\"
11077
" "$WORK_DIR/environment/compute/tekton-results/tekton-results-minio-config.yaml"
111-
yq --inplace "
112-
.data.[\"ca.crt\"]=\"$(base64 "$TEKTON_RESULTS_DB_SSL/ca.crt")\" |
113-
.data.[\"tls.crt\"]=\"$(base64 "$TEKTON_RESULTS_DB_SSL/tls.crt")\" |
114-
.data.[\"tls.key\"]=\"$(base64 "$TEKTON_RESULTS_DB_SSL/tls.key")\"
115-
" "$WORK_DIR/environment/compute/tekton-results/tekton-results-postgresql-tls-secret.yaml"
116-
yq --inplace "
117-
.data.[\"tekton-results-db-ca.pem\"]=\"$(cat "$TEKTON_RESULTS_DB_SSL/tls.crt" "$TEKTON_RESULTS_DB_SSL/ca.crt")\"
118-
" "$WORK_DIR/environment/compute/tekton-results/rds-db-cert-configmap.yaml"
11978
}
12079

121-
122-
12380
deploy_application() {
12481
echo "- Deploy application:"
12582

developer/openshift/gitops/argocd/pipeline-service-storage/postgres.yaml

+2-16
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,8 @@ spec:
2222
value: 13.14.0
2323
- name: tls.enabled
2424
value: "true"
25-
- name: tls.certificatesSecret
26-
value: "postgresql-tls"
27-
- name: tls.certFilename
28-
value: "tls.crt"
29-
- name: tls.certKeyFilename
30-
value: "tls.key"
31-
# There is an unresolved issue with CA cert that stops pods from
32-
# starting due to readiness probe failure. The workaround is
33-
# discussed here along with the linked issues:
34-
# https://github.com/bitnami/charts/issues/8026
35-
# - name: tls.certCAFilename
36-
# value: "ca.crt"
25+
- name: tls.autoGenerated
26+
value: "true"
3727
- name: auth.database
3828
value: "tekton_results"
3929
- name: auth.username
@@ -64,10 +54,6 @@ spec:
6454
value: "false"
6555
- name: shmVolume.enabled
6656
value: "false"
67-
# provide CA cert as extraEnv until the issue is resolved. See above ^
68-
extraEnv:
69-
- name: PGSSLROOTCERT
70-
value: /opt/bitnami/postgresql/certs/ca.crt
7157
syncPolicy:
7258
# Comment this out if you want to manually trigger deployments (using the
7359
# Argo CD Web UI or Argo CD CLI), rather than automatically deploying on

developer/openshift/gitops/argocd/pipeline-service/tekton-results/postgres.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ spec:
1313
- name: api
1414
env:
1515
- name: DB_SSLMODE
16-
value: "verify-ca"
16+
value: "disable"

developer/openshift/gitops/local/tekton-results/kustomization.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,3 @@ resources:
66
- tekton-results-db-secret.yaml
77
- tekton-results-s3-secret.yaml
88
- tekton-results-minio-config.yaml
9-
- rds-db-cert-configmap.yaml
10-
- tekton-results-postgresql-tls-secret.yaml

developer/openshift/gitops/local/tekton-results/rds-db-cert-configmap.yaml

-10
This file was deleted.

developer/openshift/gitops/local/tekton-results/tekton-results-postgresql-tls-secret.yaml

-12
This file was deleted.

operator/gitops/argocd/pipeline-service/tekton-results/api-db-config.yaml

-8
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,3 @@ spec:
3333
secretKeyRef:
3434
name: tekton-results-database
3535
key: db.name
36-
volumeMounts:
37-
- name: db-tls-ca
38-
mountPath: /etc/tls/db
39-
readOnly: true
40-
volumes:
41-
- name: db-tls-ca
42-
configMap:
43-
name: rds-root-crt

operator/gitops/argocd/pipeline-service/tekton-results/config.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ DB_PASSWORD=
33
DB_HOST=
44
DB_PORT=5432
55
DB_NAME=
6-
DB_SSLMODE=verify-full
7-
DB_SSLROOTCERT=/etc/tls/db/tekton-results-db-ca.pem
6+
DB_SSLMODE=disable
7+
DB_SSLROOTCERT=
88
DB_ENABLE_AUTO_MIGRATION=true
99
SERVER_PORT=8080
1010
PROMETHEUS_PORT=9090

0 commit comments

Comments
 (0)