Compare commits

...

8 Commits

Author SHA1 Message Date
Techno Tim
a46d97a28d chore(deps): Updated cilium to v1.15.2 (#484)
* chore(deps): Updated cilium to v1.15.2

* fix(molecule): increase timeout for slow CI
2024-03-22 14:16:31 -05:00
dependabot[bot]
dc9d571f17 chore(deps): bump actions/cache from 4.0.1 to 4.0.2 (#481)
Bumps [actions/cache](https://github.com/actions/cache) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](ab5e6d0c87...0c45773b62)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-22 10:36:35 -05:00
dependabot[bot]
6742551e5c chore(deps): bump actions/checkout from 4.1.1 to 4.1.2 (#477)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](b4ffde65f4...9bb56186c3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-13 02:57:45 +00:00
Techno Tim
fb3478a086 feat(k3s): Updated to v1.29.2+k3s1 (#474) 2024-03-12 02:29:46 +00:00
Techno Tim
518c5bb62a fix(molecule): Disable ipv6 test (#476) 2024-03-11 20:42:47 -05:00
Techno Tim
3f5d8dfe9f chore(deps): Updated kube-vip (#471) 2024-03-10 21:03:20 +00:00
Luke D Iremadze
efbfadcb93 Update Kube Config instructions (#470)
Co-authored-by: Techno Tim <timothystewart6@gmail.com>
2024-03-05 22:21:40 -06:00
Phil Bolduc
f81ec04ba2 Support defining a custom reboot command (#467)
Co-authored-by: Techno Tim <timothystewart6@gmail.com>
2024-03-06 03:52:24 +00:00
11 changed files with 37 additions and 15 deletions

View File

@@ -11,7 +11,7 @@ jobs:
steps: steps:
- name: Check out the codebase - name: Check out the codebase
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1 uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # 4.1.2
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
@@ -23,7 +23,7 @@ jobs:
- name: Cache Vagrant boxes - name: Cache Vagrant boxes
id: cache-vagrant id: cache-vagrant
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # 4.0 uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # 4.0
with: with:
lookup-only: true #if it exists, we don't need to restore and can skip the next step lookup-only: true #if it exists, we don't need to restore and can skip the next step
path: | path: |

View File

@@ -11,7 +11,7 @@ jobs:
steps: steps:
- name: Check out the codebase - name: Check out the codebase
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1 uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # 4.1.2
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
@@ -22,7 +22,7 @@ jobs:
cache: 'pip' # caching pip dependencies cache: 'pip' # caching pip dependencies
- name: Restore Ansible cache - name: Restore Ansible cache
uses: actions/cache/restore@ab5e6d0c87105b4c9c2047343972218f562e4319 # 4.0 uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # 4.0
with: with:
path: ~/.ansible/collections path: ~/.ansible/collections
key: ansible-${{ hashFiles('collections/requirements.yml') }} key: ansible-${{ hashFiles('collections/requirements.yml') }}
@@ -45,7 +45,7 @@ jobs:
runs-on: self-hosted runs-on: self-hosted
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1 uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # 4.1.2
- name: Ensure SHA pinned actions - name: Ensure SHA pinned actions
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@ba37328d4ea95eaf8b3bd6c6cef308f709a5f2ec # 3.0.3 uses: zgosalvez/github-actions-ensure-sha-pinned-actions@ba37328d4ea95eaf8b3bd6c6cef308f709a5f2ec # 3.0.3
with: with:

View File

@@ -10,7 +10,7 @@ jobs:
matrix: matrix:
scenario: scenario:
- default - default
- ipv6 # - ipv6
- single_node - single_node
- calico - calico
- cilium - cilium
@@ -21,7 +21,7 @@ jobs:
steps: steps:
- name: Check out the codebase - name: Check out the codebase
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1 uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # 4.1.2
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
@@ -65,7 +65,7 @@ jobs:
cache: 'pip' # caching pip dependencies cache: 'pip' # caching pip dependencies
- name: Restore vagrant Boxes cache - name: Restore vagrant Boxes cache
uses: actions/cache/restore@ab5e6d0c87105b4c9c2047343972218f562e4319 # 4.0 uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # 4.0
with: with:
path: ~/.vagrant.d/boxes path: ~/.vagrant.d/boxes
key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }}

View File

@@ -96,8 +96,22 @@ ansible-playbook reset.yml -i inventory/my-cluster/hosts.ini
To copy your `kube config` locally so that you can access your **Kubernetes** cluster run: To copy your `kube config` locally so that you can access your **Kubernetes** cluster run:
```bash ```bash
scp debian@master_ip:~/.kube/config ~/.kube/config scp debian@master_ip:/etc/rancher/k3s/k3s.yaml ~/.kube/config
``` ```
If you get file Permission denied, go into the node and temporarly run:
```bash
sudo chmod 777 /etc/rancher/k3s/k3s.yaml
```
Then copy with the scp command and reset the permissions back to:
```bash
sudo chmod 600 /etc/rancher/k3s/k3s.yaml
```
You'll then want to modify the config to point to master IP by running:
```bash
sudo nano ~/.kube/config
```
Then change `server: https://127.0.0.1:6443` to match your master IP: `server: https://192.168.1.222:6443`
### 🔨 Testing your cluster ### 🔨 Testing your cluster

View File

@@ -1,5 +1,5 @@
--- ---
k3s_version: v1.29.0+k3s1 k3s_version: v1.29.2+k3s1
# this is the user that has ssh access to these machines # this is the user that has ssh access to these machines
ansible_user: ansibleuser ansible_user: ansibleuser
systemd_dir: /etc/systemd/system systemd_dir: /etc/systemd/system
@@ -19,7 +19,7 @@ calico_tag: "v3.27.2" # calico version tag
# ensure v4.19.57, v5.1.16, v5.2.0 or more recent kernel # ensure v4.19.57, v5.1.16, v5.2.0 or more recent kernel
# cilium_iface: "eth0" # cilium_iface: "eth0"
cilium_mode: "native" # native when nodes on same subnet or using bgp, else set routed cilium_mode: "native" # native when nodes on same subnet or using bgp, else set routed
cilium_tag: "v1.15.1" # cilium version tag cilium_tag: "v1.15.2" # cilium version tag
cilium_hubble: true # enable hubble observability relay and ui cilium_hubble: true # enable hubble observability relay and ui
# if using calico or cilium, you may specify the cluster pod cidr pool # if using calico or cilium, you may specify the cluster pod cidr pool
@@ -72,7 +72,7 @@ extra_agent_args: >-
{{ extra_args }} {{ extra_args }}
# image tag for kube-vip # image tag for kube-vip
kube_vip_tag_version: "v0.7.1" kube_vip_tag_version: "v0.7.2"
# tag for kube-vip-cloud-provider manifest # tag for kube-vip-cloud-provider manifest
# kube_vip_cloud_provider_tag_version: "main" # kube_vip_cloud_provider_tag_version: "main"
@@ -160,6 +160,10 @@ custom_registries_yaml: |
username: yourusername username: yourusername
password: yourpassword password: yourpassword
# On some distros like Diet Pi, there is no dbus installed. dbus required by the default reboot command.
# Uncomment if you need a custom reboot command
# custom_reboot_command: /usr/sbin/shutdown -r now
# Only enable and configure these if you access the internet through a proxy # Only enable and configure these if you access the internet through a proxy
# proxy_env: # proxy_env:
# HTTP_PROXY: "http://proxy.domain.local:3128" # HTTP_PROXY: "http://proxy.domain.local:3128"

View File

@@ -6,4 +6,5 @@
- name: Reboot the nodes (and Wait upto 5 mins max) - name: Reboot the nodes (and Wait upto 5 mins max)
become: true become: true
reboot: reboot:
reboot_command: "{{ custom_reboot_command | default(omit) }}"
reboot_timeout: 300 reboot_timeout: 300

View File

@@ -12,6 +12,7 @@
- name: Reboot and wait for node to come back up - name: Reboot and wait for node to come back up
become: true become: true
reboot: reboot:
reboot_command: "{{ custom_reboot_command | default(omit) }}"
reboot_timeout: 3600 reboot_timeout: 3600
- name: Revert changes to Proxmox cluster - name: Revert changes to Proxmox cluster

View File

@@ -48,7 +48,7 @@
k3s kubectl wait {{ item.type }}/{{ item.name }} k3s kubectl wait {{ item.type }}/{{ item.name }}
--namespace='tigera-operator' --namespace='tigera-operator'
--for=condition=Available=True --for=condition=Available=True
--timeout=7s --timeout=30s
register: tigera_result register: tigera_result
changed_when: false changed_when: false
until: tigera_result is succeeded until: tigera_result is succeeded
@@ -87,7 +87,7 @@
--namespace='{{ item.namespace }}' --namespace='{{ item.namespace }}'
--for=condition=Available --for=condition=Available
{% endif %} {% endif %}
--timeout=7s --timeout=30s
register: cr_result register: cr_result
changed_when: false changed_when: false
until: cr_result is succeeded until: cr_result is succeeded

View File

@@ -202,7 +202,7 @@
--namespace=kube-system --namespace=kube-system
--for=condition=Available --for=condition=Available
{% endif %} {% endif %}
--timeout=7s --timeout=30s
register: cr_result register: cr_result
changed_when: false changed_when: false
until: cr_result is succeeded until: cr_result is succeeded

View File

@@ -2,4 +2,5 @@
- name: Reboot server - name: Reboot server
become: true become: true
reboot: reboot:
reboot_command: "{{ custom_reboot_command | default(omit) }}"
listen: reboot server listen: reboot server

View File

@@ -1,4 +1,5 @@
--- ---
- name: Reboot - name: Reboot
reboot: reboot:
reboot_command: "{{ custom_reboot_command | default(omit) }}"
listen: reboot listen: reboot