feat(kubevirt): optionally specify which nodes within a cluster to install kubeviirt

!35
This commit is contained in:
2024-03-13 00:08:51 +09:30
parent af26559485
commit 2b041c1cca
2 changed files with 18 additions and 19 deletions

View File

@ -152,17 +152,14 @@ k3s:
# podSubnet: 172.16.70.0/24 # Mandatory, String. CIDR # podSubnet: 172.16.70.0/24 # Mandatory, String. CIDR
# ServiceSubnet: 172.16.72.0/24 # Mandatory, String. CIDR # ServiceSubnet: 172.16.72.0/24 # Mandatory, String. CIDR
# #
# # Mandatory, String. Token to join nodes to the cluster
# node_token: !vault |
# $ANSIBLE_VAULT;1.2;AES256;kubernetes/cluster/production
# {rest_of encrypted key}
#
# #
# kube_virt: # kube_virt:
# enabled: false # enabled: false # Optional, Boolean. default=false. Install KubeVirt
#
# nodes: [] # Optional, List of String. default=inventory_hostname. List of nodes to install kibevirt on.
# #
# operator: # operator:
# replicas: 2 # replicas: 2 # Optional, Integer. How many virt_operators to deploy.
# #
# #
# oidc: # Used to configure Kubernetes with OIDC Authentication. # oidc: # Used to configure Kubernetes with OIDC Authentication.
@ -173,13 +170,13 @@ k3s:
# username_prefix: oidc # Optional, String. What to prefix to username # username_prefix: oidc # Optional, String. What to prefix to username
# groups_claim: roles # Mandatory, String. Claim name containing groups # groups_claim: roles # Mandatory, String. Claim name containing groups
# groups_prefix: '' # Optional, String. string to append to groups # groups_prefix: '' # Optional, String. string to append to groups
#
# hosts: # hosts:
#
# my-host-name: # my-host-name:
# labels: # labels:
# mylabel: myvalue # mylabel: myvalue
#
# taints: # taints:
# - effect: NoSchedule # - effect: NoSchedule
# key: taintkey # key: taintkey

View File

@ -73,6 +73,8 @@
when: > when: >
kubernetes_installed | default(false) | bool kubernetes_installed | default(false) | bool
and and
nfc_role_kubernetes_install_kubevirt kubernetes_config.kube_virt.enabled | default(nfc_role_kubernetes_install_kubevirt)
and
inventory_hostname in kubernetes_config.kube_virt.nodes | default([ inventory_hostname ]) | list
tags: tags:
- always - always