Sitelet https://github.com/kubernetes/kops/commit/4616ced13552234b170fc61d818449bcf922950c
Skip to content

Commit 4616ced

Browse files
Merge pull request #18601 from hakman/remove-gossip-dns
Remove support for gossip DNS
2 parents 8d3f415 + b645998 commit 4616ced

79 files changed

Lines changed: 264 additions & 2032 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎cmd/kops-controller/controllers/hosts_controller.go‎

Lines changed: 0 additions & 195 deletions
This file was deleted.

‎cmd/kops-controller/main.go‎

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
coordinationv1 "k8s.io/api/coordination/v1"
2626
corev1 "k8s.io/api/core/v1"
2727
"k8s.io/apimachinery/pkg/runtime"
28-
"k8s.io/apimachinery/pkg/types"
2928
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
3029
"k8s.io/klog/v2"
3130
"k8s.io/klog/v2/klogr"
@@ -260,11 +259,6 @@ func main() {
260259
os.Exit(1)
261260
}
262261

263-
if err := addGossipController(mgr, &opt); err != nil {
264-
setupLog.Error(err, "unable to create controller", "controller", "GossipController")
265-
os.Exit(1)
266-
}
267-
268262
// +kubebuilder:scaffold:builder
269263

270264
if opt.CAPI.IsEnabled() {
@@ -390,28 +384,6 @@ func addNodeController(ctx context.Context, mgr manager.Manager, opt *config.Opt
390384
return nil
391385
}
392386

393-
func addGossipController(mgr manager.Manager, opt *config.Options) error {
394-
if opt.Discovery == nil || !opt.Discovery.Enabled {
395-
return nil
396-
}
397-
398-
configMapID := types.NamespacedName{
399-
Namespace: "kube-system",
400-
Name: "coredns",
401-
}
402-
403-
controller, err := controllers.NewHostsReconciler(mgr, opt, configMapID)
404-
if err != nil {
405-
return err
406-
}
407-
408-
if err := controller.SetupWithManager(mgr); err != nil {
409-
return err
410-
}
411-
412-
return nil
413-
}
414-
415387
// Reconciler is the interface for a standard Reconciler.
416388
type Reconciler interface {
417389
SetupWithManager(mgr manager.Manager) error

‎cmd/kops-controller/pkg/config/options.go‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ type Options struct {
3939
// EnableCloudIPAM enables the cloud IPAM controller.
4040
EnableCloudIPAM bool `json:"enableCloudIPAM,omitempty"`
4141

42-
// Discovery configures options relating to discovery, particularly for gossip mode.
43-
Discovery *DiscoveryOptions `json:"discovery,omitempty"`
44-
4542
// CAPI configures Cluster API (CAPI) support.
4643
CAPI *CAPIOptions `json:"capi,omitempty"`
4744
}
@@ -95,9 +92,3 @@ type ServerProviderOptions struct {
9592
Azure *azure.AzureVerifierOptions `json:"azure,omitempty"`
9693
Linode *linode.LinodeVerifierOptions `json:"linode,omitempty"`
9794
}
98-
99-
// DiscoveryOptions configures our support for discovery, particularly gossip DNS (i.e. k8s.local)
100-
type DiscoveryOptions struct {
101-
// Enabled specifies whether support for discovery population is enabled.
102-
Enabled bool `json:"enabled"`
103-
}

‎cmd/kops/create_cluster_integration_test.go‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,6 @@ import (
4444

4545
var MagicTimestamp = metav1.Time{Time: time.Date(2017, 1, 1, 0, 0, 0, 0, time.UTC)}
4646

47-
// TestCreateClusterGossipAWS creates a minimal AWS gossip cluster
48-
func TestCreateClusterGossipAWS(t *testing.T) {
49-
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/gossip-aws", "v1alpha2")
50-
}
51-
52-
// TestCreateClusterGossipAzure creates a minimal Azure gossip cluster
53-
func TestCreateClusterGossipAzure(t *testing.T) {
54-
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/gossip-azure", "v1alpha2")
55-
}
56-
57-
// TestCreateClusterGossipGCE creates a cminimal GCE gossip cluster
58-
func TestCreateClusterGossipGCE(t *testing.T) {
59-
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/gossip-gce", "v1alpha2")
60-
}
61-
62-
// TestCreateClusterGossipHetzner creates a minimal Hetzner gossip cluster
63-
func TestCreateClusterGossipHetzner(t *testing.T) {
64-
t.Setenv("HCLOUD_TOKEN", "REDACTED")
65-
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/gossip-hetzner", "v1alpha2")
66-
}
67-
6847
// TestCreateClusterMinimal runs kops create cluster minimal.example.com --zones us-test-1a
6948
func TestCreateClusterMinimal(t *testing.T) {
7049
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-1.32", "v1alpha2")

‎cmd/kops/integration_test.go‎

Lines changed: 1 addition & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -246,42 +246,6 @@ const (
246246
nodeProblemDetectorAddon = "node-problem-detector.addons.k8s.io-k8s-1.17"
247247
)
248248

249-
// TestMinimalGossipAWS runs the test on a minimum gossip configuration on AWS
250-
func TestMinimalGossipAWS(t *testing.T) {
251-
newIntegrationTest("gossip.k8s.local", "gossip-aws").
252-
withAddons(
253-
awsEBSCSIAddon,
254-
dnsControllerAddon,
255-
awsCCMAddon,
256-
).
257-
runTestTerraformAWS(t)
258-
}
259-
260-
// TestMinimalGossipAzure runs the test on a minimum gossip configuration on Azure
261-
func TestMinimalGossipAzure(t *testing.T) {
262-
newIntegrationTest("gossip.k8s.local", "gossip-azure").
263-
runTestTerraformAzure(t)
264-
}
265-
266-
// TestMinimalGossipGCE runs the test on a minimum gossip configuration on GCE
267-
func TestMinimalGossipGCE(t *testing.T) {
268-
newIntegrationTest("gossip.k8s.local", "gossip-gce").
269-
withAddons(
270-
dnsControllerAddon,
271-
gcpCCMAddon,
272-
gcpPDCSIAddon,
273-
).
274-
runTestTerraformGCE(t)
275-
}
276-
277-
// TestMinimalGossipHetzner runs the test on a minimum gossip configuration on Hetzner
278-
func TestMinimalGossipHetzner(t *testing.T) {
279-
t.Setenv("HCLOUD_TOKEN", "REDACTED")
280-
newIntegrationTest("gossip.k8s.local", "gossip-hetzner").
281-
withAddons(dnsControllerAddon).
282-
runTestTerraformHetzner(t)
283-
}
284-
285249
// TestMinimalAWS runs the test on a minimum configuration, similar to kops create cluster minimal.example.com --zones us-west-1a
286250
func TestMinimalAWS(t *testing.T) {
287251
newIntegrationTest("minimal-aws.example.com", "minimal-aws").
@@ -385,32 +349,6 @@ func TestNvidia(t *testing.T) {
385349
runTestTerraformAWS(t)
386350
}
387351

388-
// TestMinimal runs the test on a minimum gossip configuration
389-
func TestMinimalGossip(t *testing.T) {
390-
newIntegrationTest("minimal.k8s.local", "minimal_gossip").
391-
withAddons(
392-
awsEBSCSIAddon,
393-
dnsControllerAddon,
394-
awsCCMAddon,
395-
).
396-
runTestTerraformAWS(t)
397-
}
398-
399-
// TestMinimal runs the test on a minimum gossip configuration with irsa enabled
400-
func TestMinimalGossipIRSA(t *testing.T) {
401-
newIntegrationTest("minimal.k8s.local", "minimal_gossip_irsa").
402-
withOIDCDiscovery().
403-
withServiceAccountRole("aws-cloud-controller-manager.kube-system", true).
404-
withServiceAccountRole("ebs-csi-controller-sa.kube-system", true).
405-
withServiceAccountRole("aws-node-termination-handler.kube-system", true).
406-
withAddons(
407-
awsEBSCSIAddon,
408-
dnsControllerAddon,
409-
awsCCMAddon,
410-
).
411-
runTestTerraformAWS(t)
412-
}
413-
414352
// TestMinimalGCE runs tests on a minimal GCE configuration
415353
func TestMinimalGCE(t *testing.T) {
416354
newIntegrationTest("minimal-gce.example.com", "minimal_gce").
@@ -517,7 +455,7 @@ func TestMinimalGCEDNSNone(t *testing.T) {
517455
runTestTerraformGCE(t)
518456
}
519457

520-
// TestMinimalScaleway runs tests on a minimal Scaleway cluster with gossip DNS
458+
// TestMinimalScaleway runs tests on a minimal Scaleway cluster
521459
func TestMinimalScaleway(t *testing.T) {
522460
t.Setenv("SCW_PROFILE", "REDACTED")
523461
newIntegrationTest("scw-minimal.k8s.local", "minimal_scaleway").

0 commit comments

Comments
 (0)