Browse Source

Refactor: var kube_override_hostname only reserve in kubespray-defaults

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
pull/11633/head
ChengHao Yang 2 weeks ago
parent
commit
c27cc33bd7
Failed to extract signature
5 changed files with 2 additions and 31 deletions
  1. 6
      inventory/sample/group_vars/k8s_cluster/k8s-cluster.yml
  2. 7
      roles/kubernetes/control-plane/defaults/main/main.yml
  3. 7
      roles/kubernetes/kubeadm/defaults/main.yml
  4. 7
      roles/kubernetes/node/defaults/main.yml
  5. 6
      roles/kubespray-defaults/defaults/main/main.yml

6
inventory/sample/group_vars/k8s_cluster/k8s-cluster.yml

@ -140,11 +140,7 @@ kube_proxy_nodeport_addresses: >-
{%- endif -%}
# If non-empty, will use this string as identification instead of the actual hostname
# kube_override_hostname: >-
# {%- if cloud_provider is defined -%}
# {%- else -%}
# {{ inventory_hostname }}
# {%- endif -%}
# kube_override_hostname: {{ inventory_hostname }}
## Encrypting Secret Data at Rest
kube_encrypt_secret_data: false

7
roles/kubernetes/control-plane/defaults/main/main.yml

@ -184,13 +184,6 @@ kube_encryption_algorithm: "secretbox"
# Which kubernetes resources to encrypt
kube_encryption_resources: [secrets]
# If non-empty, will use this string as identification instead of the actual hostname
kube_override_hostname: >-
{%- if cloud_provider is defined -%}
{%- else -%}
{{ inventory_hostname }}
{%- endif -%}
secrets_encryption_query: "resources[*].providers[0].{{ kube_encryption_algorithm }}.keys[0].secret"
## Support tls min version, Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13.

7
roles/kubernetes/kubeadm/defaults/main.yml

@ -6,10 +6,3 @@ kubeadm_join_timeout: 120s
# Enable kubeadm file discovery if anonymous access has been removed
kubeadm_use_file_discovery: "{{ remove_anonymous_access }}"
# If non-empty, will use this string as identification instead of the actual hostname
kube_override_hostname: >-
{%- if cloud_provider is defined -%}
{%- else -%}
{{ inventory_hostname }}
{%- endif -%}

7
roles/kubernetes/node/defaults/main.yml

@ -134,13 +134,6 @@ kubelet_logfiles_max_size: 10Mi
## Support custom flags to be passed to kubelet
kubelet_custom_flags: []
# If non-empty, will use this string as identification instead of the actual hostname
kube_override_hostname: >-
{%- if cloud_provider is defined -%}
{%- else -%}
{{ inventory_hostname }}
{%- endif -%}
# The read-only port for the Kubelet to serve on with no authentication/authorization.
kube_read_only_port: 0

6
roles/kubespray-defaults/defaults/main/main.yml

@ -253,11 +253,7 @@ kube_apiserver_bind_address: 0.0.0.0
kube_apiserver_port: 6443
# If non-empty, will use this string as identification instead of the actual hostname
kube_override_hostname: >-
{%- if cloud_provider is defined -%}
{%- else -%}
{{ inventory_hostname }}
{%- endif -%}
kube_override_hostname: "{{ inventory_hostname }}"
# define kubelet config dir for dynamic kubelet
# kubelet_config_dir:

Loading…
Cancel
Save