Install helm plugins;Apply manifests
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Danny Bessems 2022-05-02 11:00:21 +02:00
parent 111c06ce05
commit 66bb9831e4
2 changed files with 38 additions and 1 deletions

View File

@ -209,15 +209,28 @@
no_log: true no_log: true
loop: "{{ helm.repositories }}" loop: "{{ helm.repositories }}"
- name: Install Helm Diff
kubernetes.core.helm_plugin:
state: present
plugin_path: "{{ item.path }}"
loop: "{{ helm.plugins }}"
- name: Install Helm charts - name: Install Helm charts
kubernetes.core.helm: kubernetes.core.helm:
name: "{{ item.name }}" name: "{{ item.name }}"
chart_ref: "{{ item.ref }}" chart_ref: "{{ item.ref }}"
namespace: "{{ item.namespace }}" namespace: "{{ item.namespace }}"
create_namespace: yes create_namespace: yes
wait: yes # wait: yes
kubeconfig: "{{ kubeconfig.path }}" kubeconfig: "{{ kubeconfig.path }}"
values: "{{ item.setvalues | default(omit) }}" values: "{{ item.setvalues | default(omit) }}"
loop: "{{ helm.charts }}" loop: "{{ helm.charts }}"
throttle: 1 throttle: 1
- name: Apply manifests
kubernetes.core.k8s:
definition: "{{ item.definition }}"
wait: yes
loop: "{{ manifests }}"
loop_control:
label: "{{ item.name }}"

View File

@ -1,4 +1,6 @@
helm: helm:
plugins:
- path: https://github.com/databus23/helm-diff
repositories: repositories:
- name: longhorn - name: longhorn
url: https://charts.longhorn.io url: https://charts.longhorn.io
@ -56,3 +58,25 @@ helm:
# - name: fleet # - name: fleet
# namespace: fleet-system # namespace: fleet-system
# ref: "https://github.com/rancher/fleet/releases/download/v0.3.9/fleet-0.3.9.tgz" # ref: "https://github.com/rancher/fleet/releases/download/v0.3.9/fleet-0.3.9.tgz"
manifests:
- name: ingress_longhorn-frontend
definition: >-
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: longhorn-system
name: longhorn-ingress
annotations:
kubernetes.io/ingress.class: "traefik"
spec:
rules:
- host: storage.bessems.lan
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: longhorn-frontend
port:
number: 80