diff --git a/playbook.yml b/playbook.yml index f8cdaf4..1977d99 100644 --- a/playbook.yml +++ b/playbook.yml @@ -209,15 +209,28 @@ no_log: true loop: "{{ helm.repositories }}" + - name: Install Helm Diff + kubernetes.core.helm_plugin: + state: present + plugin_path: "{{ item.path }}" + loop: "{{ helm.plugins }}" + - name: Install Helm charts kubernetes.core.helm: name: "{{ item.name }}" chart_ref: "{{ item.ref }}" namespace: "{{ item.namespace }}" create_namespace: yes - wait: yes + # wait: yes kubeconfig: "{{ kubeconfig.path }}" values: "{{ item.setvalues | default(omit) }}" loop: "{{ helm.charts }}" throttle: 1 + - name: Apply manifests + kubernetes.core.k8s: + definition: "{{ item.definition }}" + wait: yes + loop: "{{ manifests }}" + loop_control: + label: "{{ item.name }}" diff --git a/vars/applications.k3s.yml b/vars/applications.k3s.yml index aa8dd80..d32fdac 100644 --- a/vars/applications.k3s.yml +++ b/vars/applications.k3s.yml @@ -1,4 +1,6 @@ helm: + plugins: + - path: https://github.com/databus23/helm-diff repositories: - name: longhorn url: https://charts.longhorn.io @@ -56,3 +58,25 @@ helm: # - name: fleet # namespace: fleet-system # 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