Browse Source

local volume provisioner should not run on control plane nodes by default (#8805)

pull/8811/head
spaced 2 years ago
committed by GitHub
parent
commit
bb67b654c5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions
  1. 3
      inventory/sample/group_vars/k8s_cluster/addons.yml
  2. 1
      roles/kubernetes-apps/external_provisioner/local_volume_provisioner/defaults/main.yml
  3. 5
      roles/kubernetes-apps/external_provisioner/local_volume_provisioner/templates/local-volume-provisioner-ds.yml.j2

3
inventory/sample/group_vars/k8s_cluster/addons.yml

@ -52,6 +52,9 @@ local_volume_provisioner_enabled: false
# - "2"
# volume_mode: Filesystem
# fs_type: ext4
# local_volume_provisioner_tolerations:
# - effect: NoSchedule
# operator: Exists
# CSI Volume Snapshot Controller deployment, set this to true if your CSI is able to manage snapshots
# currently, setting cinder_csi_enabled=true would automatically enable the snapshot controller

1
roles/kubernetes-apps/external_provisioner/local_volume_provisioner/defaults/main.yml

@ -5,6 +5,7 @@ local_volume_provisioner_nodelabels: []
# - kubernetes.io/hostname
# - topology.kubernetes.io/region
# - topology.kubernetes.io/zone
local_volume_provisioner_tolerations: []
# Levarages Ansibles string to Python datatype casting. Otherwise the dict_key isn't substituted
# see https://github.com/ansible/ansible/issues/17324
local_volume_provisioner_use_node_name_only: false

5
roles/kubernetes-apps/external_provisioner/local_volume_provisioner/templates/local-volume-provisioner-ds.yml.j2

@ -20,9 +20,10 @@ spec:
spec:
priorityClassName: {% if local_volume_provisioner_namespace == 'kube-system' %}system-node-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
serviceAccountName: local-volume-provisioner
{% if local_volume_provisioner_tolerations %}
tolerations:
- effect: NoSchedule
operator: Exists
{{ local_volume_provisioner_tolerations | to_nice_yaml(indent=2) | indent(width=8) }}
{% endif %}
containers:
- name: provisioner
image: {{ local_volume_provisioner_image_repo }}:{{ local_volume_provisioner_image_tag }}

Loading…
Cancel
Save