Compare commits

..

17 Commits
1.7.0 ... 1.9.0

Author SHA1 Message Date
0d0d1862cc build: bump version 1.8.1-a2 -> 1.9.0
!63
2024-05-03 13:10:33 +00:00
Jon
b4c06b9f91 feat(nfc_kubernetes): add debug out to k3s download on failure
!63
2024-05-03 22:27:39 +09:30
Jon
3d0dda7277 revert: "feat(nfc_kubernetes) build url and on use cast as string"
This reverts commit 9fa3b233a9.

The bug was within awx-core 2.16.1 as upgrading to 2.16.6 fixed the problem

!63 !61 nofusscomputing/projects/ansible/execution_environment!255 closes https://github.com/ansible/awx/issues/15161
2024-05-02 15:00:51 +09:30
1a11014420 build: bump version 1.8.1-a1 -> 1.8.1-a2
!64 https://github.com/ansible/awx/issues/15161
2024-05-02 01:44:21 +00:00
Jon
ad55d3e874 fix(nfc_kubernetes): cast url var as list
!64 https://github.com/ansible/awx/issues/15161
2024-05-02 11:01:02 +09:30
e0035d88df build: bump version 1.8.0 -> 1.8.1-a1
!64
2024-05-02 01:29:53 +00:00
Jon
52c4ee12fa Merge branch 'feat-workaround-15161' into 'development'
fix: workaround 15161

See merge request nofusscomputing/projects/ansible/collections/kubernetes!64
2024-05-02 01:27:52 +00:00
Jon
b4d5031b0a fix(nfc_kubernetes): correct url build to loop through all cpu arch
!64 https://github.com/ansible/awx/issues/15161
2024-05-02 10:45:58 +09:30
3cf2a2e169 build: bump version 1.7.2 -> 1.8.0
!61
2024-05-02 00:26:59 +00:00
Jon
358891e1cc Merge branch 'feat-workaround-15161' into 'development'
feat: workaround 15161

Closes #27

See merge request nofusscomputing/projects/ansible/collections/kubernetes!61
2024-05-02 00:20:25 +00:00
Jon
9fa3b233a9 feat(nfc_kubernetes): build url and on use cast as string
!61 https://github.com/ansible/awx/issues/15161 closes #27
2024-05-02 09:42:59 +09:30
9ec1ba4c51 build: bump version 1.7.1 -> 1.7.2
!59
2024-04-25 07:22:05 +00:00
Jon
bb707149f6 Merge branch '26-nfc_kubernetes-check-mode-support' into 'development'
fix: install fails in check mode

Closes #26

See merge request nofusscomputing/projects/ansible/collections/kubernetes!59
2024-04-25 07:09:32 +00:00
Jon
f622228493 ci(tests): correct so they are always available on all branches intended
!59
2024-04-25 16:27:38 +09:30
Jon
5efd9807f6 fix(nfc_kubernetes): adjust some tasks to run during checkmode
these tasks make no change and are required for checkmode to function as it's intended

!59 fixes #26
2024-04-25 16:24:48 +09:30
f09a71ef77 build: bump version 1.7.0 -> 1.7.1
!58
2024-04-24 03:23:27 +00:00
Jon
9d9cffb03a fix: add role readme
!58
2024-04-24 12:40:48 +09:30
9 changed files with 112 additions and 92 deletions

View File

@ -4,5 +4,5 @@ commitizen:
prerelease_offset: 1
tag_format: $version
update_changelog_on_bump: false
version: 1.7.0
version: 1.9.0
version_scheme: semver

View File

@ -191,23 +191,27 @@ test_results:
rules:
- if: $CI_COMMIT_TAG
allow_failure: true
when: on_success
- if: "$CI_COMMIT_AUTHOR =='nfc_bot <helpdesk@nofusscomputing.com>'"
when: never
# Needs to run, even by bot as the test results need to be available
# - if: "$CI_COMMIT_AUTHOR =='nfc_bot <helpdesk@nofusscomputing.com>'"
# when: never
- if: # Occur on merge
$CI_COMMIT_BRANCH == "development"
$CI_COMMIT_BRANCH
&&
$CI_PIPELINE_SOURCE == "push"
when: always
allow_failure: true
when: on_success
- if:
$CI_COMMIT_BRANCH != "development"
&&
$CI_COMMIT_BRANCH != "master"
&&
$CI_PIPELINE_SOURCE == "push"
when: always
# - if:
# $CI_COMMIT_BRANCH != "development"
# &&
# $CI_COMMIT_BRANCH != "master"
# &&
# $CI_PIPELINE_SOURCE == "push"
# allow_failure: true
# when: always
- when: never

View File

@ -1,3 +1,32 @@
## 1.9.0 (2024-05-03)
### Feat
- **nfc_kubernetes**: add debug out to k3s download on failure
### Fix
- **nfc_kubernetes**: cast url var as list
- **nfc_kubernetes**: correct url build to loop through all cpu arch
## 1.8.0 (2024-05-02)
### Feat
- **nfc_kubernetes**: build url and on use cast as string
## 1.7.2 (2024-04-25)
### Fix
- **nfc_kubernetes**: adjust some tasks to run during checkmode
## 1.7.1 (2024-04-24)
### Fix
- add role readme
## 1.7.0 (2024-04-24)
### Feat
@ -44,50 +73,8 @@
## 1.3.0 (2024-03-18)
### Feat
- dont attempt to install if already installed
### Fix
- **handler**: add missing 'reboot_host' handler
- **firewall**: ensure slave nodes can access ALL masters API point
- **firewall**: dont add rules for disabled features
## 1.2.0 (2024-03-16)
### Feat
- **firewall**: use collection nofusscomputing.firewall to configure kubernetes firewall
### Fix
- **config**: use correct var name when setting node name
## 1.1.2 (2024-03-13)
### Fix
- **readme**: update gitlab links to new loc
- **configure**: dont attempt to configure firewall if install=false
- **handler**: remove old k8s code causing handler to fail
- **handler**: kubernetes restart handler now using updated node type vars
- **config**: if hostname=localhost use hostname command to fetch hostname
## 1.1.1 (2024-03-13)
### Fix
- don't check hostname for localhost
## 1.1.0 (2024-03-13)
### Feat
- add role readme and fix gitlab release job
## 1.0.1 (2024-03-13)
### Fix
- **ci**: ensure correct package name is used

View File

@ -8,7 +8,7 @@ namespace: nofusscomputing
name: kubernetes
# The version of the collection. Must be compatible with semantic versioning
version: 1.7.0
version: 1.9.0
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md

View File

@ -0,0 +1,3 @@
## No Fuss Computing - Ansible Role kubernetes_netbox
Nothing to see here

View File

@ -5,6 +5,7 @@
url: https://baltocdn.com/helm/signing.asc
dest: /usr/share/keyrings/helm.asc
mode: 740
changed_when: not ansible_check_mode
delay: 10
retries: 3

View File

@ -4,6 +4,7 @@
ansible.builtin.command:
cmd: hostname
changed_when: false
check_mode: false
register: hostname_to_check
tags:
- always
@ -18,8 +19,6 @@
- always
when: >
inventory_hostname != 'localhost'
and
not ansible_check_mode
- name: Testing Env Variables
@ -27,6 +26,7 @@
ansible_default_ipv4: {
"address": "127.0.0.1"
}
check_mode: false
tags:
- always
when: >

View File

@ -274,6 +274,7 @@
executable: /bin/bash
changed_when: false
check_mode: false
failed_when: false
register: k3s_metadata
@ -303,42 +304,62 @@
when: >
file_cached_k3s_binary.stat.checksum | default('0') != node_k3s.desired_hash
- name: Try / Catch
block:
- name: Download K3s Binary
ansible.builtin.uri:
url: |-
https://github.com/k3s-io/k3s/releases/download/
{{- node_k3s.desired_version | urlencode -}}
/k3s
{%- if cpu_arch.key == 'aarch64' -%}
-arm64
{%- endif %}
method: GET
return_content: false
status_code:
- 200
- 304
dest: "/tmp/k3s.{{ cpu_arch.key }}"
mode: "744"
delay: 10
retries: 3
register: k3s_download_files
delegate_to: localhost
failed_when: >
(lookup('ansible.builtin.file', '/tmp/k3s.' + cpu_arch.key) | hash('sha256') | string) != node_k3s.desired_hash
and
(
k3s_download_files.status | int != 200
or
k3s_download_files.status | int != 304
)
run_once: true
when: ansible_os_family == 'Debian'
loop: "{{ nfc_kubernetes_install_architectures | dict2items }}"
loop_control:
loop_var: cpu_arch
vars:
ansible_connection: local
- name: Download K3s Binary
ansible.builtin.uri:
url: |-
https://github.com/k3s-io/k3s/releases/download/
{{- node_k3s.desired_version | urlencode -}}
/k3s
{%- if cpu_arch.key == 'aarch64' -%}
-arm64
{%- endif %}
method: GET
return_content: false
status_code:
- 200
- 304
dest: "/tmp/k3s.{{ ansible_architecture }}"
mode: "744"
changed_when: not ansible_check_mode
check_mode: false
delay: 10
retries: 3
register: k3s_download_files
delegate_to: localhost
failed_when: >
(lookup('ansible.builtin.file', '/tmp/k3s.' + ansible_architecture) | hash('sha256') | string) != node_k3s.desired_hash
and
(
k3s_download_files.status | int != 200
or
k3s_download_files.status | int != 304
)
run_once: true
when: ansible_os_family == 'Debian'
loop: "{{ nfc_kubernetes_install_architectures | dict2items }}"
loop_control:
loop_var: cpu_arch
vars:
ansible_connection: local
rescue:
- name: TRACE - Debug out
ansible.builtin.debug:
msg:
- "Download file hash: {{ (lookup('ansible.builtin.file', '/tmp/k3s.' + ansible_architecture) | hash('sha256') | string) }}"
- name: Fail task
ansible.builtin.assert:
that:
- false
msg: "Task failed, review previous task for error"
- name: Copy K3s binary to Host
@ -395,6 +416,7 @@
- 304
dest: "{{ item.dest }}"
mode: "744"
check_mode: false
changed_when: false
delay: 10
retries: 3
@ -600,6 +622,8 @@
failed_when: kubernetes_ready_check.rc != 0
when: >
not nfc_role_kubernetes_cluster_upgraded | default(false) | bool
and
not ansible_check_mode
- name: Config Link

View File

@ -110,6 +110,7 @@
owner: root
group: 'root'
changed_when: false
check_mode: false
become: true
delegate_to: localhost
loop: "{{ nfc_kubernetes_install_architectures | dict2items }}"