Skip to content

Commit

Permalink
style(k3s): change code style
Browse files Browse the repository at this point in the history
change code style
  • Loading branch information
anjia0532 committed May 8, 2021
1 parent 075ef16 commit d563dcc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_etcd_datastore` | Enable etcd embedded datastore (read notes below). | `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

Expand Down
20 changes: 13 additions & 7 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,25 @@ k3s_become_for_package_install: null
k3s_become_for_kubectl: null
k3s_become_for_uninstall: null


# Private registry configuration.
# Rancher k3s documentation: https://rancher.com/docs/k3s/latest/en/installation/private-registry/
k3s_registries:
# rancher k3s doc https://rancher.com/docs/k3s/latest/en/installation/private-registry/

mirrors:
# docker.io:
# endpoint:
# - "https://mycustomreg.com:5000"
configs:
# "mycustomreg:5000":
# auth:
# username: xxxxxx # this is the registry username
# password: xxxxxx # this is the registry password
# # this is the registry username
# username: xxxxxx
# # this is the registry password
# password: xxxxxx
# tls:
# cert_file: # path to the cert file used in the registry
# key_file: # path to the key file used in the registry
# ca_file: # path to the ca file used in the registry
# # path to the cert file used in the registry
# cert_file:
# # path to the key file used in the registry
# key_file:
# # path to the ca file used in the registry
# ca_file:
4 changes: 2 additions & 2 deletions tasks/build/containerd/registries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
ansible.builtin.template:
src: registries.yaml.j2
dest: "{{ k3s_config_dir }}/registries.yaml"
mode: 0644
mode: 0600
notify:
- reload systemd
- restart k3s
become: "{{ k3s_become_for_install_dir | ternary(true, false, k3s_become_for_all) }}"
become: "{{ k3s_become_for_install_dir | ternary(true, false, k3s_become_for_all) }}"
1 change: 1 addition & 0 deletions templates/registries.yaml.j2
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
---
{{ k3s_registries | to_nice_yaml }}

0 comments on commit d563dcc

Please sign in to comment.