Skip to content

Commit eb4f4ec

Browse files
enxebreclaude
andcommitted
NO-JIRA: docs: clarify pull secret in-place update behavior and add CP watches
Clarify HostedCluster.spec.pullSecret API docs to describe the actual in-place update propagation behavior: changing the Secret data without changing the reference does not trigger a NodePool rollout, but on AWS/Azure Replace NodePools the updated credentials still propagate to the guest cluster and kubelet config via the Global Pull Secret DaemonSet path. Add CP pull-secret watches to both the resources and globalps HCCO controllers so in-place Secret updates propagate promptly: - resources controller: reconciles openshift-config/pull-secret - globalps controller: reconciles kube-system/original-pull-secret and the DaemonSet mount path Update global-pull-secret.md to document platform and NodePool eligibility, the positive-selection scheduling model, and the baseline sync behavior when no additional-pull-secret exists. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6daa9ce commit eb4f4ec

24 files changed

Lines changed: 743 additions & 769 deletions

File tree

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ See [docs/content/reference/goals-and-design-invariants.md](docs/content/referen
147147

148148
See [docs/content/reference/versioning-support.md](docs/content/reference/versioning-support.md) for release cycle, version skew policies, and support matrices for the HyperShift Operator, CPO, and other components.
149149

150+
### Pull secret cycling
151+
152+
When changing how workers and the guest cluster authenticate to registries, treat **HostedCluster** `spec.pullSecret`, **management-cluster** Secret data, **HCCO** reconciliation into the data plane, and optional **Global Pull Secret** (`kube-system/additional-pull-secret`) as one system. Changing only the Secret bytes in place does not change `spec.pullSecret` and therefore does not drive a **NodePool** rollout, but controllers can still propagate credentials into the control plane namespace, guest `openshift-config`, `kube-system/original-pull-secret`, and (where the Global Pull Secret DaemonSet is scheduled) kubelet configuration.
153+
154+
See [docs/content/how-to/common/global-pull-secret.md](docs/content/how-to/common/global-pull-secret.md) for behavior, platform and NodePool eligibility (AWS/Azure Replace vs InPlace and other platforms), merge semantics, and operational guidance.
155+
150156
## Dependencies and Modules
151157

152158
This is a Go 1.25+ project using:

api/hypershift/v1beta1/hostedcluster_types.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -674,14 +674,17 @@ type HostedClusterSpec struct {
674674
// pullSecret is a local reference to a Secret that must have a ".dockerconfigjson" key whose content must be a valid Openshift pull secret JSON.
675675
// If the reference is set but none of the above requirements are met, the HostedCluster will enter a degraded state.
676676
// TODO(alberto): Signal this in a condition.
677-
// This pull secret will be part of every payload generated by the controllers for any NodePool of the HostedCluster
678-
// and it will be injected into the container runtime of all NodePools.
679-
// Changing this value will trigger a rollout for all existing NodePools in the cluster.
680-
// Changing the content of the secret inplace will not trigger a rollout and might result in unpredictable behaviour.
677+
// This pull secret is included in NodePool ignition/bootstrap payloads and applied to the container runtime when nodes provision.
678+
// Changing this value will trigger a rollout for all existing NodePools in the cluster (for both replace and inplace upgrade types).
679+
// Updating the referenced Secret's data in place (without changing this reference) does not trigger that rollout.
680+
// In AWS and Azure NodePools using the Replace upgrade strategy, the Secret's data in place changes
681+
// will still propagate the updated credentials down to the guest cluster and kubelet config.
682+
// See https://github.com/openshift/hypershift/blob/3e0e06f78460ac1100dd8432dd7eee4e980a87d0/docs/content/how-to/common/global-pull-secret.md
683+
// for details.
681684
// +required
682685
// +rollout
683686
// TODO(alberto): have our own local reference type to include our opinions and avoid transparent changes.
684-
PullSecret corev1.LocalObjectReference `json:"pullSecret"`
687+
PullSecret corev1.LocalObjectReference `json:"pullSecret,omitzero"`
685688

686689
// sshKey is a local reference to a Secret that must have a "id_rsa.pub" key whose content must be the public part of 1..N SSH keys.
687690
// If the reference is set but none of the above requirements are met, the HostedCluster will enter a degraded state.

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/AAA_ungated.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5690,10 +5690,13 @@ spec:
56905690
description: |-
56915691
pullSecret is a local reference to a Secret that must have a ".dockerconfigjson" key whose content must be a valid Openshift pull secret JSON.
56925692
If the reference is set but none of the above requirements are met, the HostedCluster will enter a degraded state.
5693-
This pull secret will be part of every payload generated by the controllers for any NodePool of the HostedCluster
5694-
and it will be injected into the container runtime of all NodePools.
5695-
Changing this value will trigger a rollout for all existing NodePools in the cluster.
5696-
Changing the content of the secret inplace will not trigger a rollout and might result in unpredictable behaviour.
5693+
This pull secret is included in NodePool ignition/bootstrap payloads and applied to the container runtime when nodes provision.
5694+
Changing this value will trigger a rollout for all existing NodePools in the cluster (for both replace and inplace upgrade types).
5695+
Updating the referenced Secret's data in place (without changing this reference) does not trigger that rollout.
5696+
In AWS and Azure NodePools using the Replace upgrade strategy, the Secret's data in place changes
5697+
will still propagate the updated credentials down to the guest cluster and kubelet config.
5698+
See https://github.com/openshift/hypershift/blob/3e0e06f78460ac1100dd8432dd7eee4e980a87d0/docs/content/how-to/common/global-pull-secret.md
5699+
for details.
56975700
properties:
56985701
name:
56995702
default: ""

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/AutoNodeKarpenter.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5809,10 +5809,13 @@ spec:
58095809
description: |-
58105810
pullSecret is a local reference to a Secret that must have a ".dockerconfigjson" key whose content must be a valid Openshift pull secret JSON.
58115811
If the reference is set but none of the above requirements are met, the HostedCluster will enter a degraded state.
5812-
This pull secret will be part of every payload generated by the controllers for any NodePool of the HostedCluster
5813-
and it will be injected into the container runtime of all NodePools.
5814-
Changing this value will trigger a rollout for all existing NodePools in the cluster.
5815-
Changing the content of the secret inplace will not trigger a rollout and might result in unpredictable behaviour.
5812+
This pull secret is included in NodePool ignition/bootstrap payloads and applied to the container runtime when nodes provision.
5813+
Changing this value will trigger a rollout for all existing NodePools in the cluster (for both replace and inplace upgrade types).
5814+
Updating the referenced Secret's data in place (without changing this reference) does not trigger that rollout.
5815+
In AWS and Azure NodePools using the Replace upgrade strategy, the Secret's data in place changes
5816+
will still propagate the updated credentials down to the guest cluster and kubelet config.
5817+
See https://github.com/openshift/hypershift/blob/3e0e06f78460ac1100dd8432dd7eee4e980a87d0/docs/content/how-to/common/global-pull-secret.md
5818+
for details.
58165819
properties:
58175820
name:
58185821
default: ""

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ClusterUpdateAcceptRisks.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5673,10 +5673,13 @@ spec:
56735673
description: |-
56745674
pullSecret is a local reference to a Secret that must have a ".dockerconfigjson" key whose content must be a valid Openshift pull secret JSON.
56755675
If the reference is set but none of the above requirements are met, the HostedCluster will enter a degraded state.
5676-
This pull secret will be part of every payload generated by the controllers for any NodePool of the HostedCluster
5677-
and it will be injected into the container runtime of all NodePools.
5678-
Changing this value will trigger a rollout for all existing NodePools in the cluster.
5679-
Changing the content of the secret inplace will not trigger a rollout and might result in unpredictable behaviour.
5676+
This pull secret is included in NodePool ignition/bootstrap payloads and applied to the container runtime when nodes provision.
5677+
Changing this value will trigger a rollout for all existing NodePools in the cluster (for both replace and inplace upgrade types).
5678+
Updating the referenced Secret's data in place (without changing this reference) does not trigger that rollout.
5679+
In AWS and Azure NodePools using the Replace upgrade strategy, the Secret's data in place changes
5680+
will still propagate the updated credentials down to the guest cluster and kubelet config.
5681+
See https://github.com/openshift/hypershift/blob/3e0e06f78460ac1100dd8432dd7eee4e980a87d0/docs/content/how-to/common/global-pull-secret.md
5682+
for details.
56805683
properties:
56815684
name:
56825685
default: ""

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ClusterVersionOperatorConfiguration.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5693,10 +5693,13 @@ spec:
56935693
description: |-
56945694
pullSecret is a local reference to a Secret that must have a ".dockerconfigjson" key whose content must be a valid Openshift pull secret JSON.
56955695
If the reference is set but none of the above requirements are met, the HostedCluster will enter a degraded state.
5696-
This pull secret will be part of every payload generated by the controllers for any NodePool of the HostedCluster
5697-
and it will be injected into the container runtime of all NodePools.
5698-
Changing this value will trigger a rollout for all existing NodePools in the cluster.
5699-
Changing the content of the secret inplace will not trigger a rollout and might result in unpredictable behaviour.
5696+
This pull secret is included in NodePool ignition/bootstrap payloads and applied to the container runtime when nodes provision.
5697+
Changing this value will trigger a rollout for all existing NodePools in the cluster (for both replace and inplace upgrade types).
5698+
Updating the referenced Secret's data in place (without changing this reference) does not trigger that rollout.
5699+
In AWS and Azure NodePools using the Replace upgrade strategy, the Secret's data in place changes
5700+
will still propagate the updated credentials down to the guest cluster and kubelet config.
5701+
See https://github.com/openshift/hypershift/blob/3e0e06f78460ac1100dd8432dd7eee4e980a87d0/docs/content/how-to/common/global-pull-secret.md
5702+
for details.
57005703
properties:
57015704
name:
57025705
default: ""

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ExternalOIDC.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6006,10 +6006,13 @@ spec:
60066006
description: |-
60076007
pullSecret is a local reference to a Secret that must have a ".dockerconfigjson" key whose content must be a valid Openshift pull secret JSON.
60086008
If the reference is set but none of the above requirements are met, the HostedCluster will enter a degraded state.
6009-
This pull secret will be part of every payload generated by the controllers for any NodePool of the HostedCluster
6010-
and it will be injected into the container runtime of all NodePools.
6011-
Changing this value will trigger a rollout for all existing NodePools in the cluster.
6012-
Changing the content of the secret inplace will not trigger a rollout and might result in unpredictable behaviour.
6009+
This pull secret is included in NodePool ignition/bootstrap payloads and applied to the container runtime when nodes provision.
6010+
Changing this value will trigger a rollout for all existing NodePools in the cluster (for both replace and inplace upgrade types).
6011+
Updating the referenced Secret's data in place (without changing this reference) does not trigger that rollout.
6012+
In AWS and Azure NodePools using the Replace upgrade strategy, the Secret's data in place changes
6013+
will still propagate the updated credentials down to the guest cluster and kubelet config.
6014+
See https://github.com/openshift/hypershift/blob/3e0e06f78460ac1100dd8432dd7eee4e980a87d0/docs/content/how-to/common/global-pull-secret.md
6015+
for details.
60136016
properties:
60146017
name:
60156018
default: ""

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ExternalOIDCWithUIDAndExtraClaimMappings.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6146,10 +6146,13 @@ spec:
61466146
description: |-
61476147
pullSecret is a local reference to a Secret that must have a ".dockerconfigjson" key whose content must be a valid Openshift pull secret JSON.
61486148
If the reference is set but none of the above requirements are met, the HostedCluster will enter a degraded state.
6149-
This pull secret will be part of every payload generated by the controllers for any NodePool of the HostedCluster
6150-
and it will be injected into the container runtime of all NodePools.
6151-
Changing this value will trigger a rollout for all existing NodePools in the cluster.
6152-
Changing the content of the secret inplace will not trigger a rollout and might result in unpredictable behaviour.
6149+
This pull secret is included in NodePool ignition/bootstrap payloads and applied to the container runtime when nodes provision.
6150+
Changing this value will trigger a rollout for all existing NodePools in the cluster (for both replace and inplace upgrade types).
6151+
Updating the referenced Secret's data in place (without changing this reference) does not trigger that rollout.
6152+
In AWS and Azure NodePools using the Replace upgrade strategy, the Secret's data in place changes
6153+
will still propagate the updated credentials down to the guest cluster and kubelet config.
6154+
See https://github.com/openshift/hypershift/blob/3e0e06f78460ac1100dd8432dd7eee4e980a87d0/docs/content/how-to/common/global-pull-secret.md
6155+
for details.
61536156
properties:
61546157
name:
61556158
default: ""

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ExternalOIDCWithUpstreamParity.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6127,10 +6127,13 @@ spec:
61276127
description: |-
61286128
pullSecret is a local reference to a Secret that must have a ".dockerconfigjson" key whose content must be a valid Openshift pull secret JSON.
61296129
If the reference is set but none of the above requirements are met, the HostedCluster will enter a degraded state.
6130-
This pull secret will be part of every payload generated by the controllers for any NodePool of the HostedCluster
6131-
and it will be injected into the container runtime of all NodePools.
6132-
Changing this value will trigger a rollout for all existing NodePools in the cluster.
6133-
Changing the content of the secret inplace will not trigger a rollout and might result in unpredictable behaviour.
6130+
This pull secret is included in NodePool ignition/bootstrap payloads and applied to the container runtime when nodes provision.
6131+
Changing this value will trigger a rollout for all existing NodePools in the cluster (for both replace and inplace upgrade types).
6132+
Updating the referenced Secret's data in place (without changing this reference) does not trigger that rollout.
6133+
In AWS and Azure NodePools using the Replace upgrade strategy, the Secret's data in place changes
6134+
will still propagate the updated credentials down to the guest cluster and kubelet config.
6135+
See https://github.com/openshift/hypershift/blob/3e0e06f78460ac1100dd8432dd7eee4e980a87d0/docs/content/how-to/common/global-pull-secret.md
6136+
for details.
61346137
properties:
61356138
name:
61366139
default: ""

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/GCPPlatform.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6119,10 +6119,13 @@ spec:
61196119
description: |-
61206120
pullSecret is a local reference to a Secret that must have a ".dockerconfigjson" key whose content must be a valid Openshift pull secret JSON.
61216121
If the reference is set but none of the above requirements are met, the HostedCluster will enter a degraded state.
6122-
This pull secret will be part of every payload generated by the controllers for any NodePool of the HostedCluster
6123-
and it will be injected into the container runtime of all NodePools.
6124-
Changing this value will trigger a rollout for all existing NodePools in the cluster.
6125-
Changing the content of the secret inplace will not trigger a rollout and might result in unpredictable behaviour.
6122+
This pull secret is included in NodePool ignition/bootstrap payloads and applied to the container runtime when nodes provision.
6123+
Changing this value will trigger a rollout for all existing NodePools in the cluster (for both replace and inplace upgrade types).
6124+
Updating the referenced Secret's data in place (without changing this reference) does not trigger that rollout.
6125+
In AWS and Azure NodePools using the Replace upgrade strategy, the Secret's data in place changes
6126+
will still propagate the updated credentials down to the guest cluster and kubelet config.
6127+
See https://github.com/openshift/hypershift/blob/3e0e06f78460ac1100dd8432dd7eee4e980a87d0/docs/content/how-to/common/global-pull-secret.md
6128+
for details.
61266129
properties:
61276130
name:
61286131
default: ""

0 commit comments

Comments
 (0)