-
Notifications
You must be signed in to change notification settings - Fork 0
[] Add PVC, Secret, and ConfigMap templates; update Deployment to reference them #267
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
Changes from all commits
c726276
b983b28
0e50cec
b9251b1
b78763d
e1bded7
0b57369
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| {{/* | ||
| Workload Secrets referenced by the backend Deployment, worker Deployment, and | ||
| migration Job. These hold the credentials the application pods consume directly: | ||
| - <fullname>-db (key: postgres-password) — only when db.type == "postgres" | ||
| - <fullname>-minio (key: secret-key) — only when minio.enabled | ||
|
|
||
| Gated identically to the secretKeyRef usages so `helm template` renders coherently | ||
| with default values. Values are seeded from values.yaml (db.postgres.password, | ||
| minio.secretKey) so they stay in sync with the bundled subcharts; when unset they | ||
| fall back to an existing in-cluster value (idempotent on upgrade) or a fresh random, | ||
| so no install-time --set wiring is required. | ||
| */}} | ||
| {{- if eq .Values.db.type "postgres" }} | ||
| {{- $dbSecret := lookup "v1" "Secret" .Release.Namespace (printf "%s-db" (include "open-git.fullname" .)) }} | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: {{ include "open-git.fullname" . }}-db | ||
| labels: | ||
| {{- include "open-git.labels" . | nindent 4 }} | ||
| app.kubernetes.io/component: db | ||
| type: Opaque | ||
| data: | ||
| {{- if .Values.db.postgres.password }} | ||
| postgres-password: {{ .Values.db.postgres.password | b64enc | quote }} | ||
| {{- else if and $dbSecret (index $dbSecret.data "postgres-password") }} | ||
| postgres-password: {{ index $dbSecret.data "postgres-password" | quote }} | ||
| {{- else }} | ||
| postgres-password: {{ randAlphaNum 32 | b64enc | quote }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- if .Values.minio.enabled }} | ||
| {{- $minioSecret := lookup "v1" "Secret" .Release.Namespace (printf "%s-minio" (include "open-git.fullname" .)) }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: {{ include "open-git.fullname" . }}-minio | ||
| labels: | ||
| {{- include "open-git.labels" . | nindent 4 }} | ||
| app.kubernetes.io/component: minio | ||
| type: Opaque | ||
| data: | ||
| {{- if .Values.minio.secretKey }} | ||
| secret-key: {{ .Values.minio.secretKey | b64enc | quote }} | ||
| {{- else if and $minioSecret (index $minioSecret.data "secret-key") }} | ||
| secret-key: {{ index $minioSecret.data "secret-key" | quote }} | ||
| {{- else }} | ||
| secret-key: {{ randAlphaNum 32 | b64enc | quote }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 [critical] Task 指定の jwt-secret が Secret テンプレートに存在しない Task Step 2 および Verification Checklist では Secret に 該当箇所: {{- if eq .Values.db.type "postgres" }}
...
postgres-password: {{ .Values.db.postgres.password | b64enc | quote }}
...
{{- end }}
{{- if .Values.minio.enabled }}
...
secret-key: {{ .Values.minio.secretKey | b64enc | quote }}
...
{{- end }}
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 [high] PR スコープが Task / PR タイトルと一致しない PR タイトルおよび Task Goal では 該当箇所: {{/*
Workload Secrets referenced by the backend Deployment, worker Deployment, and
migration Job. These hold the credentials the application pods consume directly:
- <fullname>-db (key: postgres-password) — only when db.type == "postgres"
- <fullname>-minio (key: secret-key) — only when minio.enabled
...
{{- end }}
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 [high] Secret キー名が Task 指定と不一致
Task では単一 Secret 内のキー名として
db-passwordとminio-root-passwordが指定されていますが、diff では別 Secret 名・別キー名を使用しています。Task Step 4 がsecretKeyRef.key: db-password/minio-root-passwordを前提としている場合、生成される Secret と Deployment 参照が一致せず env 注入に失敗します。該当箇所:
Task 指定:
db-password,minio-root-passwordcode.logic.secret_key_name_mismatch| confidence: 0.88