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

Cherry-pick PR #382 to release-v1.2 #421

Closed
wants to merge 6 commits into from
Closed
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 .github/workflows/build-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "^1.19"
go-version: "1.21"

- name: Test build
run: make manifests generate fmt vet build
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ SETUP_ENVTEST_BIN := setup-envtest
SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER))
SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest

CONTROLLER_GEN_VER := v0.8.0
CONTROLLER_GEN_VER := v0.14.0
CONTROLLER_GEN_BIN := controller-gen
CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER))
CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen
Expand Down
1 change: 0 additions & 1 deletion api/v1alpha4/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

181 changes: 91 additions & 90 deletions config/crd/bases/infrastructure.cluster.x-k8s.io_nutanixclusters.yaml

Large diffs are not rendered by default.

377 changes: 211 additions & 166 deletions config/crd/bases/infrastructure.cluster.x-k8s.io_nutanixmachines.yaml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ require (
github.com/valyala/fastjson v1.6.3 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.3.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand All @@ -137,4 +137,4 @@ require (
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace golang.org/x/net v0.0.0-20220812174116-3211cb980234 => golang.org/x/net v0.0.0-20220906165146-f3363e06e74c
replace golang.org/x/net => golang.org/x/net v0.17.0
85 changes: 13 additions & 72 deletions go.sum

Large diffs are not rendered by default.

24 changes: 20 additions & 4 deletions templates/base/cluster-with-kcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@ spec:
name: kubeconfig
resources: {}
hostNetwork: true
hostAliases:
- hostnames:
- kubernetes
ip: 127.0.0.1
volumes:
- name: kubeconfig
hostPath:
Expand Down Expand Up @@ -162,8 +158,28 @@ spec:
preKubeadmCommands:
- echo "before kubeadm call" > /var/log/prekubeadm.log
- hostnamectl set-hostname "{{ ds.meta_data.hostname }}"
- echo "::1 ipv6-localhost ipv6-loopback" >/etc/hosts
- echo "127.0.0.1 localhost" >>/etc/hosts
- echo "127.0.0.1 kubernetes" >>/etc/hosts
- echo "127.0.0.1 {{ ds.meta_data.hostname }}" >> /etc/hosts
- |
KUBERNETES_VERSION_NO_V=${KUBERNETES_VERSION#v}
VERSION_TO_COMPARE=1.29.0
if [ "$(printf '%s\n' "$KUBERNETES_VERSION_NO_V" "$VERSION_TO_COMPARE" | sort -V | head -n1)" != "$KUBERNETES_VERSION_NO_V" ]; then
if [ -f /run/kubeadm/kubeadm.yaml ]; then
sed -i 's#path: /etc/kubernetes/admin.conf#path: /etc/kubernetes/super-admin.conf#' /etc/kubernetes/manifests/kube-vip.yaml;
fi
fi
postKubeadmCommands:
- echo export KUBECONFIG=/etc/kubernetes/admin.conf >> /root/.bashrc
- |
KUBERNETES_VERSION_NO_V=${KUBERNETES_VERSION#v}
VERSION_TO_COMPARE=1.29.0
if [ "$(printf '%s\n' "$KUBERNETES_VERSION_NO_V" "$VERSION_TO_COMPARE" | sort -V | head -n1)" != "$KUBERNETES_VERSION_NO_V" ]; then
if [ -f /run/kubeadm/kubeadm.yaml ]; then
sed -i 's#path: /etc/kubernetes/super-admin.conf#path: /etc/kubernetes/admin.conf#' /etc/kubernetes/manifests/kube-vip.yaml;
fi
fi
- echo "after kubeadm call" > /var/log/postkubeadm.log
useExperimentalRetryJoin: true
verbosity: 10
Expand Down
24 changes: 20 additions & 4 deletions templates/cluster-template-ccm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,6 @@ spec:
name: kubeconfig
resources: {}
hostNetwork: true
hostAliases:
- hostnames:
- kubernetes
ip: 127.0.0.1
volumes:
- name: kubeconfig
hostPath:
Expand All @@ -481,10 +477,30 @@ spec:
tls-cipher-suites: ${TLS_CIPHER_SUITES=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256}
postKubeadmCommands:
- echo export KUBECONFIG=/etc/kubernetes/admin.conf >> /root/.bashrc
- |
KUBERNETES_VERSION_NO_V=${KUBERNETES_VERSION#v}
VERSION_TO_COMPARE=1.29.0
if [ "$(printf '%s\n' "$KUBERNETES_VERSION_NO_V" "$VERSION_TO_COMPARE" | sort -V | head -n1)" != "$KUBERNETES_VERSION_NO_V" ]; then
if [ -f /run/kubeadm/kubeadm.yaml ]; then
sed -i 's#path: /etc/kubernetes/super-admin.conf#path: /etc/kubernetes/admin.conf#' /etc/kubernetes/manifests/kube-vip.yaml;
fi
fi
- echo "after kubeadm call" > /var/log/postkubeadm.log
preKubeadmCommands:
- echo "before kubeadm call" > /var/log/prekubeadm.log
- hostnamectl set-hostname "{{ ds.meta_data.hostname }}"
- echo "::1 ipv6-localhost ipv6-loopback" >/etc/hosts
- echo "127.0.0.1 localhost" >>/etc/hosts
- echo "127.0.0.1 kubernetes" >>/etc/hosts
- echo "127.0.0.1 {{ ds.meta_data.hostname }}" >> /etc/hosts
- |
KUBERNETES_VERSION_NO_V=${KUBERNETES_VERSION#v}
VERSION_TO_COMPARE=1.29.0
if [ "$(printf '%s\n' "$KUBERNETES_VERSION_NO_V" "$VERSION_TO_COMPARE" | sort -V | head -n1)" != "$KUBERNETES_VERSION_NO_V" ]; then
if [ -f /run/kubeadm/kubeadm.yaml ]; then
sed -i 's#path: /etc/kubernetes/admin.conf#path: /etc/kubernetes/super-admin.conf#' /etc/kubernetes/manifests/kube-vip.yaml;
fi
fi
useExperimentalRetryJoin: true
users:
- lockPassword: false
Expand Down
24 changes: 20 additions & 4 deletions templates/cluster-template-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1537,10 +1537,6 @@ spec:
name: kubeconfig
resources: {}
hostNetwork: true
hostAliases:
- hostnames:
- kubernetes
ip: 127.0.0.1
volumes:
- name: kubeconfig
hostPath:
Expand All @@ -1561,10 +1557,30 @@ spec:
tls-cipher-suites: ${TLS_CIPHER_SUITES=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256}
postKubeadmCommands:
- echo export KUBECONFIG=/etc/kubernetes/admin.conf >> /root/.bashrc
- |
KUBERNETES_VERSION_NO_V=${KUBERNETES_VERSION#v}
VERSION_TO_COMPARE=1.29.0
if [ "$(printf '%s\n' "$KUBERNETES_VERSION_NO_V" "$VERSION_TO_COMPARE" | sort -V | head -n1)" != "$KUBERNETES_VERSION_NO_V" ]; then
if [ -f /run/kubeadm/kubeadm.yaml ]; then
sed -i 's#path: /etc/kubernetes/super-admin.conf#path: /etc/kubernetes/admin.conf#' /etc/kubernetes/manifests/kube-vip.yaml;
fi
fi
- echo "after kubeadm call" > /var/log/postkubeadm.log
preKubeadmCommands:
- echo "before kubeadm call" > /var/log/prekubeadm.log
- hostnamectl set-hostname "{{ ds.meta_data.hostname }}"
- echo "::1 ipv6-localhost ipv6-loopback" >/etc/hosts
- echo "127.0.0.1 localhost" >>/etc/hosts
- echo "127.0.0.1 kubernetes" >>/etc/hosts
- echo "127.0.0.1 {{ ds.meta_data.hostname }}" >> /etc/hosts
- |
KUBERNETES_VERSION_NO_V=${KUBERNETES_VERSION#v}
VERSION_TO_COMPARE=1.29.0
if [ "$(printf '%s\n' "$KUBERNETES_VERSION_NO_V" "$VERSION_TO_COMPARE" | sort -V | head -n1)" != "$KUBERNETES_VERSION_NO_V" ]; then
if [ -f /run/kubeadm/kubeadm.yaml ]; then
sed -i 's#path: /etc/kubernetes/admin.conf#path: /etc/kubernetes/super-admin.conf#' /etc/kubernetes/manifests/kube-vip.yaml;
fi
fi
useExperimentalRetryJoin: true
users:
- lockPassword: false
Expand Down
24 changes: 20 additions & 4 deletions templates/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,6 @@ spec:
name: kubeconfig
resources: {}
hostNetwork: true
hostAliases:
- hostnames:
- kubernetes
ip: 127.0.0.1
volumes:
- name: kubeconfig
hostPath:
Expand All @@ -228,10 +224,30 @@ spec:
tls-cipher-suites: ${TLS_CIPHER_SUITES=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256}
postKubeadmCommands:
- echo export KUBECONFIG=/etc/kubernetes/admin.conf >> /root/.bashrc
- |
KUBERNETES_VERSION_NO_V=${KUBERNETES_VERSION#v}
VERSION_TO_COMPARE=1.29.0
if [ "$(printf '%s\n' "$KUBERNETES_VERSION_NO_V" "$VERSION_TO_COMPARE" | sort -V | head -n1)" != "$KUBERNETES_VERSION_NO_V" ]; then
if [ -f /run/kubeadm/kubeadm.yaml ]; then
sed -i 's#path: /etc/kubernetes/super-admin.conf#path: /etc/kubernetes/admin.conf#' /etc/kubernetes/manifests/kube-vip.yaml;
fi
fi
- echo "after kubeadm call" > /var/log/postkubeadm.log
preKubeadmCommands:
- echo "before kubeadm call" > /var/log/prekubeadm.log
- hostnamectl set-hostname "{{ ds.meta_data.hostname }}"
- echo "::1 ipv6-localhost ipv6-loopback" >/etc/hosts
- echo "127.0.0.1 localhost" >>/etc/hosts
- echo "127.0.0.1 kubernetes" >>/etc/hosts
- echo "127.0.0.1 {{ ds.meta_data.hostname }}" >> /etc/hosts
- |
KUBERNETES_VERSION_NO_V=${KUBERNETES_VERSION#v}
VERSION_TO_COMPARE=1.29.0
if [ "$(printf '%s\n' "$KUBERNETES_VERSION_NO_V" "$VERSION_TO_COMPARE" | sort -V | head -n1)" != "$KUBERNETES_VERSION_NO_V" ]; then
if [ -f /run/kubeadm/kubeadm.yaml ]; then
sed -i 's#path: /etc/kubernetes/admin.conf#path: /etc/kubernetes/super-admin.conf#' /etc/kubernetes/manifests/kube-vip.yaml;
fi
fi
useExperimentalRetryJoin: true
users:
- lockPassword: false
Expand Down
24 changes: 11 additions & 13 deletions test/e2e/config/nutanix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ variables:
# allowing the same e2e config file to be re-used in different Prow jobs e.g. each one with a K8s version permutation.
# The following Kubernetes versions should be the latest versions with already published kindest/node images.
# This avoids building node images in the default case which improves the test duration significantly.
KUBERNETES_VERSION_MANAGEMENT: "v1.23.6"
KUBERNETES_VERSION_MANAGEMENT: "v1.28.7"
IP_FAMILY: "IPv4"
CLUSTERCTL_LOG_LEVEL: 10
NUTANIX_PROVIDER: "true"
Expand All @@ -226,17 +226,17 @@ variables:
NUTANIX_PORT: "9440"
NUTANIX_INSECURE: true
NUTANIX_ADDITIONAL_TRUST_BUNDLE: ""
KUBERNETES_VERSION: "v1.23.6"
KUBERNETES_VERSION: "v1.28.7"
NUTANIX_SSH_AUTHORIZED_KEY: ""
CONTROL_PLANE_ENDPOINT_IP: ""
CONTROL_PLANE_MACHINE_COUNT: 3
WORKER_MACHINE_COUNT: 3
NUTANIX_PRISM_ELEMENT_CLUSTER_NAME: ""
NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME: "ubuntu-2004-kube-v1.23.8.qcow2"
NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME: "ubuntu-2204-kube-v1.27.7.qcow2"
CONTROL_PLANE_MACHINE_TEMPLATE_UPGRADE_TO: "cluster-upgrade-conformance"
WORKERS_MACHINE_TEMPLATE_UPGRADE_TO: "cluster-upgrade-conformance"
NUTANIX_MACHINE_TEMPLATE_IMAGE_UPGRADE_TO: "ubuntu-2004-kube-v1.24.10.qcow2"
NUTANIX_MACHINE_TEMPLATE_IMAGE_UPGRADE_FROM: "ubuntu-2004-kube-v1.23.8.qcow2"
NUTANIX_MACHINE_TEMPLATE_IMAGE_UPGRADE_TO: "ubuntu-2204-kube-v1.28.7.qcow2"
NUTANIX_MACHINE_TEMPLATE_IMAGE_UPGRADE_FROM: "ubuntu-2204-kube-v1.27.11.qcow2"
NUTANIX_SUBNET_NAME: ""
# NOTE: 'NUTANIX_ADDITIONAL_SUBNET_NAME' is required for multi network interface e2e tests
NUTANIX_ADDITIONAL_SUBNET_NAME: ""
Expand All @@ -247,10 +247,10 @@ variables:
CNI: "./data/cni/kindnet/kindnet.yaml"
EXP_CLUSTER_RESOURCE_SET: "true"
DOCKER_POD_CIDRS: "192.168.0.0/16"
KUBERNETES_VERSION_UPGRADE_TO: "v1.24.10"
KUBERNETES_VERSION_UPGRADE_FROM: "v1.23.6"
ETCD_VERSION_UPGRADE_TO: "3.5.3-0"
COREDNS_VERSION_UPGRADE_TO: "v1.8.6"
KUBERNETES_VERSION_UPGRADE_TO: "v1.28.7"
KUBERNETES_VERSION_UPGRADE_FROM: "v1.27.11"
ETCD_VERSION_UPGRADE_TO: "3.5.6-0"
COREDNS_VERSION_UPGRADE_TO: "v1.10.1"
KUBETEST_CONFIGURATION: "./data/kubetest/conformance.yaml"
# NOTE: Following parameters are required for CSI flavor testing
WEBHOOK_CA: ""
Expand All @@ -263,10 +263,8 @@ variables:
# NOTE: INIT_WITH_BINARY and INIT_WITH_KUBERNETES_VERSION are only used by the clusterctl upgrade test to initialize
# the management cluster to be upgraded.
# NOTE: We test the latest release with a previous contract.
INIT_WITH_BINARY: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.0/clusterctl-{OS}-{ARCH}"
#INIT_WITH_BINARY_V1ALPHA4: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.7/clusterctl-{OS}-{ARCH}"
#INIT_WITH_PROVIDERS_CONTRACT: "v1alpha4"
INIT_WITH_KUBERNETES_VERSION: "v1.23.6"
INIT_WITH_BINARY: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.3.5/clusterctl-{OS}-{ARCH}"
INIT_WITH_KUBERNETES_VERSION: "v1.27.11"

intervals:
default/wait-controllers: ["3m", "10s"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,15 @@ spec:
- apt update
- apt install -y nfs-common open-iscsi lvm2 xfsprogs
- systemctl enable --now iscsid
- echo "::1 ipv6-localhost ipv6-loopback" >/etc/hosts
- echo "127.0.0.1 localhost" >>/etc/hosts
- echo "127.0.0.1 kubernetes" >>/etc/hosts
- echo "127.0.0.1 {{ ds.meta_data.hostname }}" >> /etc/hosts
- |
KUBERNETES_VERSION_NO_V=${KUBERNETES_VERSION#v}
VERSION_TO_COMPARE=1.29.0
if [ "$(printf '%s\n' "$KUBERNETES_VERSION_NO_V" "$VERSION_TO_COMPARE" | sort -V | head -n1)" != "$KUBERNETES_VERSION_NO_V" ]; then
if [ -f /run/kubeadm/kubeadm.yaml ]; then
sed -i 's#path: /etc/kubernetes/admin.conf#path: /etc/kubernetes/super-admin.conf#' /etc/kubernetes/manifests/kube-vip.yaml;
fi
fi
Loading