Skip to content
Snippets Groups Projects
Commit a306145e authored by František Dvořák's avatar František Dvořák
Browse files

Kubernetes upgrade 1.30.2 -> 1.31.0

Components upgraded:

* k8s
* calico
* helm
* ingress
* cert-manager
* prometheus
* grafana
parent 34f95db5
Branches
No related tags found
No related merge requests found
...@@ -4796,7 +4796,7 @@ spec: ...@@ -4796,7 +4796,7 @@ spec:
# It can be deleted if this is a fresh installation, or if you have already # It can be deleted if this is a fresh installation, or if you have already
# upgraded to use calico-ipam. # upgraded to use calico-ipam.
- name: upgrade-ipam - name: upgrade-ipam
image: docker.io/calico/cni:v3.28.0 image: docker.io/calico/cni:v3.28.1
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["/opt/cni/bin/calico-ipam", "-upgrade"] command: ["/opt/cni/bin/calico-ipam", "-upgrade"]
envFrom: envFrom:
...@@ -4824,7 +4824,7 @@ spec: ...@@ -4824,7 +4824,7 @@ spec:
# This container installs the CNI binaries # This container installs the CNI binaries
# and CNI network config file on each node. # and CNI network config file on each node.
- name: install-cni - name: install-cni
image: docker.io/calico/cni:v3.28.0 image: docker.io/calico/cni:v3.28.1
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["/opt/cni/bin/install"] command: ["/opt/cni/bin/install"]
envFrom: envFrom:
...@@ -4867,7 +4867,7 @@ spec: ...@@ -4867,7 +4867,7 @@ spec:
# i.e. bpf at /sys/fs/bpf and cgroup2 at /run/calico/cgroup. Calico-node initialisation is executed # i.e. bpf at /sys/fs/bpf and cgroup2 at /run/calico/cgroup. Calico-node initialisation is executed
# in best effort fashion, i.e. no failure for errors, to not disrupt pod creation in iptable mode. # in best effort fashion, i.e. no failure for errors, to not disrupt pod creation in iptable mode.
- name: "mount-bpffs" - name: "mount-bpffs"
image: docker.io/calico/node:v3.28.0 image: docker.io/calico/node:v3.28.1
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["calico-node", "-init", "-best-effort"] command: ["calico-node", "-init", "-best-effort"]
volumeMounts: volumeMounts:
...@@ -4893,7 +4893,7 @@ spec: ...@@ -4893,7 +4893,7 @@ spec:
# container programs network policy and routes on each # container programs network policy and routes on each
# host. # host.
- name: calico-node - name: calico-node
image: docker.io/calico/node:v3.28.0 image: docker.io/calico/node:v3.28.1
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
envFrom: envFrom:
- configMapRef: - configMapRef:
...@@ -5030,9 +5030,11 @@ spec: ...@@ -5030,9 +5030,11 @@ spec:
- name: var-run-calico - name: var-run-calico
hostPath: hostPath:
path: /var/run/calico path: /var/run/calico
type: DirectoryOrCreate
- name: var-lib-calico - name: var-lib-calico
hostPath: hostPath:
path: /var/lib/calico path: /var/lib/calico
type: DirectoryOrCreate
- name: xtables-lock - name: xtables-lock
hostPath: hostPath:
path: /run/xtables.lock path: /run/xtables.lock
...@@ -5053,6 +5055,7 @@ spec: ...@@ -5053,6 +5055,7 @@ spec:
- name: cni-bin-dir - name: cni-bin-dir
hostPath: hostPath:
path: /opt/cni/bin path: /opt/cni/bin
type: DirectoryOrCreate
- name: cni-net-dir - name: cni-net-dir
hostPath: hostPath:
path: /etc/cni/net.d path: /etc/cni/net.d
...@@ -5110,7 +5113,7 @@ spec: ...@@ -5110,7 +5113,7 @@ spec:
priorityClassName: system-cluster-critical priorityClassName: system-cluster-critical
containers: containers:
- name: calico-kube-controllers - name: calico-kube-controllers
image: docker.io/calico/kube-controllers:v3.28.0 image: docker.io/calico/kube-controllers:v3.28.1
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
env: env:
# Choose which controllers to run. # Choose which controllers to run.
......
...@@ -155,10 +155,10 @@ ...@@ -155,10 +155,10 @@
# kube_nvidia_device_plugin_version: "v0.12.2" # kube_nvidia_device_plugin_version: "v0.12.2"
# kube_nvidia_driver_version: "515" # "525" # kube_nvidia_driver_version: "515" # "525"
kube_nvidia_support: true kube_nvidia_support: true
kube_version: 1.30.2 kube_version: 1.31.0
kube_network: 'none' # custom network installation kube_network: 'none' # custom network installation
kube_install_helm: true kube_install_helm: true
kube_install_helm_version: 'v3.15.2' kube_install_helm_version: 'v3.15.4'
kube_install_metrics: true kube_install_metrics: true
tasks: tasks:
- name: Create kubectl config dir - name: Create kubectl config dir
...@@ -183,11 +183,11 @@ ...@@ -183,11 +183,11 @@
- name: K8s network deployment - name: K8s network deployment
hosts: master hosts: master
vars: vars:
calicoctl_version: 3.28.0 calicoctl_version: 3.28.1
tasks: tasks:
- name: Calico config - name: Calico config
copy: copy:
# https://raw.githubusercontent.com/projectcalico/calico/v3.28.0/manifests/calico.yaml # https://raw.githubusercontent.com/projectcalico/calico/v3.28.1/manifests/calico.yaml
src: files/calico.yaml src: files/calico.yaml
dest: /tmp/calico-net.yaml dest: /tmp/calico-net.yaml
mode: 0644 mode: 0644
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
# must be IPv4 address or hostname # must be IPv4 address or hostname
kube_server: "{{ hostvars[groups['master'][0]].kube_server | default(groups['master'][0]) }}" kube_server: "{{ hostvars[groups['master'][0]].kube_server | default(groups['master'][0]) }}"
kube_type_of_node: wn kube_type_of_node: wn
kube_version: 1.30.2 kube_version: 1.31.0
kubelet_extra_args: '--volume-stats-agg-period 0' kubelet_extra_args: '--volume-stats-agg-period 0'
tasks: tasks:
- name: Overlay2 mountpoint workaround to docker.service unit - name: Overlay2 mountpoint workaround to docker.service unit
...@@ -348,11 +348,13 @@ ...@@ -348,11 +348,13 @@
when: "'ingress-nginx' not in ansible_local.helm_repos | map(attribute='name') | list" when: "'ingress-nginx' not in ansible_local.helm_repos | map(attribute='name') | list"
- name: Ingress - name: Ingress
vars: vars:
version: 4.11.2 # app 1.11.2
config: >- config: >-
--set controller.service.type=NodePort --set controller.service.type=NodePort
--set controller.service.externalIPs={{ '{' + hostvars[groups['ingress'][0]].ansible_default_ipv4.address + '}' }} --set controller.service.externalIPs={{ '{' + hostvars[groups['ingress'][0]].ansible_default_ipv4.address + '}' }}
--set controller.config.proxy-body-size=0 --set controller.config.proxy-body-size=0
--set controller.allowSnippetAnnotations=false --set controller.allowSnippetAnnotations=false
--version={{version}}
shell: |- shell: |-
helm status --namespace kube-system cluster-ingress helm status --namespace kube-system cluster-ingress
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
...@@ -366,7 +368,7 @@ ...@@ -366,7 +368,7 @@
when: true when: true
- name: Cert-manager - name: Cert-manager
vars: vars:
version: 1.15.0 version: 1.15.3
config: >- config: >-
--version={{ version }} --version={{ version }}
--set ingressShim.defaultIssuerName=letsencrypt-prod --set ingressShim.defaultIssuerName=letsencrypt-prod
...@@ -477,8 +479,9 @@ ...@@ -477,8 +479,9 @@
description: "Disk is almost full {{ '{{ $value | printf \"%.2f\" }}' }}% (limit {{ limit_disk_warn }}%)" description: "Disk is almost full {{ '{{ $value | printf \"%.2f\" }}' }}% (limit {{ limit_disk_warn }}%)"
- name: Prometheus - name: Prometheus
vars: vars:
version: 25.27.0 # app v2.54.1
config: >- config: >-
--version=25.21.0 --version={{ version }}
-f /tmp/prometheus.yaml -f /tmp/prometheus.yaml
shell: |- shell: |-
helm status --namespace prometheus prometheus helm status --namespace prometheus prometheus
...@@ -525,8 +528,9 @@ ...@@ -525,8 +528,9 @@
enabled: true enabled: true
- name: Grafana - name: Grafana
vars: vars:
version: 8.5.0 # app 11.1.5
config: >- config: >-
--version=8.0.2 --version={{ version }}
-f /tmp/grafana.yaml -f /tmp/grafana.yaml
shell: |- shell: |-
helm status --namespace grafana grafana helm status --namespace grafana grafana
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# #
# Usage example: # Usage example:
# #
# VERSION=1.30.2 # VERSION=1.31.0
# ansible-playbook playbooks/upgrade.yaml --extra-vars "version=$VERSION" # ansible-playbook playbooks/upgrade.yaml --extra-vars "version=$VERSION"
# #
- name: Upgrade and hold kubeadm package - name: Upgrade and hold kubeadm package
...@@ -15,8 +15,9 @@ ...@@ -15,8 +15,9 @@
tasks: tasks:
- name: New k8s repository - name: New k8s repository
copy: copy:
dest: /etc/apt/sources.list.d/pkgs_k8s_io_core_stable_v1_30_deb.list dest: /etc/apt/sources.list.d/pkgs_k8s_io_core_stable_v1_31_deb.list
content: deb https://pkgs.k8s.io/core:/stable:/v1.30/deb/ / content: |
deb https://pkgs.k8s.io/core:/stable:/v1.31/deb/ /
mode: 0644 mode: 0644
- name: Upgrade packages - name: Upgrade packages
apt: apt:
...@@ -72,7 +73,7 @@ ...@@ -72,7 +73,7 @@
name: kubelet name: kubelet
- name: Cleanup old k8s repository - name: Cleanup old k8s repository
file: file:
path: /etc/apt/sources.list.d/pkgs_k8s_io_core_stable_v1_29_deb.list path: /etc/apt/sources.list.d/pkgs_k8s_io_core_stable_v1_30_deb.list
state: absent state: absent
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment