diff --git a/Dockerfile b/Dockerfile index ab00e5b..081c417 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN apt-get update && apt-get upgrade -y --no-install-recommends \ # Layers used for building/downloading/installing tools FROM baseline as tool_builder ARG HELM_VERSION=3.14.2 -ARG KUBECTL_VERSION=1.27.11 +ARG KUBECTL_VERSION=1.28.7 ARG TERRAFORM_VERSION=1.7.4-* WORKDIR /build diff --git a/docs/CONFIG-VARS.md b/docs/CONFIG-VARS.md index a3a4328..8aaecad 100644 --- a/docs/CONFIG-VARS.md +++ b/docs/CONFIG-VARS.md @@ -69,7 +69,7 @@ Terraform input variables can be set in the following ways: | Name | Description | Type | Default | Notes | | :--- | :--- | :--- | :--- | :--- | -| cluster_version | Kubernetes version | string | "1.27.11" | Valid values are listed here: [SAS Viya platform Supported Kubernetes Versions](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=itopssr&docsetTarget=n1ika6zxghgsoqn1mq4bck9dx695.htm#p03v0o4maa8oidn1awe0w4xlxcf6). | +| cluster_version | Kubernetes version | string | "1.28.7" | Valid values are listed here: [SAS Viya platform Supported Kubernetes Versions](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=itopssr&docsetTarget=n1ika6zxghgsoqn1mq4bck9dx695.htm#p03v0o4maa8oidn1awe0w4xlxcf6). | | cluster_cni | Kubernetes container network interface (CNI) | string | "calico" | | | cluster_cni_version | Kubernetes Container Network Interface (CNI) Version | string | "3.27.2" | | | cluster_cri | Kubernetes container runtime interface (CRI) | string | "containerd" | | @@ -353,7 +353,7 @@ The following variables are used to describe the machine targets for the SAS Viy | prefix | A prefix used in the names of all the resources created by this script | string | | | | deployment_type | Type of deployment to be performed | string | "bare_metal" | Specify `bare_metal` or `vsphere`. | | kubernetes_cluster_name | Cluster name | string | "{{ prefix }}-oss" | This item is auto-filled. **ONLY** change the `prefix` value described previously. | -| kubernetes_version | Kubernetes version | string | "1.27.11" | Valid values are listed here: [Kubernetes Releases](https://kubernetes.io/releases/). | +| kubernetes_version | Kubernetes version | string | "1.28.7" | Valid values are listed here: [Kubernetes Releases](https://kubernetes.io/releases/). | | kubernetes_upgrade_allowed | | bool | true | **NOTE:** Not currently used. | | kubernetes_arch | | string | "{{ vm_arch }}" | This item is auto-filled. **ONLY** change the `vm_arch` value described previously. | | kubernetes_cni | Kubernetes Container Network Interface (CNI) | string | "calico" | | diff --git a/docs/REQUIREMENTS.md b/docs/REQUIREMENTS.md index a73dd16..31ca410 100644 --- a/docs/REQUIREMENTS.md +++ b/docs/REQUIREMENTS.md @@ -203,7 +203,7 @@ vsphere_network = "" # Name of the network to to use for the VMs system_ssh_keys_dir = "~/.ssh" # Directory holding public keys to be used on each machine # Kubernetes - Cluster -cluster_version = "1.27.11" # Kubernetes version +cluster_version = "1.28.7" # Kubernetes version cluster_cni = "calico" # Kubernetes Container Network Interface (CNI) cluster_cni_version = "3.27.2" # Kubernetes Container Network Interface (CNI) Version cluster_cri = "containerd" # Kubernetes Container Runtime Interface (CRI) diff --git a/docs/user/Dependencies.md b/docs/user/Dependencies.md index a43814d..e171224 100644 --- a/docs/user/Dependencies.md +++ b/docs/user/Dependencies.md @@ -53,7 +53,7 @@ Example of using build arguments to control specific versions of dependencies in ```bash # Override kubectl version docker build \ - --build-arg KUBECTL_VERSION=1.27.11 \ + --build-arg KUBECTL_VERSION=1.28.7 \ -t viya4-iac-k8s . ``` diff --git a/examples/vsphere/sample-terraform-dhcp.tfvars b/examples/vsphere/sample-terraform-dhcp.tfvars index 5c15b52..fc6080e 100644 --- a/examples/vsphere/sample-terraform-dhcp.tfvars +++ b/examples/vsphere/sample-terraform-dhcp.tfvars @@ -18,7 +18,7 @@ vsphere_network = "" # Name of the network to to use for the VMs system_ssh_keys_dir = "~/.ssh/oss" # Directory holding public keys to be used on each system # Kubernetes - Cluster -cluster_version = "1.27.11" # Kubernetes Version +cluster_version = "1.28.7" # Kubernetes Version cluster_cni = "calico" # Kubernetes Container Network Interface (CNI) cluster_cni_version = "3.27.2" # Kubernetes Container Network Interface (CNI) Version cluster_cri = "containerd" # Kubernetes Container Runtime Interface (CRI) diff --git a/examples/vsphere/sample-terraform-minimal.tfvars b/examples/vsphere/sample-terraform-minimal.tfvars index d45063c..724ed3b 100644 --- a/examples/vsphere/sample-terraform-minimal.tfvars +++ b/examples/vsphere/sample-terraform-minimal.tfvars @@ -18,7 +18,7 @@ vsphere_network = "" # Name of the network to to use for the VMs system_ssh_keys_dir = "~/.ssh/oss" # Directory holding public keys to be used on each system # Kubernetes - Cluster -cluster_version = "1.27.11" # Kubernetes Version +cluster_version = "1.28.7" # Kubernetes Version cluster_cni = "calico" # Kubernetes Container Network Interface (CNI) cluster_cni_version = "3.27.2" # Kubernetes Container Network Interface (CNI) Version cluster_cri = "containerd" # Kubernetes Container Runtime Interface (CRI) diff --git a/examples/vsphere/sample-terraform-static-ips.tfvars b/examples/vsphere/sample-terraform-static-ips.tfvars index a9effc3..1fa50ce 100644 --- a/examples/vsphere/sample-terraform-static-ips.tfvars +++ b/examples/vsphere/sample-terraform-static-ips.tfvars @@ -18,7 +18,7 @@ vsphere_network = "" # Name of the network to to use for the VMs system_ssh_keys_dir = "~/.ssh/oss" # Directory holding public keys to be used on each system # Kubernetes - Cluster -cluster_version = "1.27.11" # Kubernetes Version +cluster_version = "1.28.7" # Kubernetes Version cluster_cni = "calico" # Kubernetes Container Network Interface (CNI) cluster_cni_version = "3.27.2" # Kubernetes Container Network Interface (CNI) Version cluster_cri = "containerd" # Kubernetes Container Runtime Interface (CRI) diff --git a/examples/vsphere/sample-terraform-static-singlestore.tfvars b/examples/vsphere/sample-terraform-static-singlestore.tfvars index e27b1a9..429e824 100644 --- a/examples/vsphere/sample-terraform-static-singlestore.tfvars +++ b/examples/vsphere/sample-terraform-static-singlestore.tfvars @@ -18,7 +18,7 @@ vsphere_network = "" # Name of the network to to use for the VMs system_ssh_keys_dir = "~/.ssh/oss" # Directory holding public keys to be used on each system # Kubernetes - Cluster -cluster_version = "1.27.11" # Kubernetes Version +cluster_version = "1.28.7" # Kubernetes Version cluster_cni = "calico" # Kubernetes Container Network Interface (CNI) cluster_cni_version = "3.27.2" # Kubernetes Container Network Interface (CNI) Version cluster_cri = "containerd" # Kubernetes Container Runtime Interface (CRI) diff --git a/examples/vsphere/sample-terraform-vi.tfvars b/examples/vsphere/sample-terraform-vi.tfvars index fde1002..4028e37 100644 --- a/examples/vsphere/sample-terraform-vi.tfvars +++ b/examples/vsphere/sample-terraform-vi.tfvars @@ -18,7 +18,7 @@ vsphere_network = "" # Name of the network to to use for the VMs system_ssh_keys_dir = "~/.ssh/oss" # Directory holding public keys to be used on each system # Kubernetes - Cluster -cluster_version = "1.27.11" # Kubernetes Version +cluster_version = "1.28.7" # Kubernetes Version cluster_cni = "calico" # Kubernetes Container Network Interface (CNI) cluster_cni_version = "3.27.2" # Kubernetes Container Network Interface (CNI) Version cluster_cri = "containerd" # Kubernetes Container Runtime Interface (CRI) diff --git a/roles/kubernetes/control_plane/init/primary/tasks/main.yaml b/roles/kubernetes/control_plane/init/primary/tasks/main.yaml index b9ede3f..2b14d4a 100644 --- a/roles/kubernetes/control_plane/init/primary/tasks/main.yaml +++ b/roles/kubernetes/control_plane/init/primary/tasks/main.yaml @@ -13,12 +13,36 @@ - install - update +# Workaround for https://github.com/kube-vip/kube-vip/issues/684 will be removed once +# kube-vip releases a version with this fixed. +- name: Update kube-vip.yaml to use super-admin.conf for kubeadm init in 1.29+ + ansible.builtin.replace: + path: /etc/kubernetes/manifests/kube-vip.yaml + regexp: "path: /etc/kubernetes/admin.conf" + replace: "path: /etc/kubernetes/super-admin.conf" + when: kubernetes_version is version("1.29.0", "ge", version_type="semver") + tags: + - install + - update + # TODO: pod-network-cidr can conflict locally check with IT to ensure correct range. - name: Run kubeadm init ansible.builtin.command: kubeadm init --config /etc/kubernetes/kubeadm-config.yaml --upload-certs tags: - install +# Workaround for https://github.com/kube-vip/kube-vip/issues/684 will be removed once +# kube-vip releases a version with this fixed. +- name: Restore kube-vip.yaml to use admin.conf for kubeadm init in 1.29+ + ansible.builtin.replace: + path: /etc/kubernetes/manifests/kube-vip.yaml + regexp: "path: /etc/kubernetes/super-admin.conf" + replace: "path: /etc/kubernetes/admin.conf" + when: kubernetes_version is version("1.29.0", "ge", version_type="semver") + tags: + - install + - update + - name: Setup kubernetes .kube directory ansible.builtin.file: path: ~/.kube diff --git a/variables.tf b/variables.tf index ad5cb38..2ff2ce2 100644 --- a/variables.tf +++ b/variables.tf @@ -297,7 +297,7 @@ variable "cluster_domain" { variable "cluster_version" { type = string - default = "1.27.11" + default = "1.28.7" } variable "cluster_cni" {