Add graceful shutdown configuration
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
dc4fa31070
commit
3f24a4af1a
@ -1,3 +1,22 @@
|
|||||||
|
- name: Store custom configuration files
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: "{{ item.filename }}"
|
||||||
|
content: "{{ item.content }}"
|
||||||
|
loop:
|
||||||
|
- filename: /etc/rancher/k3s/config.yaml
|
||||||
|
content: |
|
||||||
|
kubelet-arg:
|
||||||
|
- "config=/etc/rancher/k3s/kubelet.config"
|
||||||
|
- filename: /etc/rancher/k3s/kubelet.config
|
||||||
|
content: |
|
||||||
|
apiVersion: kubelet.config.k8s.io/v1beta1
|
||||||
|
kind: KubeletConfiguration
|
||||||
|
|
||||||
|
shutdownGracePeriod: 180s
|
||||||
|
shtudownGracePeriodCriticalPods: 60s
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.filename }}"
|
||||||
|
|
||||||
- name: Gather service facts
|
- name: Gather service facts
|
||||||
ansible.builtin.service_facts:
|
ansible.builtin.service_facts:
|
||||||
# Module requires no attributes
|
# Module requires no attributes
|
||||||
@ -8,7 +27,7 @@
|
|||||||
chdir: /opt/metacluster/k3s
|
chdir: /opt/metacluster/k3s
|
||||||
environment:
|
environment:
|
||||||
INSTALL_K3S_SKIP_DOWNLOAD: 'true'
|
INSTALL_K3S_SKIP_DOWNLOAD: 'true'
|
||||||
INSTALL_K3S_EXEC: 'server --cluster-init --disable local-storage'
|
INSTALL_K3S_EXEC: 'server --cluster-init --disable local-storage --config /etc/rancher/k3s/config.yaml'
|
||||||
when: ansible_facts.services['k3s.service'] is undefined
|
when: ansible_facts.services['k3s.service'] is undefined
|
||||||
|
|
||||||
- name: Debug possible taints on k3s node
|
- name: Debug possible taints on k3s node
|
||||||
|
@ -154,6 +154,7 @@ components:
|
|||||||
parse_logic: cat values.yaml | yq eval '.. | select(has("repository")) | .repository + ":" + .tag'
|
parse_logic: cat values.yaml | yq eval '.. | select(has("repository")) | .repository + ":" + .tag'
|
||||||
chart_values: !unsafe |
|
chart_values: !unsafe |
|
||||||
defaultSettings:
|
defaultSettings:
|
||||||
|
allowNodeDrainWithLastHealthyReplica: true
|
||||||
defaultDataPath: /mnt/blockstorage
|
defaultDataPath: /mnt/blockstorage
|
||||||
defaultReplicaCount: 1
|
defaultReplicaCount: 1
|
||||||
ingress:
|
ingress:
|
||||||
|
Loading…
Reference in New Issue
Block a user