Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: credential secret does not works if set from values #196

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/connect/templates/connect-credentials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
app.kubernetes.io/component: connect
{{- include "onepassword-connect.labels" . | nindent 4 }}
type: Opaque
stringData:
data:
{{ .Values.connect.credentialsKey }}: |-
{{- if (.Values.connect.credentials) }}
{{ .Values.connect.credentials | b64enc | indent 2 }}
Expand Down
19 changes: 11 additions & 8 deletions charts/connect/templates/connect-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ spec:
- name: credentials
secret:
secretName: {{ .Values.connect.credentialsName }}
items:
- key: {{ .Values.connect.credentialsKey }}
path: 1password-credentials.json
{{- if .Values.connect.tls.enabled }}
- name: tls-cert
secret:
Expand All @@ -60,10 +63,7 @@ spec:
{{- toYaml .Values.connect.api.resources | nindent 12 }}
env:
- name: OP_SESSION
valueFrom:
secretKeyRef:
name: {{ .Values.connect.credentialsName }}
key: {{ .Values.connect.credentialsKey }}
value: /home/opuser/.op/1password-credentials.json
- name: OP_BUS_PORT
value: "11220"
- name: OP_BUS_PEERS
Expand Down Expand Up @@ -100,6 +100,9 @@ spec:
volumeMounts:
- mountPath: /home/opuser/.op/data
name: {{ .Values.connect.dataVolume.name }}
- name: credentials
mountPath: /home/opuser/.op/1password-credentials.json
subPath: 1password-credentials.json
{{- if .Values.connect.tls.enabled }}
- name: tls-cert
mountPath: /home/opuser/.op/certs
Expand All @@ -117,10 +120,7 @@ spec:
- name: OP_HTTP_PORT
value: "{{ .Values.connect.sync.httpPort }}"
- name: OP_SESSION
valueFrom:
secretKeyRef:
name: {{ .Values.connect.credentialsName }}
key: {{ .Values.connect.credentialsKey }}
value: /home/opuser/.op/1password-credentials.json
- name: OP_BUS_PORT
value: "11221"
- name: OP_BUS_PEERS
Expand All @@ -145,3 +145,6 @@ spec:
volumeMounts:
- mountPath: /home/opuser/.op/data
name: {{ .Values.connect.dataVolume.name }}
- name: credentials
mountPath: /home/opuser/.op/1password-credentials.json
subPath: 1password-credentials.json