Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Add helm secrets for postgresql-ha
Browse files Browse the repository at this point in the history
  • Loading branch information
iamvigneshwars committed Mar 12, 2024
1 parent a8fd852 commit 4efcbad
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 80 deletions.
15 changes: 0 additions & 15 deletions charts/xchemlab/templates/application-secret-sealed.yaml

This file was deleted.

14 changes: 14 additions & 0 deletions charts/xchemlab/templates/application-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
name: application-passwords
namespace: xchemlab
spec:
encryptedData:
passwords: AgCALIOXYoCZlI3qJHUwxAGlCF5T2RqhzRGJ6WILt/feRkKdwkicFpCpdjbkLoZMutgIFbmSZtCxUopvocUTVVvy08thDwy/Vuc/tpVhGuKqGbhf7YB8Kohy4lXKfNQjuyIlIlrKlp2EvweNDC2czBwkKP2IKNcBjwO66CyE8JNUuva15UdVA+PrEeaQ+9t5bQclGafYoPnAfh/JBDVdUoHu5UESDycyXTl6IA6jXhgckXuN4mRfrkdXxJgpob2DQCmGDj8d6QBhsNjhYaJJVkK3wr3hbdHvsZGzRMsrZEeNgYGKjBkAyRxgBQqWJITA25yQIi+oWiCW0plkQZw0zEzIDH5ZP85gWCTksY/kBbSW0oaSfdIOj/6X/WpEhfjowEX99pyr6zeYCC+JvXMx/PfkkwbVdevWC4IydXXUi+kctPgBk0Cww12+vGk2u22u0tHX6QpyWcmvETlHHC13oJta/K6CdHbRtyBpnyVORwMYuIuc+gh3BSAzIlYekzWp+/998/0uywg1PUBR7TbpbZyyEFZb2ShYaqYajV7YeYP72wAG3NjvIRQAa4cyk5iXVms/hHKED5IqveeJf88ksrvdmeTqoSdTlxCaixDgyhUzaLIv6ZPv9olFS6k5IyWZ20bwjm4cPGlq5MHs6buDIRZYWs2pXIGuhA8PWByaptWtCJQWB2jOfCzUdSv0+gYjIAJOe525moLuBDUbT9YpDmH3
usernames: AgCQwvol+C036DNxeVfjDDtfr1LQcl+CI9R/ZjOJ/5Ctx5yawz3Xnv8AfIpvDR79+wFLkXwwng2vY3rSw462Cjj/X5FxHqzqkp9S2bNV8SlG5cb8X9wYoFrqvOq5IPDJv+HgwIdAv15kgBnT1eBr23FGovBa4TasfKQIF63DD2xx4xKsUllkXr9MrdmOz/dgtyJxwPLDE2DtTVD71IXvFucLavr6oFXCKIJ12NR556hKE1xdZZgKaNnJeLil33KA5P1MiQ8tXrco1aPbUqZ5JB2FPF3wNxW6Wmw/AeptT3QJj6QObYdSEM4/HGB+zxHEvRAXrk+9CwFZ+w57fODnDffghxrPkReFmWKLOiXBPB8YqVz5MPK8fpPMPVrFcG4YPy03LHJtboaTs1Slk0O+HxzQeeA0BOrl6Uy9TmNxZIOt202jbrkGhtLhJJnAZFfr4vrhdmALF7+aAAkDeVTF0nycCnnmo2ZHGrvlIK02PaphhGw6iuLR+8/efZNl8IErVIehwCH9+u0sIik7+FwPYNlpYeRcNmsQoJmJuy1avyowcDnHInf57s+ZlAxKbbjUX/EIO5ebuoT45kLV5MpeDIQbYS77fg3SRdaMO3OnMEv2WwYc6Tg+N8q89UAk6wqqu0VEVfng39hg/tZQmKb9O4oCosFSdobFC9I3Kf49Qh8/N4FnfaPYRWsjf6zVCVwz+hGbkmqhadv7gA==
template:
metadata:
creationTimestamp: null
name: application-passwords
namespace: xchemlab
15 changes: 0 additions & 15 deletions charts/xchemlab/templates/init-script.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions charts/xchemlab/templates/pgpool-secret-sealed.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions charts/xchemlab/templates/pgpool-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
name: pgpool-passwords
namespace: xchemlab
spec:
encryptedData:
admin-password: AgA+DTJgyISrh2I9MCWM8k6vR9aO61FIIxRWJ82OyNnA1yHdFgQcKsnSbEVJaYBPTerUyJUC7OuKiTs/IRlu6jAtJabiknoS0XVnTHp0RF42baMPBvR0d6pXBt+d9EFFv9vXKG5Ko6cd1fQkuI38i8qsrmBq0y8Z2vlvdq+hG9p/zFKLXON622NQWkLvc8d8y58nl+q1gOco/I+lP4E+2woHkhnsPHlh3+FhpaZXEaZRbSKkdB79rzeumlUrjwugWBxovz/8J4LjMtMv5Xt4LqNo2AAl1TRBxBG8RCaX59vRU4WFZf3gEsnCXBDWBwQTiIr/kt9L43hXqZK/FLUSPLcJruxrCdPRpe2dqvU1GfeDneg1aCgV6msc73K2zIOTVbACsb/glUwHRgr+C8c12oD1p/T+mL9E/dV37kRLHxOunmfcrsnpmWHtJB5y955HwBzw8MYiB7F7EFd78+8D7gQXvCdffRtELnhN9ynewCQd0P8DzK97JfJUIbB7+Wl6C8u9A1v0i6Tw7ofRNROuykVyNtK3jrGNeCxRH1cgowRVK6DlOBuZvEhAvE6/f5nLgF4FtLPYZkECqPMprpnSgLEj1ogNOq/+WpnXCfavX+tmrqBLmqtJfBVcl9LBjBgXiqsMXQ0zw2QSEzAaJHymc3Kur2BLnkHQ035UMrZ+CgExjFLSHqlo34VMQzytmuMy2dW0fFPSQMig1fduEJXJMzdcb+GTslJNjJM=
template:
metadata:
creationTimestamp: null
name: pgpool-passwords
namespace: xchemlab
15 changes: 0 additions & 15 deletions charts/xchemlab/templates/postgres-secret-sealed.yaml

This file was deleted.

14 changes: 14 additions & 0 deletions charts/xchemlab/templates/postgres-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
name: postgres-passwords
namespace: xchemlab
spec:
encryptedData:
password: AgBsk50Y8gy4qdfpauAD7opsqUSQnDnooUn7ADb/O7laUW3TVg1NSRNmmP2GUV462DGLAf3mg6wreTP+MatZKFvyfOo3Cn526BCdIBD98DikGKQMatzmQL6K7Ou5e7UnqVPM3nFAP5ggsb7+VKkQ/WoKr6hTnL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PdfwEvcw6dKBmweQLiM5aybnFB1DdKkWHaDOJEn0iFhJttKHYRUNeLrdeW2ua4F48qnnf9tFAFafGU9tPsEZi2CJDIhnrB4dEz8e1OvZy9j5gTKWmeAbTZUWbtAOd7QuARxkdJl0bZCZQgF0gvEAoR0KTohzjImcgDQ0lDhjwJ2mo1Ic3oPJO2QwEi05QhZ2o8F5TU95VFknQiKzQuEusZo/a8WMhVMcisS8XiShNgQad13yUcLL64HYNuXEznl1qL7aE=
template:
metadata:
creationTimestamp: null
name: postgres-passwords
namespace: xchemlab
48 changes: 27 additions & 21 deletions charts/xchemlab/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,44 +22,44 @@ chimp-chomp:
compound-library:
enabled: true
database:
host: postgres://postgresql-ha-pgpool
user: postgres
host: postgres://xchemlab-postgresql-ha-pgpool.xchemlab.svc.cluster.local
user: xchemlab
password:
secretName: postgres-passwords
secretKey: password
secretName: application-passwords
secretKey: passwords
opa:
url: http://{{ .Release.Name }}-opa-kube-mgmt:8181

compound-soaking:
enabled: true
database:
host: postgres://postgresql-ha-pgpool
user: postgres
host: postgres://xchemlab-postgresql-ha-pgpool.xchemlab.svc.cluster.local
user: xchemlab
password:
secretName: postgres-passwords
secretKey: password
secretName: application-passwords
secretKey: passwords
opa:
url: http://{{ .Release.Name }}-opa-kube-mgmt:8181

crystal-library:
enabled: true
database:
host: postgres://postgresql-ha-pgpool
user: postgres
host: postgres://xchemlab-postgresql-ha-pgpool.xchemlab.svc.cluster.local
user: xchemlab
password:
secretName: postgres-passwords
secretKey: password
secretName: application-passwords
secretKey: passwords
opa:
url: http://{{ .Release.Name }}-opa-kube-mgmt:8181

pin-packing:
enabled: true
database:
host: postgres://postgresql-ha-pgpool
user: postgres
host: postgres://xchemlab-postgresql-ha-pgpool.xchemlab.svc.cluster.local
user: xchemlab
password:
secretName: postgres-passwords
secretKey: password
secretName: application-passwords
secretKey: passwords
opa:
url: http://{{ .Release.Name }}-opa-kube-mgmt:8181

Expand All @@ -77,11 +77,11 @@ targeting:
secretName: targeting-s3-secret
secretKey: secret-access-key
database:
host: postgres://postgresql-ha-pgpool
user: postgres
host: postgres://xchemlab-postgresql-ha-pgpool.xchemlab.svc.cluster.local
user: xchemlab
password:
secretName: postgres-passwords
secretKey: password
secretName: application-passwords
secretKey: passwords
opa:
url: http://{{ .Release.Name }}-opa-kube-mgmt:8181

Expand Down Expand Up @@ -167,7 +167,13 @@ postgresql-ha:
limits:
cpu: 2
memory: 2Gi
initdbScripts: init-script
initdbScripts:
db-init.sql: |
SELECT 'CREATE DATABASE compound_library' OWNER xchemlab WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'compound_library')\gexec;
SELECT 'CREATE DATABASE compound_soaking' OWNER xchemlab WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'compound_soaking')\gexec;
SELECT 'CREATE DATABASE crystal_library' OWNER xchemlab WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'crystal_library')\gexec;
SELECT 'CREATE DATABASE targeting' OWNER xchemlab WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'targeting')\gexec;
SELECT 'CREATE DATABASE pin_packing' OWNER xchemlab WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'pin_packing')\gexec;
pgpool:
existingSecret: pgpool-passwords
Expand Down

0 comments on commit 4efcbad

Please sign in to comment.