자체 빌드 이미지 3종(cloudnative-pg/cnpg-postgresql/etcd) + 대응 헬름 차트 도입
security-catalog 프로젝트에서 첫 실사용 자체 빌드 이미지 3종을 포팅한다 — 전부
상위 태그·베이스 OS 교체로 해소 안 되는 CVE(Go 모듈 정적 링크 또는 미수정 CRITICAL/
HIGH)를 자체 빌드(소스 컴파일 또는 SUSE BCI 재설치)로 대응한다:
- images/cloudnative-pg: CNPG operator, release-1.30 소스 컴파일 + bci-micro
- images/cnpg-postgresql: PostgreSQL 18.4, bci-base + zypper 재설치
- images/etcd: etcd v3.7.1, 소스 컴파일(x/text 강제 업그레이드) + bci-micro
함께 추가:
- manifests/helm/{cloudnative-pg,cnpg-cluster,etcd} — 위 이미지를 참조하는 카탈로그 차트
- scripts/deploy-test/*.sh, .claude/deploy-test-procedure.md — CVE 0건과 별개로
"실제로 뜨는가"를 검증하는 배포 스모크 테스트
- .claude/pitfalls.md — 자체 빌드/배포 테스트 중 실측한 함정 모음
검토 중 발견해 반영한 수정:
- cloudnative-pg 차트의 image 블록을 etcd와 동일한 registry/repository/tag 3필드+
따옴표 포맷으로 통일 — 기존 포맷(repository에 registry+repo 결합, 따옴표 없음)은
patch-catalog-tag.py 의 split 패처가 tag만 갱신하고 repository는 그대로 남기는
조용한 부분 치환을 일으켜, 향후 레지스트리 마이그레이션 시 깨진 참조를 만들 수 있었다
- cnpg-cluster 차트의 SLES 커버리지 코멘트를 최신 실측(trivy가 SLES 15.7을 정상
커버함, 2026-07-29 재측정)에 맞게 정정 — 폐기된 "측정 불가/OVAL 우회 필요" 결론이
남아있었다
- CLAUDE.md/MEMORY.md 의 "images/ 디렉토리 없음" 서술을 갱신하고, 레지스트리
마이그레이션(docker.io/wbsong111 → docker.io/paasup)·decisions/analysis 문서 이관·
리소스 프로파일 추가를 다음 작업으로 기록
이 3개 이미지는 아직 dip-catalog 자체 CI(build-image.yml)로 빌드·게이트·push 를
실행해본 적이 없다 — 현재 참조 태그는 security-catalog 쪽에서 이미 검증된 것이다.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,122 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: {{ include "cnpg-cluster.fullname" . }}
|
||||
namespace: {{ include "cnpg-cluster.namespace" . }}
|
||||
labels:
|
||||
{{- include "cnpg-cluster.labels" . | nindent 4 }}
|
||||
{{- with .Values.extraLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.extraAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
instances: {{ .Values.instances }}
|
||||
imageName: {{ include "cnpg-cluster.image" . }}
|
||||
|
||||
primaryUpdateStrategy: {{ .Values.primaryUpdateStrategy }}
|
||||
primaryUpdateMethod: {{ .Values.primaryUpdateMethod }}
|
||||
|
||||
enableSuperuserAccess: {{ .Values.enableSuperuserAccess }}
|
||||
|
||||
postgresql:
|
||||
{{- with .Values.postgresql.parameters }}
|
||||
parameters:
|
||||
{{- range $k, $v := . }}
|
||||
{{ $k }}: {{ $v | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.postgresql.sharedPreloadLibraries }}
|
||||
shared_preload_libraries:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- with .Values.postgresql.pg_hba }}
|
||||
pg_hba:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- with .Values.postgresql.synchronous }}
|
||||
synchronous:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
|
||||
bootstrap:
|
||||
initdb:
|
||||
database: {{ .Values.bootstrap.initdb.database }}
|
||||
owner: {{ .Values.bootstrap.initdb.owner }}
|
||||
{{- with .Values.bootstrap.initdb.secretName }}
|
||||
secret:
|
||||
name: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.bootstrap.initdb.encoding }}
|
||||
encoding: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.bootstrap.initdb.localeCollate }}
|
||||
localeCollate: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.bootstrap.initdb.localeCType }}
|
||||
localeCType: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.bootstrap.initdb.postInitApplicationSQL }}
|
||||
postInitApplicationSQL:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
storage:
|
||||
size: {{ .Values.storage.size }}
|
||||
{{- with .Values.storage.storageClass }}
|
||||
storageClass: {{ . }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.walStorage.enabled }}
|
||||
walStorage:
|
||||
size: {{ .Values.walStorage.size }}
|
||||
{{- with .Values.walStorage.storageClass }}
|
||||
storageClass: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 4 }}
|
||||
|
||||
affinity:
|
||||
enablePodAntiAffinity: {{ .Values.affinity.enablePodAntiAffinity }}
|
||||
podAntiAffinityType: {{ .Values.affinity.podAntiAffinityType }}
|
||||
topologyKey: {{ .Values.affinity.topologyKey }}
|
||||
{{- with .Values.affinity.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
|
||||
monitoring:
|
||||
enablePodMonitor: {{ .Values.monitoring.enablePodMonitor }}
|
||||
{{- with .Values.monitoring.customQueriesConfigMap }}
|
||||
customQueriesConfigMap:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.backup.enabled }}
|
||||
backup:
|
||||
retentionPolicy: {{ .Values.backup.retentionPolicy }}
|
||||
barmanObjectStore:
|
||||
destinationPath: {{ required "backup.enabled=true 이면 backup.barmanObjectStore.destinationPath 가 필요하다" .Values.backup.barmanObjectStore.destinationPath }}
|
||||
{{- with .Values.backup.barmanObjectStore.endpointURL }}
|
||||
endpointURL: {{ . }}
|
||||
{{- end }}
|
||||
s3Credentials:
|
||||
accessKeyId:
|
||||
name: {{ required "backup.enabled=true 이면 s3Credentials.accessKeyId.name 이 필요하다" .Values.backup.barmanObjectStore.s3Credentials.accessKeyId.name }}
|
||||
key: {{ .Values.backup.barmanObjectStore.s3Credentials.accessKeyId.key }}
|
||||
secretAccessKey:
|
||||
name: {{ required "backup.enabled=true 이면 s3Credentials.secretAccessKey.name 이 필요하다" .Values.backup.barmanObjectStore.s3Credentials.secretAccessKey.name }}
|
||||
key: {{ .Values.backup.barmanObjectStore.s3Credentials.secretAccessKey.key }}
|
||||
wal:
|
||||
{{- toYaml .Values.backup.barmanObjectStore.wal | nindent 8 }}
|
||||
data:
|
||||
{{- toYaml .Values.backup.barmanObjectStore.data | nindent 8 }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user