Compare commits

...

13 Commits

Author SHA1 Message Date
Jon
0b84d1bc0e Merge branch 'automated-tasks' into 'development'
chore(gitlab-ci): Automated update of git sub-module

See merge request nofusscomputing/projects/ansible/collections/kubernetes!83
2025-02-26 13:20:51 +00:00
c8a1f60a9e chore(git): updated submodule gitlab-ci
Automation Data:
{
    "branch": "development",
    "current_commit": "6f8dfcba0b25313b59bc17b4c99d674fcedd207a)",
    "name": "gitlab-ci",
    "path": "/builds/nofusscomputing/projects/ansible/collections/kubernetes/_automation_/gitlab-ci",
    "remote_head": "224ef831571458ad433a0143eec00df0f7e8b409)",
    "remote_name": "origin",
    "url": "https://gitlab.com/nofusscomputing/projects/gitlab-ci.git"
}

Changes: Submodule path gitlab-ci: checked out 224ef831571458ad433a0143eec00df0f7e8b409

MR !83
2025-02-26 13:08:54 +00:00
Jon
a790f5c60c Merge branch 'automated-tasks' into 'development'
chore(gitlab-ci): Automated update of git sub-module

See merge request nofusscomputing/projects/ansible/collections/kubernetes!81
2024-11-03 19:37:38 +00:00
0ebb28c978 chore(git): updated submodule gitlab-ci
Automation Data:
{
    "branch": "development",
    "current_commit": "58ffcabbfb503af3e57d9cb3ab43931b23dc4cd8)",
    "name": "gitlab-ci",
    "path": "/builds/nofusscomputing/projects/ansible/collections/kubernetes/_automation_/gitlab-ci",
    "remote_head": "6f8dfcba0b25313b59bc17b4c99d674fcedd207a)",
    "remote_name": "origin",
    "url": "https://gitlab.com/nofusscomputing/projects/gitlab-ci.git"
}

Changes: Submodule path gitlab-ci: checked out 6f8dfcba0b25313b59bc17b4c99d674fcedd207a

MR !81
2024-08-19 07:24:43 +00:00
e0ee4ba249 chore(git): updated submodule gitlab-ci
Automation Data:
{
    "branch": "development",
    "current_commit": "673441f83a7d943434252ee23899e3572cdfb141)",
    "name": "gitlab-ci",
    "path": "/builds/nofusscomputing/projects/ansible/collections/kubernetes/_automation_/gitlab-ci",
    "remote_head": "58ffcabbfb503af3e57d9cb3ab43931b23dc4cd8)",
    "remote_name": "origin",
    "url": "https://gitlab.com/nofusscomputing/projects/gitlab-ci.git"
}

Changes: Submodule path gitlab-ci: checked out 58ffcabbfb503af3e57d9cb3ab43931b23dc4cd8

MR !81
2024-08-01 06:08:19 +00:00
a6aeac42c8 build: bump version 1.13.1 -> 1.13.2
!77
2024-07-30 05:30:59 +00:00
Jon
ce8143f52d fix(nfc_kubernetes): correct logic for prime node to always be labeled prime
useful for setting up single node where if all nodes off except prime, targeting can be done

!77 !78 !79 !80 nofusscomputing/infrastructure/configuration-management/project-production!58 nofusscomputing/infrastructure/configuration-management/inventory-infrastructure!4 nofusscomputing/infrastructure/configuration-management/templates-production!28
2024-07-30 14:47:26 +09:30
6581056bc9 build: bump version 1.13.0 -> 1.13.1
!77
2024-07-28 08:11:42 +00:00
Jon
c204539b67 fix(nfc_kubernetes): prime node to always be labeled prime
useful for setting up single node where if all nodes off except prime, targeting can be done

!77 !78 !79 nofusscomputing/infrastructure/configuration-management/project-production!58 nofusscomputing/infrastructure/configuration-management/inventory-infrastructure!4 nofusscomputing/infrastructure/configuration-management/templates-production!28
2024-07-28 17:27:52 +09:30
06f44f5c3b build: bump version 1.12.0 -> 1.13.0
!77
2024-07-28 06:36:20 +00:00
Jon
9f3fcdc5e3 Merge branch 'node-labels-taints' into 'development'
feat(nfc_kubernetes): ability to add node labels and taints

See merge request nofusscomputing/projects/ansible/collections/kubernetes!77
2024-07-28 06:23:02 +00:00
Jon
3c06647637 feat(nfc_kubernetes): prime node to always be labeled prime
useful for setting up single node where if all nodes off except prime, targeting can be done

!77 nofusscomputing/infrastructure/configuration-management/project-production!58 nofusscomputing/infrastructure/configuration-management/inventory-infrastructure!4 nofusscomputing/infrastructure/configuration-management/templates-production!28
2024-07-28 15:40:24 +09:30
Jon
6d26e2e0cf feat(nfc_kubernetes): ability to add node labels and taints
!77 nofusscomputing/infrastructure/configuration-management/project-production!58 nofusscomputing/infrastructure/configuration-management/inventory-infrastructure!4 nofusscomputing/infrastructure/configuration-management/templates-production!28
2024-07-28 15:29:46 +09:30
6 changed files with 48 additions and 48 deletions

View File

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

View File

@ -1,8 +1,23 @@
## 1.12.0 (2024-07-08)
## 1.13.2 (2024-07-30)
### Fix
- **nfc_kubernetes**: correct logic for prime node to always be labeled prime
## 1.13.1 (2024-07-28)
### Fix
- **nfc_kubernetes**: prime node to always be labeled prime
## 1.13.0 (2024-07-28)
### Feat
- **kubernetes_role**: nfc_role_kubernetes_prime cast type to bool
- **nfc_kubernetes**: prime node to always be labeled prime
- **nfc_kubernetes**: ability to add node labels and taints
## 1.12.0 (2024-07-08)
### Fix
@ -18,9 +33,6 @@
- **kubernetes_role**: get prime hostname
- **kubernetes_role**: set server var -> "https://" + hostvars[nfc_role_kubernetes_node_prime].ansible_host + ":6443"
- **kubernetes_role**: remove not nfc_role_kubernetes_cluster_upgraded | default(true) | bool section
- **kubernetes_role**: undo previous change
- **kubernetes_role**: remove commented out section
- **kubernetes_roles**: use inventory_hostname
## 1.11.0 (2024-06-27)
@ -48,46 +60,12 @@
## 1.10.0 (2024-05-03)
### Feat
- **nfc_kubernetes**: new variable 'nfc_role_kubernetes_node_prime' to denote the hostname of the prime node
### Fix
- **nfc_kubernetes**: correct 'Create Required directories' when logic
- **nfc_kubernetes**: only run tasks on master nodes
- **nfc_kubernetes**: only run tasks on prime node
- **nfc_kubernetes**: ensure correct node type selection for installation
### Refactor
- **nfc_kubernetes**: remove usage of prime node name over is_prime var
## 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

View File

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

View File

@ -46,6 +46,8 @@ nfc_role_kubernetes_install_kubevirt: false
nfc_role_kubernetes_kubevirt_operator_replicas: 1
nfc_role_kubernetes_node_labels: {} # Optional, Dict. Node labels.
nfc_role_kubernetes_node_taints: {} # Optional, Dict. Node taints.
# nfc_role_kubernetes_node_prime: '' # Mandatory*, string. the inventory_hostname of the prime node. ONLY required for multi-node deployments
nfc_role_kubernetes_oidc_enabled: false

View File

@ -58,14 +58,32 @@
kind: Node
metadata:
name: "{{ inventory_hostname }}"
{% if kubernetes_config.hosts[inventory_hostname].labels | default([]) | list | length > 0 -%}
{% if
nfc_role_kubernetes_node_labels
and
not nfc_role_kubernetes_prime | bool
-%}
labels:
{{ kubernetes_config.hosts[inventory_hostname].labels | to_nice_yaml | indent(4) }}
{{ nfc_role_kubernetes_node_labels | to_nice_yaml(indent=0) | indent(4) }}
{% elif
nfc_role_kubernetes_prime | bool
%}
labels:
node-role.kubernetes.io/prime: "true"
{% if nfc_role_kubernetes_node_labels %}
{{ nfc_role_kubernetes_node_labels | to_nice_yaml(indent=0) | indent(4) }}
{% endif %}
{%- endif +%}
{% if kubernetes_config.hosts[inventory_hostname].taints | default([]) | list | length > 0 -%}
{% if nfc_role_kubernetes_node_taints -%}
spec:
taints:
{{ kubernetes_config.hosts[inventory_hostname].taints | to_nice_yaml(indent=0) | indent(4) }}
{{ nfc_role_kubernetes_node_taints | to_nice_yaml(indent=0) | indent(4) }}
{% endif %}
dest: /var/lib/rancher/k3s/server/manifests/node-manifest-{{ inventory_hostname }}.yaml
owner: root
@ -73,6 +91,8 @@
mode: '700'
delegate_to: "{{ nfc_role_kubernetes_node_prime }}"
when:
kubernetes_config.hosts[inventory_hostname].labels | default([]) | list | length > 0
nfc_role_kubernetes_node_labels
or
kubernetes_config.hosts[inventory_hostname].taints | default([]) | list | length > 0
nfc_role_kubernetes_node_taints
or
nfc_role_kubernetes_prime | bool