Skip to content

Commit

Permalink
Merge pull request #1262 from ccunning/move-notary-dburl-into-secret
Browse files Browse the repository at this point in the history
Move the notary DB_URL strings into the notary-server secret
  • Loading branch information
ywk253100 committed Aug 29, 2022
2 parents 9a1599b + e72da85 commit 4332aa7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions templates/notary/notary-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ data:
{{- end }}
server.json: {{ tpl (.Files.Get "conf/notary-server.json") . | b64enc }}
signer.json: {{ tpl (.Files.Get "conf/notary-signer.json") . | b64enc }}
NOTARY_SERVER_DB_URL: {{ include "harbor.database.notaryServer" . | b64enc }}
NOTARY_SIGNER_DB_URL: {{ include "harbor.database.notarySigner" . | b64enc }}
{{- end }}
5 changes: 4 additions & 1 deletion templates/notary/notary-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ spec:
- name: MIGRATIONS_PATH
value: migrations/server/postgresql
- name: DB_URL
value: {{ template "harbor.database.notaryServer" . }}
valueFrom:
secretKeyRef:
name: {{ template "harbor.notary-server" . }}
key: NOTARY_SERVER_DB_URL
volumeMounts:
- name: config
mountPath: /etc/notary/server-config.postgres.json
Expand Down
5 changes: 4 additions & 1 deletion templates/notary/notary-signer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ spec:
- name: MIGRATIONS_PATH
value: migrations/signer/postgresql
- name: DB_URL
value: {{ template "harbor.database.notarySigner" . }}
valueFrom:
secretKeyRef:
name: {{ template "harbor.notary-server" . }}
key: NOTARY_SIGNER_DB_URL
- name: NOTARY_SIGNER_DEFAULTALIAS
value: defaultalias
volumeMounts:
Expand Down

0 comments on commit 4332aa7

Please sign in to comment.