Sitelet https://github.com/kubernetes/kops/pull/18650/files
Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 1 addition & 5 deletions pkg/apis/nodeup/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ type Config struct {
Openstack *kops.OpenstackSpec `json:",omitempty"`

// Discovery methods
// UsesLegacyGossip is retained for nodeup config wire compatibility.
// Deprecated: gossip DNS support was removed in kOps 1.37.
UsesLegacyGossip bool `json:"usesLegacyGossip"`
UsesNoneDNS bool `json:"usesNoneDNS"`
UsesNoneDNS bool `json:"usesNoneDNS"`

// DiscoveryService implements discovery using a hosted discovery service.
DiscoveryService *DiscoveryServiceOptions `json:"discoveryServiceWithUniverse,omitempty"`
Expand Down Expand Up @@ -249,7 +246,6 @@ func NewConfig(cluster *kops.Cluster, instanceGroup *kops.InstanceGroup) (*Confi
VolumeMounts: instanceGroup.Spec.VolumeMounts,
FileAssets: append(filterFileAssets(instanceGroup.Spec.FileAssets, role), filterFileAssets(cluster.Spec.FileAssets, role)...),
Hooks: [][]kops.HookSpec{igHooks, clusterHooks},
UsesLegacyGossip: cluster.UsesLegacyGossip(),
UsesNoneDNS: cluster.UsesNoneDNS(),
}

Expand Down
2 changes: 0 additions & 2 deletions pkg/assets/mirrors.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ func (m *mirrorConfig) findMirrors(u string) ([]string, bool) {
suffix = strings.ReplaceAll(suffix, "/", "-")
suffix = strings.ReplaceAll(suffix, "linux-amd64-nodeup", "nodeup-linux-amd64")
suffix = strings.ReplaceAll(suffix, "linux-arm64-nodeup", "nodeup-linux-arm64")
suffix = strings.ReplaceAll(suffix, "linux-amd64-protokube", "protokube-linux-amd64")
suffix = strings.ReplaceAll(suffix, "linux-arm64-protokube", "protokube-linux-arm64")
}

mirrors = append(mirrors, mirror+suffix)
Expand Down
2 changes: 1 addition & 1 deletion pkg/model/tests/data/bootstrapscript_0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ cat > conf/kube_env.yaml << '__EOF_KUBE_ENV'
CloudProvider: aws
InstanceGroupName: testIG
InstanceGroupRole: ControlPlane
NodeupConfigHash: fAxvqbU++fBpT6SIjMMeXWlQ4oHqL/M8N7AaaJkOPOM=
NodeupConfigHash: PAsanfC0j/cnB+GgX3aV1aXBGFK7vYddRpJ2ZBTotO0=

__EOF_KUBE_ENV

Expand Down
2 changes: 1 addition & 1 deletion pkg/model/tests/data/bootstrapscript_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ cat > conf/kube_env.yaml << '__EOF_KUBE_ENV'
CloudProvider: aws
InstanceGroupName: testIG
InstanceGroupRole: ControlPlane
NodeupConfigHash: N0d3Il7CeGYFi32ZDb4i3iftzUD6swJ3F/tZf8d1bZY=
NodeupConfigHash: /xicRZCxNOwNU9MLpHkw2F+ehPH1Sb6ZTdADbaK5SK8=

__EOF_KUBE_ENV

Expand Down
2 changes: 1 addition & 1 deletion pkg/model/tests/data/bootstrapscript_2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ cat > conf/kube_env.yaml << '__EOF_KUBE_ENV'
CloudProvider: aws
InstanceGroupName: testIG
InstanceGroupRole: ControlPlane
NodeupConfigHash: N0d3Il7CeGYFi32ZDb4i3iftzUD6swJ3F/tZf8d1bZY=
NodeupConfigHash: /xicRZCxNOwNU9MLpHkw2F+ehPH1Sb6ZTdADbaK5SK8=

__EOF_KUBE_ENV

Expand Down
2 changes: 1 addition & 1 deletion pkg/model/tests/data/bootstrapscript_3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ cat > conf/kube_env.yaml << '__EOF_KUBE_ENV'
CloudProvider: aws
InstanceGroupName: testIG
InstanceGroupRole: Node
NodeupConfigHash: X6Di6WM7EcwYaitdtxqgDgb2VjQuX4gHgLLPBZUb6Hw=
NodeupConfigHash: YON2zMNoXwpE+lTFwFYUD/m0YDM1OK3dZg0CrkiDwOk=

__EOF_KUBE_ENV

Expand Down
2 changes: 1 addition & 1 deletion pkg/model/tests/data/bootstrapscript_4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ cat > conf/kube_env.yaml << '__EOF_KUBE_ENV'
CloudProvider: aws
InstanceGroupName: testIG
InstanceGroupRole: Node
NodeupConfigHash: FOtsEbu1CrMgt9fSSoK3X+UvdHnVKS4MmNRxjGmd40c=
NodeupConfigHash: QM7lk2xF0ReCBa8G5hnxrxZUVSK9nnCTZLSAc+YPXlw=

__EOF_KUBE_ENV

Expand Down
2 changes: 1 addition & 1 deletion pkg/model/tests/data/bootstrapscript_5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ cat > conf/kube_env.yaml << '__EOF_KUBE_ENV'
CloudProvider: aws
InstanceGroupName: testIG
InstanceGroupRole: Node
NodeupConfigHash: FOtsEbu1CrMgt9fSSoK3X+UvdHnVKS4MmNRxjGmd40c=
NodeupConfigHash: QM7lk2xF0ReCBa8G5hnxrxZUVSK9nnCTZLSAc+YPXlw=

__EOF_KUBE_ENV

Expand Down
1 change: 0 additions & 1 deletion pkg/model/tests/data/nodeupconfig_0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ UpdatePolicy: automatic
configStore: {}
containerdConfig:
logLevel: info
usesLegacyGossip: false
usesNoneDNS: false
1 change: 0 additions & 1 deletion pkg/model/tests/data/nodeupconfig_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,4 @@ UpdatePolicy: automatic
configStore: {}
containerdConfig:
logLevel: info
usesLegacyGossip: false
usesNoneDNS: false
1 change: 0 additions & 1 deletion pkg/model/tests/data/nodeupconfig_2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,4 @@ UpdatePolicy: automatic
configStore: {}
containerdConfig:
logLevel: info
usesLegacyGossip: false
usesNoneDNS: false
1 change: 0 additions & 1 deletion pkg/model/tests/data/nodeupconfig_3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ Networking:
UpdatePolicy: automatic
containerdConfig:
logLevel: info
usesLegacyGossip: false
usesNoneDNS: false
1 change: 0 additions & 1 deletion pkg/model/tests/data/nodeupconfig_4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@ Networking:
UpdatePolicy: automatic
containerdConfig:
logLevel: info
usesLegacyGossip: false
usesNoneDNS: false
1 change: 0 additions & 1 deletion pkg/model/tests/data/nodeupconfig_5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@ Networking:
UpdatePolicy: automatic
containerdConfig:
logLevel: info
usesLegacyGossip: false
usesNoneDNS: false
22 changes: 0 additions & 22 deletions pkg/nodemodel/nodeupconfigbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
"k8s.io/kops/pkg/apis/nodeup"
"k8s.io/kops/pkg/assets"
"k8s.io/kops/pkg/model"
"k8s.io/kops/pkg/nodemodel/wellknownassets"
"k8s.io/kops/pkg/wellknownports"
"k8s.io/kops/pkg/wellknownservices"
"k8s.io/kops/upup/pkg/fi"
Expand All @@ -47,7 +46,6 @@ type nodeUpConfigBuilder struct {
cluster *kops.Cluster
etcdManifests map[string][]string
images map[kops.InstanceGroupRole]map[architectures.Architecture][]*nodeup.Image
protokubeAsset map[architectures.Architecture][]*assets.MirroredAsset
encryptionConfigSecretHash string
}

Expand All @@ -62,15 +60,6 @@ func NewNodeUpConfigBuilder(cluster *kops.Cluster, assetBuilder *assets.AssetBui

etcdManifests := map[string][]string{}
images := map[kops.InstanceGroupRole]map[architectures.Architecture][]*nodeup.Image{}
protokubeAsset := map[architectures.Architecture][]*assets.MirroredAsset{}

for _, arch := range architectures.GetSupported() {
asset, err := wellknownassets.ProtokubeAsset(assetBuilder, arch)
if err != nil {
return nil, err
}
protokubeAsset[arch] = append(protokubeAsset[arch], asset)
}

for _, role := range kops.AllInstanceGroupRoles {
isMaster := role.HasControlPlane()
Expand Down Expand Up @@ -177,7 +166,6 @@ func NewNodeUpConfigBuilder(cluster *kops.Cluster, assetBuilder *assets.AssetBui
cluster: cluster,
etcdManifests: etcdManifests,
images: images,
protokubeAsset: protokubeAsset,
encryptionConfigSecretHash: encryptionConfigSecretHash,
}

Expand Down Expand Up @@ -371,16 +359,6 @@ func (n *nodeUpConfigBuilder) BuildConfig(ig *kops.InstanceGroup, wellKnownAddre
}
}

// Keep protokube in control-plane nodeup configs temporarily to avoid changing
// their config hashes. No nodeup model task installs or runs the binary.
if isMaster {
for _, arch := range architectures.GetSupported() {
for _, asset := range n.protokubeAsset[arch] {
config.Assets[arch] = append(config.Assets[arch], asset.CompactString())
}
}
}

useConfigServer := !ig.HasAPIServer()
if useConfigServer {
bootConfig.ConfigServer = buildConfigServerOptions(cluster.ObjectMeta.Name, config.CAs[fi.CertificateIDCA], bootConfig.APIServerIPs)
Expand Down
23 changes: 0 additions & 23 deletions pkg/nodemodel/wellknownassets/kopsassets.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ var kopsBaseURL *url.URL
// nodeUpAsset caches the nodeup binary download url/hash
var nodeUpAsset map[architectures.Architecture]*assets.MirroredAsset

// protokubeAsset caches the protokube binary download url/hash.
var protokubeAsset map[architectures.Architecture]*assets.MirroredAsset

// BaseURL returns the base url for the distribution of kops - in particular for nodeup & docker images
func Baseurl() (*url.URL, error) {
// returning cached value
Expand Down Expand Up @@ -106,26 +103,6 @@ func NodeUpAsset(assetsBuilder *assets.AssetBuilder, arch architectures.Architec
return nodeUpAsset[arch], nil
}

// ProtokubeAsset returns the URL and hash of the protokube binary.
func ProtokubeAsset(assetsBuilder *assets.AssetBuilder, arch architectures.Architecture) (*assets.MirroredAsset, error) {
if protokubeAsset == nil {
protokubeAsset = make(map[architectures.Architecture]*assets.MirroredAsset)
}
if protokubeAsset[arch] != nil {
klog.V(8).Infof("Using cached protokube binary location for %s: %v", arch, protokubeAsset[arch].Locations)
return protokubeAsset[arch], nil
}

asset, err := KopsFileurl(/sitelet?url=https%3A%2F%2Fgithub.com%2Fkubernetes%2Fkops%2Fpull%2F18650%2Ffmt.Sprintf%28%26quot%3Blinux%2F%25s%2Fprotokube%26quot%3B%2C%2520arch), assetsBuilder)
if err != nil {
return nil, err
}
protokubeAsset[arch] = assets.BuildMirroredAsset(asset)
klog.V(8).Infof("Using default protokube location for %s: %q", arch, asset.DownloadURL.String())

return protokubeAsset[arch], nil
}

// KopsFileURL returns the base url for the distribution of kops - in particular for nodeup & docker images
func KopsFileurl(/sitelet?url=https%3A%2F%2Fgithub.com%2Fkubernetes%2Fkops%2Fpull%2F18650%2Ffile%2520string%2C%2520assetBuilder%2520*assets.AssetBuilder) (*assets.FileAsset, error) {
base, err := Baseurl()
Expand Down
52 changes: 0 additions & 52 deletions tests/e2e/scenarios/upgrade-ab-gossip/run-test.sh

This file was deleted.

98 changes: 0 additions & 98 deletions tests/integration/create_cluster/gossip-aws/expected-v1alpha2.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions tests/integration/create_cluster/gossip-aws/options.yaml

This file was deleted.

Loading
Loading