Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Update node for kind cluster on CI
Browse files Browse the repository at this point in the history
Signed-off-by: Sneha Chhabria <snchh@microsoft.com>
  • Loading branch information
snehachhabria committed Jul 20, 2021
1 parent 6a113b2 commit 8c742b8
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/nightly-noinstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,28 @@ jobs:
- containerPort: 80
hostPort: 80
protocol: TCP
- role: worker
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- role: worker
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
EOF
cat kind-config.yaml
Expand Down
2 changes: 1 addition & 1 deletion charts/osm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The following table lists the configurable parameters of the osm chart and their
| OpenServiceMesh.enforceSingleMesh | bool | `false` | Enforce only deploying one mesh in the cluster |
| OpenServiceMesh.envoyLogLevel | string | `"error"` | Log level for the Envoy proxy sidecar |
| OpenServiceMesh.featureFlags.enableAsyncProxyServiceMapping | bool | `false` | Enable async proxy-service mapping |
| OpenServiceMesh.featureFlags.enableCRDConverter | bool | `false` | Enable CRD conversion webhook. When enabled, a conversion webhook will be deployed to perform API version conversions for custom resources. |
| OpenServiceMesh.featureFlags.enableCRDConverter | bool | `true` | Enable CRD conversion webhook. When enabled, a conversion webhook will be deployed to perform API version conversions for custom resources. |
| OpenServiceMesh.featureFlags.enableEgressPolicy | bool | `true` | Enable OSM's Egress policy API. When enabled, fine grained control over Egress (external) traffic is enforced |
| OpenServiceMesh.featureFlags.enableIngressBackendPolicy | bool | `false` | Enables OSM's IngressBackend policy API. When enabled, OSM will use the IngressBackend API allow ingress traffic to mesh backends |
| OpenServiceMesh.featureFlags.enableMulticlusterMode | bool | `false` | Enable Multicluster mode. When enabled, multicluster mode will be enabled in OSM |
Expand Down
2 changes: 1 addition & 1 deletion charts/osm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ OpenServiceMesh:
enableValidatingWebhook: false
# -- Enable CRD conversion webhook.
# When enabled, a conversion webhook will be deployed to perform API version conversions for custom resources.
enableCRDConverter: false
enableCRDConverter: true
# -- Enables OSM's IngressBackend policy API.
# When enabled, OSM will use the IngressBackend API allow ingress traffic to mesh backends
enableIngressBackendPolicy: false
Expand Down
4 changes: 4 additions & 0 deletions scripts/kind-with-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ echo "Registry Host: ${reg_host}"
cat <<EOF | kind create cluster --name "${KIND_CLUSTER_NAME}" --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:${reg_port}"]
Expand Down
30 changes: 30 additions & 0 deletions tests/framework/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,34 @@ func (td *OsmTestData) InitTestData(t GinkgoTInterface) error {
{
Role: v1alpha4.ControlPlaneRole,
KubeadmConfigPatches: []string{`kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"`},
ExtraPortMappings: []v1alpha4.PortMapping{
{
ContainerPort: 80,
HostPort: 80,
Protocol: v1alpha4.PortMappingProtocolTCP,
},
},
},
{
Role: v1alpha4.WorkerRole,
KubeadmConfigPatches: []string{`kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"`},
ExtraPortMappings: []v1alpha4.PortMapping{
{
ContainerPort: 80,
HostPort: 80,
Protocol: v1alpha4.PortMappingProtocolTCP,
},
},
},
{
Role: v1alpha4.WorkerRole,
KubeadmConfigPatches: []string{`kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"`},
Expand All @@ -238,6 +266,8 @@ nodeRegistration:
}
if Td.ClusterVersion != "" {
clusterConfig.Nodes[0].Image = fmt.Sprintf("kindest/node:%s", td.ClusterVersion)
clusterConfig.Nodes[1].Image = fmt.Sprintf("kindest/node:%s", td.ClusterVersion)
clusterConfig.Nodes[2].Image = fmt.Sprintf("kindest/node:%s", td.ClusterVersion)
}
if err := td.ClusterProvider.Create(td.ClusterName, cluster.CreateWithV1Alpha4Config(clusterConfig)); err != nil {
return errors.Wrap(err, "failed to create kind cluster")
Expand Down

0 comments on commit 8c742b8

Please sign in to comment.