feat(keycloak): pin the operator source and both images by digest
The Keycloak Operator remote resource is pinned to the tag 26.7.0, and that tag's content changed once (live build-timestamp 2026-07-09, later renders 2026-07-23). Both images use the 26.7.0 tag with imagePullPolicy Always, so every restart depends on quay.io and could pull different bits. Pin the remote resource to the tag's commit, the operator image and RELATED_IMAGE_KEYCLOAK to the digests that were running on 2026-11-12 (pod imageID) and set the operator to IfNotPresent. The env value is set with a strategic merge patch keyed by name; a JSON patch by list index hit KUBERNETES_NAMESPACE instead. render-phase2.sh and apply-keycloak.sh check the commit and the digest. Risk: applying restarts the Keycloak operator once (restart window). Keycloak itself keeps running. Verification (desktop): render-phase2.sh passes; the rendered Deployment has the pinned image, IfNotPresent and the digest in RELATED_IMAGE_KEYCLOAK with the other env entries unchanged.
This commit is contained in:
@@ -14,6 +14,11 @@ Kubernetes 리소스를 직접 참조하며 업스트림 매니페스트를 복
|
||||
- 저장소: <https://github.com/keycloak/keycloak-k8s-resources>
|
||||
- 리소스 경로: `kubernetes`
|
||||
- Keycloak 및 Operator 버전: `26.7.0`
|
||||
- 원격 ref: 태그가 아니라 그 태그의 커밋 `38fd7a0c84e15d4b66b37d1c2ea728ca2f5416a4`(2026-11-12). 같은 태그의 내용이
|
||||
한 번 바뀌었다(build-timestamp 07-09 → 07-23, 성숙도 점검 A5).
|
||||
- 이미지: Operator·Keycloak 모두 2026-11-12에 돌던 digest로 고정, Operator `imagePullPolicy: IfNotPresent`.
|
||||
Keycloak CR의 `spec.image`를 정하면 Operator가 최적화 빌드된 이미지로 보므로 `startOptimized: false`를 같이 둔다.
|
||||
올릴 때는 태그·커밋·두 digest와 `scripts/validate/render-phase2.sh`·`scripts/bootstrap/apply-keycloak.sh`의 검사 문자열을 함께 바꾼다.
|
||||
- 설치 모드: `keycloak` namespace 범위
|
||||
|
||||
업스트림 namespace 범위 Deployment는 각 컨트롤러의 감시 namespace를
|
||||
|
||||
@@ -3,8 +3,38 @@ kind: Kustomization
|
||||
|
||||
namespace: keycloak
|
||||
|
||||
# keycloak-k8s-resources tag 26.7.0 pointed at this commit on 2026-11-12. The tag
|
||||
# content changed once (live build-timestamp 2026-07-09, later renders 2026-07-23),
|
||||
# so the commit is pinned instead of the tag.
|
||||
resources:
|
||||
- github.com/keycloak/keycloak-k8s-resources/kubernetes?ref=26.7.0
|
||||
- github.com/keycloak/keycloak-k8s-resources/kubernetes?ref=38fd7a0c84e15d4b66b37d1c2ea728ca2f5416a4
|
||||
|
||||
# The 26.7.0 images that were running on 2026-11-12 (pod imageID), by digest.
|
||||
images:
|
||||
- name: quay.io/keycloak/keycloak-operator
|
||||
digest: sha256:257ee324da2c701b7fc1ed1b2ce0e03979d1bf149952383bdcf6be904ae5b4f3
|
||||
|
||||
patches:
|
||||
# Merged by container and env name (strategic merge), not by list index.
|
||||
- target:
|
||||
group: apps
|
||||
version: v1
|
||||
kind: Deployment
|
||||
name: keycloak-operator
|
||||
patch: |-
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: keycloak-operator
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: keycloak-operator
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: RELATED_IMAGE_KEYCLOAK
|
||||
value: quay.io/keycloak/keycloak@sha256:0f198be292568439d700cdbfb893e69a6009bb43a94a06a945b1d3d506c76b13
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
|
||||
@@ -189,8 +189,8 @@ assert_regex_count \
|
||||
|
||||
assert_regex_count \
|
||||
"${REPOSITORY_ROOT}/infrastructure/controllers/keycloak-operator/kustomization.yaml" \
|
||||
'github\.com/keycloak/keycloak-k8s-resources/kubernetes\?ref=26\.7\.0' 1 \
|
||||
"Keycloak Operator 26.7.0 source pin"
|
||||
'github\.com/keycloak/keycloak-k8s-resources/kubernetes\?ref=38fd7a0c84e15d4b66b37d1c2ea728ca2f5416a4' 1 \
|
||||
"Keycloak Operator 26.7.0 commit pin"
|
||||
assert_regex_count \
|
||||
"${render_temp_dir}/keycloak-operator.yaml" \
|
||||
'^kind:[[:space:]]CustomResourceDefinition$' 4 \
|
||||
|
||||
@@ -266,7 +266,8 @@ aistor_objectstore_kustomization="${REPOSITORY_ROOT}/services/minio-aistor/base/
|
||||
aistor_operator_values="${REPOSITORY_ROOT}/infrastructure/controllers/aistor-operator/values/home.yaml"
|
||||
aistor_objectstore_values="${REPOSITORY_ROOT}/services/minio-aistor/base/deployment/values/home.yaml"
|
||||
|
||||
assert_regex_count "$keycloak_operator_kustomization" '^[[:space:]]*-[[:space:]]github\.com/keycloak/keycloak-k8s-resources/kubernetes\?ref=26\.7\.0[[:space:]]*$' 1 "Keycloak Operator remote ref must be 26.7.0"
|
||||
assert_regex_count "$keycloak_operator_kustomization" '^[[:space:]]*-[[:space:]]github\.com/keycloak/keycloak-k8s-resources/kubernetes\?ref=38fd7a0c84e15d4b66b37d1c2ea728ca2f5416a4[[:space:]]*$' 1 "Keycloak Operator remote ref must be the 26.7.0 commit"
|
||||
assert_regex_count "$keycloak_operator_kustomization" '^[[:space:]]*digest:[[:space:]]sha256:257ee324da2c701b7fc1ed1b2ce0e03979d1bf149952383bdcf6be904ae5b4f3[[:space:]]*$' 1 "Keycloak Operator image must be pinned by digest"
|
||||
assert_regex_count "$keycloak_operator_kustomization" 'github\.com/keycloak/keycloak-k8s-resources/kubernetes' 1 "exactly one Keycloak Operator remote resource is allowed"
|
||||
assert_regex_count "$keycloak_operator_kustomization" '\?ref=' 1 "exactly one pinned remote ref is allowed in the Keycloak Operator root"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user