Skip to content

Commit

Permalink
Align the expectedConfig string with what we got as kind cluster conf…
Browse files Browse the repository at this point in the history
…ig within the cluster_test.go

Signed-off-by: cmoulliard <[email protected]>
  • Loading branch information
cmoulliard committed Oct 18, 2023
1 parent 1415463 commit 30589d9
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions pkg/kind/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,39 @@ func TestGetConfig(t *testing.T) {
}

expectConfig := `# two node (one workers) cluster config
# Kind kubernetes release images https://github.com/kubernetes-sigs/kind/releases
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
endpoint = ["http://idpbuilder-registry:5000"]
nodes:
- role: control-plane
image: "kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1"
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
system-reserved: memory=4Gi
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 8880
protocol: TCP
- containerPort: 443
hostPort: 8443
protocol: TCP
-
- role: worker
image: "kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1"
kubeadmConfigPatches:
- |
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
system-reserved: memory=4Gi`
# Kind kubernetes release images https://github.com/kubernetes-sigs/kind/releases
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5001"]
endpoint = ["http://idpbuilder-testcase-registry:5000"]
nodes:
- role: control-plane
image: "kindest/node:v1.26.3"
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
system-reserved: memory=4Gi
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 8880
protocol: TCP
- containerPort: 443
hostPort: 8443
protocol: TCP
-
- role: worker
image: "kindest/node:v1.26.3"
kubeadmConfigPatches:
- |
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
system-reserved: memory=4Gi`

t.Errorf("Got config: %s", string(cfg))
if diff := cmp.Diff(expectConfig, string(cfg)); diff != "" {
Expand Down

0 comments on commit 30589d9

Please sign in to comment.