Skip to content

Commit cbe58f9

Browse files
authored
update examples 2025Q2 (#581)
1 parent 80eaab6 commit cbe58f9

File tree

10 files changed

+728
-651
lines changed

10 files changed

+728
-651
lines changed

20-kubernetes/kind-nginx.yaml

Lines changed: 374 additions & 374 deletions
Large diffs are not rendered by default.

20-kubernetes/kind.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: kind.x-k8s.io/v1alpha4
33
name: ping
44
nodes:
55
- role: control-plane
6-
image: kindest/node:v1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027
6+
image: kindest/node:v1.32.2@sha256:f226345927d7e348497136874b6d207e0b32cc52154ad8323129352923a3142f
77
kubeadmConfigPatches:
88
- |
99
kind: InitConfiguration

99-helper-scripts/ansible/install_kubernetes.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
k8snode02_ip: "192.168.163.72"
1414

1515
tasks:
16+
- name: Gather architecture info
17+
setup:
18+
filter: ansible_architecture
19+
1620
- name: Update package cache
1721
apt:
1822
update_cache: yes
@@ -184,10 +188,10 @@
184188
- lvm2
185189

186190
- name: Get Kubernetes package signing key
187-
shell: curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.30/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/k8s.gpg
191+
shell: curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.32/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/k8s.gpg
188192

189193
- name: Add Kubernetes APT repository
190-
shell: echo 'deb [signed-by=/etc/apt/keyrings/k8s.gpg] https://pkgs.k8s.io/core:/stable:/v1.30/deb/ /' | tee /etc/apt/sources.list.d/k8s.list
194+
shell: echo 'deb [signed-by=/etc/apt/keyrings/k8s.gpg] https://pkgs.k8s.io/core:/stable:/v1.32/deb/ /' | tee /etc/apt/sources.list.d/k8s.list
191195

192196
- name: Update package cache
193197
apt:

99-helper-scripts/ansible/install_others.yaml

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,42 @@
77
- install_list.yaml
88

99
tasks:
10+
####################### Architecture #######
11+
- name: Gather architecture info
12+
setup:
13+
filter: ansible_architecture
14+
15+
- name: Print system architecture
16+
debug:
17+
msg: "System architecture is: {{ ansible_architecture }}"
18+
19+
- name: Set architecture-specific variables
20+
set_fact:
21+
arch_suffix: >-
22+
{{ 'amd64' if ansible_architecture == 'x86_64' else 'arm64' }}
23+
24+
- name: Print Ansible architecture designation
25+
debug:
26+
msg: "System architecture is: {{ ansible_architecture }}"
27+
1028
####################### Helm ##############
29+
- name: Set Helm checksum based on architecture
30+
set_fact:
31+
helm_checksum: >-
32+
{{ 'sha256:90c28792a1eb5fb0b50028e39ebf826531ebfcf73f599050dbd79bab2f277241'
33+
if arch_suffix == 'amd64'
34+
else 'sha256:d78d76ec7625a94991e887ac049d93f44bd70e4876200b945f813c9e1ed1df7c' }}
35+
when: helm == True
36+
1137
- name: Get helm installation file
1238
get_url:
13-
url: "https://get.helm.sh/helm-v3.16.4-linux-amd64.tar.gz"
14-
dest: "/home/ubuntu/helm-v3.16.4-linux-amd64.tar.gz"
15-
checksum: sha256:fc307327959aa38ed8f9f7e66d45492bb022a66c3e5da6063958254b9767d179
39+
url: "https://get.helm.sh/helm-v3.17.2-linux-{{ arch_suffix }}.tar.gz"
40+
dest: "/home/ubuntu/helm-v3.17.2-linux-{{ arch_suffix }}.tar.gz"
41+
checksum: "{{ helm_checksum }}"
1642
when: helm == True
1743

1844
- name: Extract helm
19-
shell: tar xzvf /home/ubuntu/helm-v3.16.4-linux-amd64.tar.gz && sudo mv linux-amd64/helm /usr/local/bin/helm
45+
shell: tar xzvf /home/ubuntu/helm-v3.17.2-linux-{{ arch_suffix }}.tar.gz && sudo mv linux-{{ arch_suffix }}/helm /usr/local/bin/helm
2046
args:
2147
executable: /bin/bash
2248
creates: /usr/local/bin/helm
@@ -27,27 +53,27 @@
2753
path: "{{ item }}"
2854
state: absent
2955
with_items:
30-
- /home/ubuntu/linux-amd64
31-
- /home/ubuntu/helm-v3.16.4-linux-amd64.tar.gz
56+
- /home/ubuntu/linux-{{ arch_suffix }}
57+
- /home/ubuntu/helm-v3.17.2-linux-{{ arch_suffix }}.tar.gz
3258
when: helm == True
3359

3460
######################## K9S ##############
3561
- name: Get K9s installation file
3662
get_url:
37-
url: "https://github.com/derailed/k9s/releases/download/v0.32.7/k9s_Linux_amd64.tar.gz"
38-
dest: "/home/ubuntu/k9s_Linux_amd64.tar.gz"
39-
checksum: sha256:https://github.com/derailed/k9s/releases/download/v0.32.7/checksums.sha256
63+
url: "https://github.com/derailed/k9s/releases/download/v0.40.10/k9s_Linux_{{ arch_suffix }}.tar.gz"
64+
dest: "/home/ubuntu/k9s_Linux_{{ arch_suffix }}.tar.gz"
65+
checksum: sha256:https://github.com/derailed/k9s/releases/download/v0.40.10/checksums.sha256
4066
when: k9s == True
4167

4268
- name: Extract k9s
43-
command: sudo tar Cxzvf /usr/local/bin /home/ubuntu/k9s_Linux_amd64.tar.gz
69+
command: sudo tar Cxzvf /usr/local/bin /home/ubuntu/k9s_Linux_{{ arch_suffix }}.tar.gz
4470
args:
4571
creates: /usr/local/bin/k9s
4672
when: k9s == True
4773

4874
- name: Remove k9s tarball
4975
file:
50-
path: /home/ubuntu/k9s_Linux_amd64.tar.gz
76+
path: /home/ubuntu/k9s_Linux_{{ arch_suffix }}.tar.gz
5177
state: absent
5278
when: k9s == True
5379
######################### MetalLB ##############
@@ -122,7 +148,7 @@
122148
################### ROOK / CEPH #################
123149

124150
- name: Install CertManager prerequisite
125-
shell: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.2/cert-manager.yaml && sudo touch /etc/.certManagerInstalled
151+
shell: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.17.1/cert-manager.yaml && sudo touch /etc/.certManagerInstalled
126152
args:
127153
creates: /etc/.certManagerInstalled
128154
executable: /bin/bash
@@ -324,20 +350,20 @@
324350

325351
- name: Get 'istioctl' installation file
326352
get_url:
327-
url: "https://github.com/istio/istio/releases/download/1.24.2/istio-1.24.2-linux-amd64.tar.gz"
328-
dest: "/home/ubuntu/istio-1.24.2-linux-amd64.tar.gz"
329-
checksum: sha256:https://github.com/istio/istio/releases/download/1.24.2/istio-1.24.2-linux-amd64.tar.gz.sha256
353+
url: "https://github.com/istio/istio/releases/download/1.25.1/istio-1.25.1-linux-{{ arch_suffix }}.tar.gz"
354+
dest: "/home/ubuntu/istio-1.25.1-linux-{{ arch_suffix }}.tar.gz"
355+
checksum: sha256:https://github.com/istio/istio/releases/download/1.25.1/istio-1.25.1-linux-{{ arch_suffix }}.tar.gz.sha256
330356
when: istio == True
331357

332358
- name: Extract istioctl
333-
shell: tar xzvf /home/ubuntu/istio-1.24.2-linux-amd64.tar.gz && sudo mv istio-1.24.2/bin/istioctl /usr/local/bin/istioctl
359+
shell: tar xzvf /home/ubuntu/istio-1.25.1-linux-{{ arch_suffix }}.tar.gz && sudo mv istio-1.25.1/bin/istioctl /usr/local/bin/istioctl
334360
args:
335361
executable: /bin/bash
336362
creates: /usr/local/bin/istioctl
337363
when: istio == True
338364

339365
- name: Install istio
340-
shell: istioctl install -f /home/ubuntu/istio-1.24.2/manifests/profiles/demo.yaml --skip-confirmation && sudo touch /etc/.istioInstalled
366+
shell: istioctl install -f /home/ubuntu/istio-1.25.1/manifests/profiles/demo.yaml --skip-confirmation && sudo touch /etc/.istioInstalled
341367
args:
342368
executable: /bin/bash
343369
creates: /etc/.istioInstalled
@@ -357,7 +383,7 @@
357383
when: istio == True
358384

359385
- name: Install Istio add-ons
360-
shell: kubectl apply -n istio-system -f /home/ubuntu/istio-1.24.2/samples/addons && sudo touch /etc/.istioAddonsInstalled
386+
shell: kubectl apply -n istio-system -f /home/ubuntu/istio-1.25.1/samples/addons && sudo touch /etc/.istioAddonsInstalled
361387
args:
362388
executable: /bin/bash
363389
creates: /etc/.istioAddonsInstalled
@@ -395,7 +421,7 @@
395421
path: "{{ item }}"
396422
state: absent
397423
with_items:
398-
- /home/ubuntu/istio-1.24.2
399-
- /home/ubuntu/istio-1.24.2-linux-amd64.tar.gz
424+
- /home/ubuntu/istio-1.25.1
425+
- /home/ubuntu/istio-1.25.1-linux-{{ arch_suffix }}.tar.gz
400426
- /home/ubuntu/patch-service.yaml
401427
when: istio == True

0 commit comments

Comments
 (0)