Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Use k8s v1.29.4 as default Kubernetes version #646

Merged
merged 2 commits into from
May 21, 2024
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ For example, the following command will create a Docker cluster with Cilium CNI
```shell
export CLUSTER_NAME=docker-cluster-cilium-helm-addon
export CLUSTER_FILE=examples/capi-quick-start/docker-cluster-cilium-helm-addon.yaml
export KUBERNETES_VERSION=v1.28.7
export KUBERNETES_VERSION=v1.29.4
```

```shell
Expand Down
4 changes: 2 additions & 2 deletions devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"shell": {
"scripts": {
"preview-docs": [
"cd docs && hugo server --buildFuture --buildDrafts"
"make preview-docs"
],
"build-docs": [
"cd docs && hugo --minify --baseURL \"${BASE_URL}\""
"make build-docs"
]
}
}
Expand Down
8 changes: 6 additions & 2 deletions docs/content/getting-started/create-cluster/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,18 @@ And create your cluster:

```shell
clusterctl generate cluster my-cluster \
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/aws-cluster-cilium-helm-addon.yaml | kubectl apply --server-side -f -
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/aws-cluster-cilium-helm-addon.yaml \
--kubernetes-version={{< param "defaultKubernetesVersion" >}} \
--worker-machine-count=1 \
| kubectl apply --server-side -f -
```

To customize your cluster configuration prior to creation, generate the cluster definition to a file and edit it before applying:

```shell
clusterctl generate cluster my-cluster \
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/aws-cluster-cilium-helm-addon.yaml >mycluster.yaml
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/aws-cluster-cilium-helm-addon.yaml \
--kubernetes-version={{< param "defaultKubernetesVersion" >}} >mycluster.yaml

# EDIT mycluster.yaml

Expand Down
8 changes: 6 additions & 2 deletions docs/content/getting-started/create-cluster/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@ Export the required variables and any optional variables that you may want to se

```shell
clusterctl generate cluster my-cluster \
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/docker-cluster-cilium-helm-addon.yaml | kubectl apply --server-side -f -
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/docker-cluster-cilium-helm-addon.yaml \
--kubernetes-version={{< param "defaultKubernetesVersion" >}} \
--worker-machine-count=1 \
| kubectl apply --server-side -f -
```

To customize your cluster configuration prior to creation, generate the cluster definition to a file and edit it before applying:

```shell
clusterctl generate cluster my-cluster \
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/docker-cluster-cilium-helm-addon.yaml >mycluster.yaml
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/docker-cluster-cilium-helm-addon.yaml \
--kubernetes-version={{< param "defaultKubernetesVersion" >}} >mycluster.yaml

# EDIT mycluster.yaml

Expand Down
8 changes: 6 additions & 2 deletions docs/content/getting-started/create-cluster/nutanix.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,18 @@ And create your cluster:

```shell
clusterctl generate cluster my-cluster \
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/nutanix-cluster-cilium-helm-addon.yaml | kubectl apply --server-side -f -
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/nutanix-cluster-cilium-helm-addon.yaml \
--kubernetes-version={{< param "defaultKubernetesVersion" >}} \
--worker-machine-count=1 \
| kubectl apply --server-side -f -
```

To customize your cluster configuration prior to creation, generate the cluster definition to a file and edit it before applying:

```shell
clusterctl generate cluster my-cluster \
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/nutanix-cluster-cilium-helm-addon.yaml >mycluster.yaml
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/nutanix-cluster-cilium-helm-addon.yaml \
--kubernetes-version={{< param "defaultKubernetesVersion" >}} >mycluster.yaml

# EDIT mycluster.yaml

Expand Down
2 changes: 1 addition & 1 deletion docs/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ enable = false
name = "GitHub"
url = "https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix"
icon = "fab fa-github"
desc = "Development takes place here!"
desc = "Development takes place here!"

[[menu.main]]
name = "GitHub"
Expand Down
1 change: 1 addition & 0 deletions make/all.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ include $(INCLUDE_DIR)dev.mk
include $(INCLUDE_DIR)helm.mk
include $(INCLUDE_DIR)examples.mk
include $(INCLUDE_DIR)apis.mk
include $(INCLUDE_DIR)docs.mk
17 changes: 17 additions & 0 deletions make/docs.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2024 Nutanix. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

.PHONY: preview-docs
preview-docs: ## Runs hugo server to locally preview docs
preview-docs: export HUGO_PARAMS_defaultKubernetesVersion ?= $(E2E_DEFAULT_KUBERNETES_VERSION)
preview-docs: ; $(info $(M) running hugo server to locally preview docs)
cd docs && hugo server --buildFuture --buildDrafts

.PHONY: build-docs
build-docs: ## Builds the docs
build-docs: export HUGO_PARAMS_defaultKubernetesVersion ?= $(E2E_DEFAULT_KUBERNETES_VERSION)
build-docs: ; $(info $(M) building docs with hugo)
ifndef BASE_URL
$(error BASE_URL is not set)
endif
cd docs && hugo --minify --baseURL "$(BASE_URL)"
2 changes: 1 addition & 1 deletion make/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ E2E_PARALLEL_NODES ?= $(if $(filter $(E2E_DRYRUN),true),1,$(shell nproc --ignore
E2E_FLAKE_ATTEMPTS ?= 1
E2E_CONF_FILE ?= $(REPO_ROOT)/test/e2e/config/caren.yaml
E2E_CONF_FILE_ENVSUBST ?= $(basename $(E2E_CONF_FILE))-envsubst.yaml
export E2E_DEFAULT_KUBERNETES_VERSION ?= v1.28.7
export E2E_DEFAULT_KUBERNETES_VERSION ?= v1.29.4
ARTIFACTS ?= ${REPO_ROOT}/_artifacts

.PHONY: e2e-test
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/config/caren.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ variables:
# Override Kubernetes version for test workload clusters for specific providers by setting the env variables
# `KUBERNETES_VERSION_<PROVIDER>`, where `<PROVIDER>` is the uppercase provider name, e.g.
# `KUBERNETES_VERSION_DOCKER: v1.29.4`.
KUBERNETES_VERSION_DOCKER: "${KINDEST_IMAGE_TAG}"
# KUBERNETES_VERSION_DOCKER: "${KINDEST_IMAGE_TAG}"
SERVICE_CIDR: "10.128.0.0/12"
POD_CIDR: "192.168.0.0/16"
NODE_DRAIN_TIMEOUT: "60s"
Expand Down
40 changes: 40 additions & 0 deletions test/e2e/coredns_helpers.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//go:build e2e

// Copyright 2024 Nutanix. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package e2e

import (
"context"

appsv1 "k8s.io/api/apps/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
"sigs.k8s.io/cluster-api/test/framework"
)

type WaitForCoreDNSToBeReadyInWorkloadClusterInput struct {
WorkloadCluster *clusterv1.Cluster
ClusterProxy framework.ClusterProxy
DeploymentIntervals []interface{}
}

func WaitForCoreDNSToBeReadyInWorkloadCluster(
jimmidyson marked this conversation as resolved.
Show resolved Hide resolved
ctx context.Context,
input WaitForCoreDNSToBeReadyInWorkloadClusterInput,
) {
workloadClusterClient := input.ClusterProxy.GetWorkloadCluster(
ctx, input.WorkloadCluster.Namespace, input.WorkloadCluster.Name,
).GetClient()

WaitForDeploymentsAvailable(ctx, framework.WaitForDeploymentsAvailableInput{
Getter: workloadClusterClient,
Deployment: &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Name: "coredns",
Namespace: metav1.NamespaceSystem,
},
},
}, input.DeploymentIntervals...)
}
12 changes: 12 additions & 0 deletions test/e2e/quick_start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,18 @@ var _ = Describe("Quick start", Serial, func() {
),
},
)

WaitForCoreDNSToBeReadyInWorkloadCluster(
ctx,
WaitForCoreDNSToBeReadyInWorkloadClusterInput{
WorkloadCluster: workloadCluster,
ClusterProxy: proxy,
DeploymentIntervals: testE2EConfig.GetIntervals(
flavour,
"wait-deployment",
),
},
)
},
}
})
Expand Down
12 changes: 12 additions & 0 deletions test/e2e/self_hosted_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,18 @@ var _ = Describe("Self-hosted", Serial, func() {
),
},
)

WaitForCoreDNSToBeReadyInWorkloadCluster(
ctx,
WaitForCoreDNSToBeReadyInWorkloadClusterInput{
WorkloadCluster: workloadCluster,
ClusterProxy: proxy,
DeploymentIntervals: e2eConfig.GetIntervals(
flavour,
"wait-deployment",
),
},
)
},
}
})
Expand Down
Loading