Skip to content

Commit

Permalink
obfuscate metrics secret values (#2187)
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Luzarraga <[email protected]>
  • Loading branch information
bluzarraga authored Sep 12, 2024
1 parent aeac026 commit 3c5431f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions preload_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,8 @@ data:
type: Opaque
EOF
#icp-mongodb-metrics-secret.yaml
metrics_pass=$(${OC} get secret icp-mongodb-metrics -n $FROM_NAMESPACE -o=jsonpath='{.data.password}')
metrics_user=$(${OC} get secret icp-mongodb-metrics -n $FROM_NAMESPACE -o=jsonpath='{.data.user}')
cat << EOF | ${OC} apply -f -
kind: Secret
apiVersion: v1
Expand All @@ -1438,8 +1440,8 @@ metadata:
app.kubernetes.io/name: icp-mongodb
release: mongodb
data:
password: aWNwbWV0cmljcw==
user: bWV0cmljcw==
password: $metrics_pass
user: $metrics_user
type: Opaque
EOF
#mongo-rbac.yaml
Expand Down

0 comments on commit 3c5431f

Please sign in to comment.