-
-
Notifications
You must be signed in to change notification settings - Fork 291
add k0s support #1123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
add k0s support #1123
Changes from 9 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
ae2718a
ignore idea
brunnels 20764e9
Initial work on support for k0s
brunnels 61d4078
* Changed config param to bootstrap_distribution
brunnels 9cf455d
* Switched to single storage path for openebs
brunnels 1d984ba
* added the storageclass name to be declarative
brunnels 3600011
* added newline
brunnels 86ff24c
* fixed spacing in K0sTasks
brunnels 3bb45e1
* updated configure task to use venv
brunnels 7ce2910
* tweaked configure task cmd
brunnels f40699b
* tweaked k0s task cmd
brunnels 384d074
* fixed whitespace
brunnels 2f31c7a
add k0sctl to brew tasks
onedr0p 9915a21
Update bootstrap/vars/config.sample.yaml
onedr0p 394a261
Update bootstrap/vars/config.sample.yaml
onedr0p 3f98769
Update k0s-config.yaml.j2
onedr0p ed9aad9
Update config.sample.yaml
onedr0p efd3f80
controllerManager and scheduler bind to `0.0.0.0` for metrics
onedr0p 1598f73
Update custom-cilium-helmchart.yaml.j2.j2
onedr0p e9c0eec
Update helmvalues.yaml.j2
onedr0p cacc851
Update bootstrap/tasks/addons/main.yaml
onedr0p 3252c39
first pass at readme updates
onedr0p d6ded50
update placement of k0sconfig options
onedr0p ce13bd5
disable telemetry on k0sctl too
onedr0p 5a7808d
disable k0s telemetry in env too
onedr0p 43eca2c
update: jinja spacing in k0sconfig
onedr0p f2bc783
fix: ensure bootstrap_local_storage_path is delete on nuke
onedr0p 178f2fa
fix: update renovate regex for k3s/k0s
onedr0p 91455ce
fix: update nuke playbook and only include k3s task when k3s
onedr0p ef99521
fix: update nuke playbook and only include k3s task when k3s and incl…
onedr0p File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,6 @@ kubeconfig | |
.venv* | ||
# Taskfile | ||
.tasks | ||
# intellij | ||
.idea | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
version: "3" | ||
|
||
tasks: | ||
|
||
kubeconfig: | ||
desc: Gets k0s cluster kubeconfig | ||
cmds: | ||
- k0sctl kubeconfig -c k0s-config.yaml > kubeconfig | ||
preconditions: | ||
- { msg: "k0s-config.yaml not found", sh: "test -f {{.ROOT_DIR}}/k0s-config.yaml" } | ||
|
||
apply: | ||
desc: Apply k0s cluster k0s-config.yaml | ||
cmds: | ||
- k0sctl apply --config k0s-config.yaml | ||
- task: kubeconfig | ||
preconditions: | ||
- { msg: "k0s-config.yaml not found", sh: "test -f {{.ROOT_DIR}}/k0s-config.yaml" } | ||
|
||
reset: | ||
desc: Resets the k0s cluster | ||
cmd: k0sctl reset --config k0s-config.yaml | ||
preconditions: | ||
- { msg: "k0s-config.yaml not found", sh: "test -f {{.ROOT_DIR}}/k0s-config.yaml" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
- name: Template k0s configuration file | ||
ansible.builtin.template: | ||
src: "templates/k0s-config.yaml.j2" | ||
dest: "{{ repository_path }}/k0s-config.yaml" | ||
mode: "0644" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
brunnels marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Set addon facts | ||
ansible.builtin.set_fact: | ||
optional_name: coredns | ||
optional_namespace: kube-system | ||
|
||
- name: Ensure directories exist for {{ optional_namespace }}/{{ optional_name }} | ||
when: item.state == 'directory' | ||
ansible.builtin.file: | ||
path: "{{ repository_path }}/kubernetes/apps/{{ optional_namespace }}/{{ optional_name }}/{{ item.path }}" | ||
state: directory | ||
mode: "0755" | ||
with_community.general.filetree: ["../templates/optional/{{ optional_name }}/"] | ||
|
||
- name: Template unencrypted files for {{ optional_namespace }}/{{ optional_name }} | ||
when: item.state == 'file' and 'sops' not in item.path | ||
ansible.builtin.template: | ||
src: "{{ item.src }}" | ||
dest: "{{ repository_path }}/kubernetes/apps/{{ optional_namespace }}/{{ optional_name }}/{{ item.path | replace('.j2', '') }}" | ||
mode: "0644" | ||
with_community.general.filetree: ["../templates/optional/{{ optional_name }}/"] | ||
|
||
- name: Template encrypted files for {{ optional_namespace }}/{{ optional_name }} | ||
block: | ||
- name: Template encrypted files | ||
when: item.state == 'file' and 'sops' in item.path | ||
community.sops.sops_encrypt: | ||
path: "{{ repository_path }}/kubernetes/apps/{{ optional_namespace }}/{{ optional_name }}/{{ item.path | replace('.j2', '') }}" | ||
encrypted_regex: ^(data|stringData)$ | ||
age: ["{{ bootstrap_age_public_key }}"] | ||
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}" | ||
mode: "0644" | ||
force: true | ||
with_community.general.filetree: ["../templates/optional/{{ optional_name }}/"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
|
||
- name: Process optional opendns | ||
brunnels marked this conversation as resolved.
Show resolved
Hide resolved
|
||
when: bootstrap_distribution == "k3s" | ||
ansible.builtin.include_tasks: coredns.yaml | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.