Skip to content

Commit

Permalink
Move the secret into a separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
rofrano committed Apr 8, 2024
1 parent b3ace96 commit 487f82c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
18 changes: 0 additions & 18 deletions k8s/postgresql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,3 @@ spec:
ports:
- port: 5432
targetPort: 5432

---
# This secret can also be created from the command line using environment variables
#
# export DATABASE_URI='postgresql+psycopg://<userid>:<password>@<hostname>:<port>/<database-name>'
# export POSTGRES_PASSWORD='<place-password-here>'
#
# kubectl create secret generic postgres-creds \
# --from-literal=password=$POSTGRES_PASSWORD
# --from-literal=database_uri=$DATABASE_URI
#
apiVersion: v1
kind: Secret
metadata:
name: postgres-creds
data:
password: cG9zdGdyZXM=
database_uri: cG9zdGdyZXNxbCtwc3ljb3BnOi8vcG9zdGdyZXM6cG9zdGdyZXNAcG9zdGdyZXM6NTQzMi9wb3N0Z3Jlcw==
17 changes: 17 additions & 0 deletions k8s/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
# This secret can also be created from the command line using environment variables
#
# export DATABASE_URI='postgresql+psycopg://<userid>:<password>@<hostname>:<port>/<database-name>'
# export POSTGRES_PASSWORD='<place-password-here>'
#
# kubectl create secret generic postgres-creds \
# --from-literal=password=$POSTGRES_PASSWORD
# --from-literal=database_uri=$DATABASE_URI
#
apiVersion: v1
kind: Secret
metadata:
name: postgres-creds
data:
password: cG9zdGdyZXM=
database_uri: cG9zdGdyZXNxbCtwc3ljb3BnOi8vcG9zdGdyZXM6cG9zdGdyZXNAcG9zdGdyZXM6NTQzMi9wb3N0Z3Jlcw==

0 comments on commit 487f82c

Please sign in to comment.