Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove _kubernetes_master tag #5623

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion nodeup/pkg/model/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ type NodeupModelContext struct {
Cluster *kops.Cluster
Distribution distros.Distribution
InstanceGroup *kops.InstanceGroup
IsMaster bool
KeyStore fi.CAStore
NodeupConfig *nodeup.Config
SecretStore fi.SecretStore

// IsMaster is true if the InstanceGroup has a role of master (populated by Init)
IsMaster bool

kubernetesVersion semver.Version
}

Expand All @@ -58,6 +60,12 @@ func (c *NodeupModelContext) Init() error {
}
c.kubernetesVersion = *k8sVersion

if c.InstanceGroup == nil {
glog.Warningf("cannot determine role, InstanceGroup not set")
} else if c.InstanceGroup.Spec.Role == kops.InstanceGroupRoleMaster {
c.IsMaster = true
}

return nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ Resources.AWSAutoScalingLaunchConfigurationmasterustest1bmastersadditionalcidrex
Tags:
- _automatic_upgrades
- _aws
- _kubernetes_master
channels:
- memfs://clusters.example.com/additionalcidr.example.com/addons/bootstrap-channel.yaml
protokubeImage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ Resources.AWSAutoScalingLaunchConfigurationmasterustest1amastersadditionaluserda
Tags:
- _automatic_upgrades
- _aws
- _kubernetes_master
channels:
- memfs://clusters.example.com/additionaluserdata.example.com/addons/bootstrap-channel.yaml
protokubeImage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ Resources.AWSAutoScalingLaunchConfigurationmasterustest1amastersminimalexampleco
Tags:
- _automatic_upgrades
- _aws
- _kubernetes_master
channels:
- memfs://clusters.example.com/minimal.example.com/addons/bootstrap-channel.yaml
protokubeImage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ InstanceGroupName: master-us-west-2a
Tags:
- _automatic_upgrades
- _aws
- _kubernetes_master
- _networking_cni
channels:
- s3://tune-k8s-kops-test/k8s-iam.us-west-2.td.priv/addons/bootstrap-channel.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ Resources.AWSAutoScalingLaunchConfigurationmasterustest1amastersexternallbexampl
Tags:
- _automatic_upgrades
- _aws
- _kubernetes_master
channels:
- memfs://clusters.example.com/externallb.example.com/addons/bootstrap-channel.yaml
protokubeImage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ Resources.AWSAutoScalingLaunchConfigurationmasterustest1amastersminimalexampleco
Tags:
- _automatic_upgrades
- _aws
- _kubernetes_master
channels:
- memfs://clusters.example.com/minimal.example.com/addons/bootstrap-channel.yaml
protokubeImage:
Expand Down
14 changes: 0 additions & 14 deletions upup/pkg/fi/cloudup/tagbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,6 @@ func buildCloudupTags(cluster *api.Cluster) (sets.String, error) {
func buildNodeupTags(role api.InstanceGroupRole, cluster *api.Cluster, clusterTags sets.String) (sets.String, error) {
tags := sets.NewString()

switch role {
case api.InstanceGroupRoleNode:
// No tags

case api.InstanceGroupRoleMaster:
tags.Insert("_kubernetes_master")

case api.InstanceGroupRoleBastion:
// No tags

default:
return nil, fmt.Errorf("Unrecognized role: %v", role)
}

switch fi.StringValue(cluster.Spec.UpdatePolicy) {
case "": // default
tags.Insert("_automatic_upgrades")
Expand Down
3 changes: 0 additions & 3 deletions upup/pkg/fi/nodeup/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ import (
// MaxTaskDuration is the amount of time to keep trying for; we retry for a long time - there is not really any great fallback
const MaxTaskDuration = 365 * 24 * time.Hour

const TagMaster = "_kubernetes_master"

// NodeUpCommand the configiruation for nodeup
type NodeUpCommand struct {
CacheDir string
Expand Down Expand Up @@ -183,7 +181,6 @@ func (c *NodeUpCommand) Run(out io.Writer) error {
Cluster: c.cluster,
Distribution: distribution,
InstanceGroup: c.instanceGroup,
IsMaster: nodeTags.Has(TagMaster),
NodeupConfig: c.config,
}

Expand Down