]> xn--ix-yja.es Git - alex.git/commitdiff
Draft add ingress
authoralex <alex@pdp7.net>
Sat, 11 Mar 2023 16:59:14 +0000 (17:59 +0100)
committeralex <alex@pdp7.net>
Sat, 11 Mar 2023 16:59:14 +0000 (17:59 +0100)
personal_infra/k8s/base/kustomization.yml [new file with mode: 0644]
personal_infra/playbooks/roles/talos/tasks/main.yaml

diff --git a/personal_infra/k8s/base/kustomization.yml b/personal_infra/k8s/base/kustomization.yml
new file mode 100644 (file)
index 0000000..ba0779f
--- /dev/null
@@ -0,0 +1,22 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+
+resources:
+  - https://raw.githubusercontent.com/jcmoraisjr/haproxy-ingress/master/docs/haproxy-ingress.yaml
+
+patches:
+  - patch: |-
+      - op: add
+        path: /spec/template/spec/containers/0/args/-
+        value: --watch-ingress-without-class
+    target:
+      kind: DaemonSet
+      name: haproxy-ingress
+      namespace: ingress-controller
+  - patch: |
+      apiVersion: v1
+      kind: Namespace
+      metadata:
+        name: ingress-controller
+        labels:
+          pod-security.kubernetes.io/enforce: privileged
index 5b42dfc28c1ca3af609caa227944209b551cdfc4..74d19d3fb7b41c73e4c0b8ef6dfbf62924695f46 100644 (file)
@@ -34,6 +34,8 @@
               routes:
                 - network: 0.0.0.0/0
                   gateway: {{ hostvars[proxmox.host].network.self_internal_ip }}
+        nodeLabels:
+          role: ingress-controller
     dest: "{{ inventory_dir }}/talos/host-{{ inventory_hostname }}.patch"
   delegate_to: 127.0.0.1
   when: "not 'resources' in nodes or nodes.resources|length == 0"