f5b8e4b91f
hardened-containers가 이미 rescan.yml로 매일 자율 재스캔·재빌드하고, sbom.yml이 custom-values.yaml 기준으로 자체 빌드 이미지를 다른 카탈로그 이미지와 동일하게 스캔하고 있어 self-build-drift-check.yml의 트리거·전용 스캔이 순수 중복이었다 (SECURITY_IMAGES_DISPATCH_TOKEN도 등록된 적 없어 트리거 스텝은 항상 실패하던 죽은 코드). check-rebuild-needed.py가 더하던 fixable/no-fix 구분도 cve-gate.py 리포트에 이미 있어 흡수할 필요 없이 삭제했다. 근거는 ADR 0005. 곁들여 CI 위생 문제(trivy DB 캐시 없음, concurrency 없음, catalog-tag-update.yml의 브랜치 누적)를 함께 고치고, hardened-containers의 docs/image-authoring.md가 docs/image-authoring/ 로 분할된 것을 반영해 관련 링크를 정정했다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
125 lines
4.1 KiB
YAML
125 lines
4.1 KiB
YAML
# cnpg-cluster — PaaSup 오버라이드
|
|
# 사전 조건: cloudnative-pg operator(차트 0.29.0 / operator 1.30.0)가 설치되어 있어야 한다.
|
|
|
|
instances: 3
|
|
|
|
postgresql:
|
|
# SUSE BCI 15.7 기반 자체 하드닝 빌드로 교체했다.
|
|
# 결정 근거·받아들인 비용·빌드 정의는 별도 레포 hardened-containers 의
|
|
# docs/decisions/0001-cnpg-postgresql-image.md 와 images/cnpg-postgresql/
|
|
# (이 레포에는 없다).
|
|
#
|
|
# 태그에 빌드일을 포함한다. 같은 앱 버전이라도 베이스 업데이트 결과가 시점마다 다르므로
|
|
# 롤링 태그를 쓰지 않는다(hardened-containers 레포의 docs/image-authoring/README.md).
|
|
imageName: "docker.io/paasup/cnpg-postgresql:18.4-bci15.7-hardened-20260820"
|
|
#
|
|
# trivy 는 SLES 15.7 을 정상 커버한다 — 실효 C/H 0/0 은 측정된 결과이며 게이트 PASS 다.
|
|
# 초기에는 "커버하지 않아 0건이 측정 불가"로 오판했다. 깨끗한 이미지도 0건이라
|
|
# "0건"과 "데이터 없음"이 구분되지 않았던 것이 원인이다 — 게이트의 커버리지
|
|
# 자가진단(CoverageProbe)이 매 스캔마다 그것을 구분한다. doc/sbom-pipeline.md
|
|
#
|
|
# ⚠️ pg-failover-slots 확장이 없다 — PGDG zypp 저장소에 패키지가 없다.
|
|
# 이 차트는 쓰지 않지만 상위 구성에서 요구하면 확인해야 한다.
|
|
#
|
|
# 이전 값: ghcr.io/cloudnative-pg/postgresql:18.4-system-trixie
|
|
# 업스트림 deprecated 타입이었고 실효 CRITICAL/HIGH 6/26 (차단 32건) 이었다.
|
|
# 그 32건은 전부 수정 버전이 없어 어떤 조치로도 해소되지 않는다.
|
|
# image:
|
|
# repository: ghcr.io/cloudnative-pg/postgresql
|
|
# tag: "18.4-standard-trixie"
|
|
|
|
parameters:
|
|
max_connections: "200"
|
|
shared_buffers: 256MB
|
|
work_mem: 8MB
|
|
maintenance_work_mem: 128MB
|
|
effective_cache_size: 1GB
|
|
log_timezone: Asia/Seoul
|
|
timezone: Asia/Seoul
|
|
|
|
# 감사 로깅. CNPG 기본 이미지에 pgaudit 가 포함되어 있다.
|
|
sharedPreloadLibraries:
|
|
- pgaudit
|
|
- pg_stat_statements
|
|
|
|
primaryUpdateStrategy: unsupervised
|
|
primaryUpdateMethod: switchover
|
|
|
|
storage:
|
|
size: 20Gi
|
|
storageClass: longhorn
|
|
|
|
walStorage:
|
|
enabled: true
|
|
size: 10Gi
|
|
storageClass: longhorn
|
|
|
|
resources:
|
|
requests:
|
|
cpu: 500m
|
|
memory: 1Gi
|
|
limits:
|
|
cpu: "2"
|
|
memory: 2Gi
|
|
|
|
bootstrap:
|
|
initdb:
|
|
database: appdb
|
|
owner: appuser
|
|
# 비밀번호를 직접 관리할 때 지정. 미지정 시 operator 가 <release>-app 시크릿에 자동 생성한다.
|
|
# secretName: "$INFISICAL_SECRET"
|
|
encoding: UTF8
|
|
# CREATE EXTENSION 은 여기에 넣지 않는다 (CNPG 1.30.0 에서 무시됨). 아래 databases 로 선언한다.
|
|
postInitApplicationSQL: []
|
|
|
|
# 확장은 Database CRD 로 선언한다. sharedPreloadLibraries 에 올린 것과 짝을 맞춘다.
|
|
databases:
|
|
- name: appdb
|
|
owner: appuser
|
|
ensure: present
|
|
reclaimPolicy: retain
|
|
extensions:
|
|
- name: pg_stat_statements
|
|
- name: pgaudit
|
|
|
|
# postgres superuser 직접 접속 차단. 시크릿 자체가 생성되지 않는다.
|
|
enableSuperuserAccess: false
|
|
|
|
affinity:
|
|
enablePodAntiAffinity: true
|
|
# 단일 노드 dev 환경에서는 preferred 여야 3 인스턴스가 스케줄된다.
|
|
# 노드 수 >= instances 인 운영 환경에서는 required 로 변경한다.
|
|
podAntiAffinityType: preferred
|
|
topologyKey: kubernetes.io/hostname
|
|
nodeSelector: {}
|
|
tolerations: []
|
|
|
|
monitoring:
|
|
# rancher-monitoring(Prometheus Operator) 설치 환경에서만 true
|
|
enablePodMonitor: false
|
|
|
|
# 백업 — 운영 배포 시 반드시 활성화한다. 미설정이면 PITR 불가.
|
|
backup:
|
|
enabled: false
|
|
retentionPolicy: 30d
|
|
barmanObjectStore:
|
|
destinationPath: "" # 예: s3://pg-backup/cnpg
|
|
endpointURL: "" # 예: http://rustfs.defense-llm.svc.cluster.local:9000
|
|
s3Credentials:
|
|
accessKeyId:
|
|
name: "" # 예: pg-backup-s3
|
|
key: ACCESS_KEY_ID
|
|
secretAccessKey:
|
|
name: ""
|
|
key: ACCESS_SECRET_KEY
|
|
|
|
scheduledBackup:
|
|
enabled: false
|
|
schedule: "0 0 2 * * *" # 6필드 cron — 매일 02:00
|
|
|
|
pooler:
|
|
enabled: false
|
|
instances: 2
|
|
type: rw
|
|
poolMode: transaction
|