Skip to content

Commit

Permalink
KCP: fix rollout after upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Feb 16, 2023
1 parent 1a5c13c commit f7fe7da
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion bootstrap/kubeadm/api/v1beta1/kubeadm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ type NodeRegistrationOptions struct {
// "Never". Defaults to "IfNotPresent". This can be used only
// with Kubernetes version equal to 1.22 and later.
// +kubebuilder:validation:Enum=Always;IfNotPresent;Never
// +kubebuilder:default=IfNotPresent
// +optional
ImagePullPolicy string `json:"imagePullPolicy,omitempty"`
}
Expand Down
6 changes: 6 additions & 0 deletions bootstrap/kubeadm/api/v1beta1/kubeadmconfig_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ func DefaultKubeadmConfigSpec(r *KubeadmConfigSpec) {
if r.Format == "" {
r.Format = CloudConfig
}
if r.InitConfiguration != nil && r.InitConfiguration.NodeRegistration.ImagePullPolicy == "" {
r.InitConfiguration.NodeRegistration.ImagePullPolicy = "IfNotPresent"
}
if r.JoinConfiguration != nil && r.JoinConfiguration.NodeRegistration.ImagePullPolicy == "" {
r.JoinConfiguration.NodeRegistration.ImagePullPolicy = "IfNotPresent"
}
}

// +kubebuilder:webhook:verbs=create;update,path=/validate-bootstrap-cluster-x-k8s-io-v1beta1-kubeadmconfig,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=bootstrap.cluster.x-k8s.io,resources=kubeadmconfigs,versions=v1beta1,name=validation.kubeadmconfig.bootstrap.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f7fe7da

Please sign in to comment.