mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
Merge pull request #47083 from mikedanese/restart-fix
Automatic merge from submit-queue save kubelet cert between reboots on CVM fixes https://github.com/kubernetes/kubernetes/issues/46982
This commit is contained in:
commit
66041a9498
@ -181,6 +181,7 @@
|
|||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{% set kubelet_auth = "--anonymous-auth=false --authorization-mode=Webhook --client-ca-file=" + pillar.get('ca_cert_bundle_path', '/var/lib/kubelet/ca.crt') %}
|
{% set kubelet_auth = "--anonymous-auth=false --authorization-mode=Webhook --client-ca-file=" + pillar.get('ca_cert_bundle_path', '/var/lib/kubelet/ca.crt') %}
|
||||||
|
{% set pki=" --cert-dir=/var/lib/kubelet/pki" -%}
|
||||||
|
|
||||||
# test_args has to be kept at the end, so they'll overwrite any prior configuration
|
# test_args has to be kept at the end, so they'll overwrite any prior configuration
|
||||||
DAEMON_ARGS="{{daemon_args}} {{api_servers}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{cloud_config}} {{config}} {{manifest_url}} --allow-privileged={{pillar['allow_privileged']}} {{log_level}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{non_masquerade_cidr}} {{cgroup_root}} {{system_container}} {{pod_cidr}} {{ master_kubelet_args }} {{cpu_cfs_quota}} {{network_plugin}} {{kubelet_port}} {{ hairpin_mode }} {{enable_custom_metrics}} {{runtime_container}} {{kubelet_container}} {{node_labels}} {{eviction_hard}} {{kubelet_auth}} {{feature_gates}} {{test_args}}"
|
DAEMON_ARGS="{{daemon_args}} {{api_servers}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{cloud_config}} {{config}} {{manifest_url}} --allow-privileged={{pillar['allow_privileged']}} {{log_level}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{non_masquerade_cidr}} {{cgroup_root}} {{system_container}} {{pod_cidr}} {{ master_kubelet_args }} {{cpu_cfs_quota}} {{network_plugin}} {{kubelet_port}} {{ hairpin_mode }} {{enable_custom_metrics}} {{runtime_container}} {{kubelet_container}} {{node_labels}} {{eviction_hard}} {{kubelet_auth}} {{pki}} {{feature_gates}} {{test_args}}"
|
||||||
|
@ -19,6 +19,11 @@
|
|||||||
- group: root
|
- group: root
|
||||||
- mode: 755
|
- mode: 755
|
||||||
|
|
||||||
|
/var/lib/kubelet/pki:
|
||||||
|
file.directory:
|
||||||
|
- mode: 755
|
||||||
|
- makedirs: True
|
||||||
|
|
||||||
# The default here is that this file is blank. If this is the case, the kubelet
|
# The default here is that this file is blank. If this is the case, the kubelet
|
||||||
# won't be able to parse it as JSON and it will not be able to publish events
|
# won't be able to parse it as JSON and it will not be able to publish events
|
||||||
# to the apiserver. You'll see a single error line in the kubelet start up file
|
# to the apiserver. You'll see a single error line in the kubelet start up file
|
||||||
@ -57,6 +62,7 @@ fix-service-kubelet:
|
|||||||
cmd.wait:
|
cmd.wait:
|
||||||
- name: /opt/kubernetes/helpers/services bounce kubelet
|
- name: /opt/kubernetes/helpers/services bounce kubelet
|
||||||
- watch:
|
- watch:
|
||||||
|
- file: /var/lib/kubelet/pki
|
||||||
- file: /usr/local/bin/kubelet
|
- file: /usr/local/bin/kubelet
|
||||||
- file: {{ pillar.get('systemd_system_path') }}/kubelet.service
|
- file: {{ pillar.get('systemd_system_path') }}/kubelet.service
|
||||||
- file: {{ environment_file }}
|
- file: {{ environment_file }}
|
||||||
|
Loading…
Reference in New Issue
Block a user