Skip to content

Commit 0429452

Browse files
authored
KubeArchive: encode password for rh03 (#7361)
Signed-off-by: Hector Martinez <[email protected]>
1 parent 8b416e6 commit 0429452

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
apiVersion: external-secrets.io/v1beta1
3+
kind: ExternalSecret
4+
metadata:
5+
name: database-secret
6+
annotations:
7+
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
8+
argocd.argoproj.io/sync-wave: "-1"
9+
spec:
10+
dataFrom:
11+
- extract:
12+
key: production/platform/terraform/generated/kflux-prd-rh03/kubearchive-database
13+
refreshInterval: 1h
14+
secretStoreRef:
15+
kind: ClusterSecretStore
16+
name: appsre-stonesoup-vault
17+
target:
18+
creationPolicy: Owner
19+
deletionPolicy: Delete
20+
name: kubearchive-database-credentials
21+
template:
22+
data:
23+
DATABASE_KIND: postgresql
24+
DATABASE_PORT: "5432"
25+
DATABASE_URL: '{{ index . "db.host" }}'
26+
DATABASE_PASSWORD: '{{ index . "db.password" | urlquery }}'
27+
DATABASE_USER: '{{ index . "db.user" }}'
28+
DATABASE_DB: '{{ index . "db.name" }}'

components/kubearchive/production/kflux-prd-rh03/kustomization.yaml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
resources:
55
- ../../base
6-
- ../base
6+
- database-secret.yaml
77
- https://github.com/kubearchive/kubearchive/releases/download/v1.2.0/kubearchive.yaml?timeout=90
88

99
namespace: product-kubearchive
@@ -30,17 +30,6 @@ patches:
3030
metadata:
3131
name: kubearchive-database-credentials
3232
namespace: kubearchive
33-
- patch: |-
34-
apiVersion: external-secrets.io/v1beta1
35-
kind: ExternalSecret
36-
metadata:
37-
name: database-secret
38-
spec:
39-
secretStoreRef:
40-
name: appsre-stonesoup-vault
41-
dataFrom:
42-
- extract:
43-
key: production/platform/terraform/generated/kflux-prd-rh03/kubearchive-database
4433
# These patches add an annotation so an OpenShift service
4534
# creates the TLS secrets instead of Cert Manager
4635
- patch: |-

0 commit comments

Comments
 (0)