style(k3s): change code style

change code style
This commit is contained in:
赵安家 2021-05-08 18:39:19 +08:00
parent 075ef165c5
commit d563dcca05
4 changed files with 17 additions and 10 deletions

View File

@ -76,7 +76,7 @@ consistency. These are generally cluster-level configuration.
| `k3s_use_unsupported_config` | Allow the use of unsupported configurations in k3s. | `false` | | `k3s_use_unsupported_config` | Allow the use of unsupported configurations in k3s. | `false` |
| `k3s_etcd_datastore` | Enable etcd embedded datastore (read notes below). | `false` | | `k3s_etcd_datastore` | Enable etcd embedded datastore (read notes below). | `false` |
| `k3s_debug` | Enable debug logging on the k3s service. | `false` | | `k3s_debug` | Enable debug logging on the k3s service. | `false` |
| `k3s_registries` | Configuration containerd's registries config file. | `mirrors:\n configs:\n` | | `k3s_registries` | Registries configuration file content. | `{ mirrors: {}, configs:{} }` |
### K3S Service Configuration ### K3S Service Configuration

View File

@ -98,9 +98,10 @@ k3s_become_for_package_install: null
k3s_become_for_kubectl: null k3s_become_for_kubectl: null
k3s_become_for_uninstall: null k3s_become_for_uninstall: null
# Private registry configuration.
# Rancher k3s documentation: https://rancher.com/docs/k3s/latest/en/installation/private-registry/
k3s_registries: k3s_registries:
# rancher k3s doc https://rancher.com/docs/k3s/latest/en/installation/private-registry/
mirrors: mirrors:
# docker.io: # docker.io:
# endpoint: # endpoint:
@ -108,9 +109,14 @@ k3s_registries:
configs: configs:
# "mycustomreg:5000": # "mycustomreg:5000":
# auth: # auth:
# username: xxxxxx # this is the registry username # # this is the registry username
# password: xxxxxx # this is the registry password # username: xxxxxx
# # this is the registry password
# password: xxxxxx
# tls: # tls:
# cert_file: # path to the cert file used in the registry # # path to the cert file used in the registry
# key_file: # path to the key file used in the registry # cert_file:
# ca_file: # path to the ca file used in the registry # # path to the key file used in the registry
# key_file:
# # path to the ca file used in the registry
# ca_file:

View File

@ -4,7 +4,7 @@
ansible.builtin.template: ansible.builtin.template:
src: registries.yaml.j2 src: registries.yaml.j2
dest: "{{ k3s_config_dir }}/registries.yaml" dest: "{{ k3s_config_dir }}/registries.yaml"
mode: 0644 mode: 0600
notify: notify:
- reload systemd - reload systemd
- restart k3s - restart k3s

View File

@ -1 +1,2 @@
---
{{ k3s_registries | to_nice_yaml }} {{ k3s_registries | to_nice_yaml }}