mirror of https://github.com/kubernetes/kops.git
Rename NeedUpdate struct to NeedsRollingUpdate
This commit is contained in:
parent
2659a30280
commit
f4e3dd3e26
|
|
@ -63,10 +63,10 @@ type AddonSpec struct {
|
|||
// switch kubernetes versions.
|
||||
Id string `json:"id,omitempty"`
|
||||
|
||||
// NeedUpdate determines if we should mark nodes as needing an update.
|
||||
// NeedsRollingUpdate determines if we should mark nodes as needing an update.
|
||||
// Legal values are control-plane, workers, and all
|
||||
// Empty value means no update needed
|
||||
NeedUpdate string `json:"needsRollingUpdate,omitempty"`
|
||||
NeedsRollingUpdate string `json:"needsRollingUpdate,omitempty"`
|
||||
}
|
||||
|
||||
func (a *Addons) Verify() error {
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ func (a *Addon) EnsureUpdated(ctx context.Context, k8sClient kubernetes.Interfac
|
|||
return nil, fmt.Errorf("error applying update from %q: %v", manifestURL, err)
|
||||
}
|
||||
|
||||
if a.Spec.NeedUpdate != "" {
|
||||
if a.Spec.NeedsRollingUpdate != "" {
|
||||
err = a.AddNeedsUpdateLabel(ctx, k8sClient)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error adding needs-update label: %v", err)
|
||||
|
|
@ -166,9 +166,9 @@ func (a *Addon) EnsureUpdated(ctx context.Context, k8sClient kubernetes.Interfac
|
|||
}
|
||||
|
||||
func (a *Addon) AddNeedsUpdateLabel(ctx context.Context, k8sClient kubernetes.Interface) error {
|
||||
klog.Infof("addon %v wants to roll %v nodes", a.Name, a.Spec.NeedUpdate)
|
||||
klog.Infof("addon %v wants to update %v nodes", a.Name, a.Spec.NeedsRollingUpdate)
|
||||
selector := ""
|
||||
switch a.Spec.NeedUpdate {
|
||||
switch a.Spec.NeedsRollingUpdate {
|
||||
case "control-plane":
|
||||
selector = "node-role.kubernetes.io/master="
|
||||
case "worker":
|
||||
|
|
|
|||
|
|
@ -877,12 +877,12 @@ func (b *BootstrapChannelBuilder) buildAddons(c *fi.ModelBuilderContext) (*chann
|
|||
location := key + "/" + id + "-v1.8.yaml"
|
||||
|
||||
addons.Spec.Addons = append(addons.Spec.Addons, &channelsapi.AddonSpec{
|
||||
Name: fi.String(key),
|
||||
Version: fi.String(version),
|
||||
Selector: networkingSelector,
|
||||
Manifest: fi.String(location),
|
||||
Id: id,
|
||||
NeedUpdate: "all",
|
||||
Name: fi.String(key),
|
||||
Version: fi.String(version),
|
||||
Selector: networkingSelector,
|
||||
Manifest: fi.String(location),
|
||||
Id: id,
|
||||
NeedsRollingUpdate: "all",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue