Skip to content

Commit

Permalink
fix rollout
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Feb 16, 2023
1 parent 8e06060 commit 998f5f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 998f5f3

Please sign in to comment.