]> xn--ix-yja.es Git - alex.git/commitdiff
Switch from haproxy-ingress to ingress-nginx
authoralex <alex@pdp7.net>
Sun, 11 Jun 2023 10:58:58 +0000 (12:58 +0200)
committeralex <alex@pdp7.net>
Sun, 11 Jun 2023 10:58:58 +0000 (12:58 +0200)
Having problems with reverse proxy setup, ingress-nginx seems to be officially recommended

personal_infra/k8s/base/kustomization.yml

index 9b0db99ad38e10190bf57a42153eebf130b03ed9..05b0b21e3fa83adf5143b7c8919b1439217f712d 100644 (file)
@@ -2,22 +2,31 @@ apiVersion: kustomize.config.k8s.io/v1beta1
 kind: Kustomization
 
 resources:
-  - https://raw.githubusercontent.com/jcmoraisjr/haproxy-ingress/master/docs/haproxy-ingress.yaml
+  - https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.0/deploy/static/provider/cloud/deploy.yaml
   - https://github.com/alexpdp7/talos-check/raw/main/manifest.yaml
 
 patches:
   - patch: |-
       - op: add
-        path: /spec/template/spec/containers/0/args/-
-        value: --watch-ingress-without-class
+        path: "/metadata/annotations/ingressclass.kubernetes.io~1is-default-class"
+        value: true
     target:
-      kind: DaemonSet
-      name: haproxy-ingress
-      namespace: ingress-controller
+      kind: IngressClass
+      name: nginx
   - patch: |
       apiVersion: v1
       kind: Namespace
       metadata:
-        name: ingress-controller
+        name: ingress-nginx
         labels:
           pod-security.kubernetes.io/enforce: privileged
+  - patch: |
+      apiVersion: apps/v1
+      kind: Deployment
+      metadata:
+        name: ingress-nginx-controller
+        namespace: ingress-nginx
+      spec:
+        template:
+          spec:
+            hostNetwork: true