Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
mitalipaygude committed Feb 21, 2024
1 parent c6656bc commit 90ef45c
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 1 deletion.
1 change: 0 additions & 1 deletion pkg/executables/kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ func (k *Kind) buildConfigFile() error {
if err != nil {
return fmt.Errorf("creating file for kind config: %v", err)
}
fmt.Printf("\nkind exec config %v\n", k.execConfig.ConfigFile)

k.execConfig.ConfigFile = writtenFileName

Expand Down
32 changes: 32 additions & 0 deletions pkg/executables/kind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ func TestKindCreateBootstrapClusterSuccess(t *testing.T) {
clusterSpec := test.NewClusterSpec(func(s *cluster.Spec) {
s.Cluster.Name = clusterName
s.VersionsBundles["1.19"] = versionBundle
s.Cluster.Spec.ClusterNetwork = v1alpha1.ClusterNetwork{
Pods: v1alpha1.Pods{
CidrBlocks: []string{"1.1.1.1"},
},
Services: v1alpha1.Services{
CidrBlocks: []string{"2.2.2.2"},
},
}

Check failure on line 42 in pkg/executables/kind_test.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with -s standard,default,prefix(github.com/aws/eks-anywhere) (gci)
})
eksClusterName := "test_cluster-eks-a-cluster"
kubeConfigFile := "test_cluster.kind.kubeconfig"
Expand Down Expand Up @@ -176,6 +184,14 @@ func TestKindCreateBootstrapClusterSuccessWithRegistryMirror(t *testing.T) {
},
},
}
s.Cluster.Spec.ClusterNetwork = v1alpha1.ClusterNetwork{
Pods: v1alpha1.Pods{
CidrBlocks: []string{"1.1.1.1"},
},
Services: v1alpha1.Services{
CidrBlocks: []string{"2.2.2.2"},
},
}
}),
env: map[string]string{},
wantKindConfig: "testdata/kind_config_registry_mirror_insecure.yaml",
Expand All @@ -191,6 +207,14 @@ func TestKindCreateBootstrapClusterSuccessWithRegistryMirror(t *testing.T) {
Port: constants.DefaultHttpsPort,
CACertContent: "test",
}
s.Cluster.Spec.ClusterNetwork = v1alpha1.ClusterNetwork{
Pods: v1alpha1.Pods{
CidrBlocks: []string{"1.1.1.1"},
},
Services: v1alpha1.Services{
CidrBlocks: []string{"2.2.2.2"},
},
}
}),
env: map[string]string{},
wantKindConfig: "testdata/kind_config_registry_mirror_with_ca.yaml",
Expand All @@ -216,6 +240,14 @@ func TestKindCreateBootstrapClusterSuccessWithRegistryMirror(t *testing.T) {
},
Authenticate: true,
}
s.Cluster.Spec.ClusterNetwork = v1alpha1.ClusterNetwork{
Pods: v1alpha1.Pods{
CidrBlocks: []string{"1.1.1.1"},
},
Services: v1alpha1.Services{
CidrBlocks: []string{"2.2.2.2"},
},
}
}),
env: map[string]string{},
wantKindConfig: "testdata/kind_config_registry_mirror_with_auth.yaml",
Expand Down
3 changes: 3 additions & 0 deletions pkg/executables/testdata/kind_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
podSubnet: 1.1.1.1
serviceSubnet: 2.2.2.2
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
podSubnet: 1.1.1.1
serviceSubnet: 2.2.2.2
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
Expand Down
3 changes: 3 additions & 0 deletions pkg/executables/testdata/kind_config_extra_port_mappings.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
podSubnet: 1.1.1.1
serviceSubnet: 2.2.2.2
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
podSubnet: 1.1.1.1
serviceSubnet: 2.2.2.2
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
podSubnet: 1.1.1.1
serviceSubnet: 2.2.2.2
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
podSubnet: 1.1.1.1
serviceSubnet: 2.2.2.2
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
Expand Down

0 comments on commit 90ef45c

Please sign in to comment.