Skip to content
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

restart & helm as part of role, doc #723

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@ For the details, please check this link: https://docs.k3s.io/

## Using the role

### Deploying k3s
### Deploy

```yaml
- include_role:
name: k3s
```

### Restarting k3s is needed after gets deployed
The role will:
- Configure `ingress_class` automatically to use traefik
- Install helm
- Deploy and restart k3s

### (Optional) Restart

There is a restart role that can be used if needed

```yaml
- include_role:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Copyright 2024 Dynatrace LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -12,9 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

#
# Set ingress_class to traefik
#
################################
# Set ingress_class to traefik #
################################
- include_role:
name: config-v2
tasks_from: set-var
Expand Down Expand Up @@ -47,11 +48,23 @@
src: /etc/rancher/k3s/k3s.yaml
dest: /home/{{ ace_box_user }}/.kube/config

# Install helm via
#################
# Installs helm #
#################
- name: Install Helm
become: true
become_user: root
community.general.snap:
name:
- helm
classic: yes
classic: yes

###############
# Restart k3s #
###############
- name: k3s restart
become: true
become_user: root
ansible.builtin.service:
name: k3s
state: restarted
Loading