From c7bb0632d1625a9bb361a7c7fefae6f6dde8dd0f Mon Sep 17 00:00:00 2001 From: Udo Waechter Date: Fri, 30 Oct 2020 21:16:03 +0100 Subject: [PATCH] we-re traefik now --- _sys/haproxy-ingress.yaml | 8 ++- apps/gitea.yaml | 2 + apps/home-assistant.yaml | 1 - apps/pihole-deployment.yaml | 3 - apps/rompr/deployment.yaml | 121 ++++++++++++++++++------------------ 5 files changed, 67 insertions(+), 68 deletions(-) diff --git a/_sys/haproxy-ingress.yaml b/_sys/haproxy-ingress.yaml index bf5396a..a50f609 100644 --- a/_sys/haproxy-ingress.yaml +++ b/_sys/haproxy-ingress.yaml @@ -1,7 +1,7 @@ #https://raw.githubusercontent.com/haproxytech/kubernetes-ingress/master/deploy/haproxy-ingress.yaml #https://www.haproxy.com/documentation/kubernetes/latest/installation/community/kubernetes/ # -# NOTES: Image is not from haproxytech, no arm64 imgs +# NOTES: Images are not from haproxytech, no arm64 imgs --- apiVersion: v1 kind: Namespace @@ -80,7 +80,8 @@ metadata: name: haproxy namespace: haproxy-controller data: - + forwarded-for: "true" + load-balance: "leastconn" --- apiVersion: apps/v1 kind: Deployment @@ -101,7 +102,8 @@ spec: spec: containers: - name: ingress-default-backend - image: gcr.io/google_containers/defaultbackend:1.0 + #image: gcr.io/google_containers/defaultbackend:1.4 + image: starlingx4arm/defaultbackend:1.5-aarch64 ports: - containerPort: 8080 diff --git a/apps/gitea.yaml b/apps/gitea.yaml index 2e158c0..7f4f972 100644 --- a/apps/gitea.yaml +++ b/apps/gitea.yaml @@ -100,6 +100,8 @@ apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: gitea + annotations: + ingress.kubernetes.io/whitelist-x-forwarded-for: "true" spec: rules: - host: git-ui.lan diff --git a/apps/home-assistant.yaml b/apps/home-assistant.yaml index c8d9904..7495195 100644 --- a/apps/home-assistant.yaml +++ b/apps/home-assistant.yaml @@ -91,4 +91,3 @@ spec: - backend: serviceName: hassio servicePort: http - path: / diff --git a/apps/pihole-deployment.yaml b/apps/pihole-deployment.yaml index ba83655..99c5376 100644 --- a/apps/pihole-deployment.yaml +++ b/apps/pihole-deployment.yaml @@ -127,8 +127,6 @@ apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: pihole - annotations: - nginx.ingress.kubernetes.io/rewrite-target: /admin/$1 spec: rules: - host: pihole.lan @@ -137,7 +135,6 @@ spec: - backend: serviceName: pihole-tcp servicePort: http - path: /(.*) pathType: ImplementationSpecific --- apiVersion: v1 diff --git a/apps/rompr/deployment.yaml b/apps/rompr/deployment.yaml index fc3d2ae..9a5bb63 100644 --- a/apps/rompr/deployment.yaml +++ b/apps/rompr/deployment.yaml @@ -2,80 +2,79 @@ apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 kind: Deployment metadata: - name: rompr + name: rompr spec: - selector: - matchLabels: - app: rompr - strategy: - type: Recreate - template: - metadata: - labels: - app: rompr - spec: - containers: - - image: docker-registry.lan/rompr:arm64 - name: rompr - imagePullPolicy: Always - ports: - - containerPort: 9000 - name: php-fpm - volumeMounts: - - name: rompr-data - mountPath: /rompr - - image: sebp/lighttpd:latest - name: lighttpd - imagePullPolicy: IfNotPresent - ports: - - containerPort: 80 - name: http - volumeMounts: - - name: rompr-data - mountPath: /rompr - - name: rompr-lighttpd-config - mountPath: /etc/lighttpd - volumes: - - name: rompr-data - persistentVolumeClaim: - claimName: rompr-data - - name: rompr-lighttpd-config - configMap: - name: rompr-lighttpd-config + selector: + matchLabels: + app: rompr + strategy: + type: Recreate + template: + metadata: + labels: + app: rompr + spec: + containers: + - image: docker-registry.lan/rompr:arm64 + name: rompr + imagePullPolicy: Always + ports: + - containerPort: 9000 + name: php-fpm + volumeMounts: + - name: rompr-data + mountPath: /rompr + - image: sebp/lighttpd:latest + name: lighttpd + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http + volumeMounts: + - name: rompr-data + mountPath: /rompr + - name: rompr-lighttpd-config + mountPath: /etc/lighttpd + volumes: + - name: rompr-data + persistentVolumeClaim: + claimName: rompr-data + - name: rompr-lighttpd-config + configMap: + name: rompr-lighttpd-config --- apiVersion: v1 kind: Service metadata: - name: rompr + name: rompr spec: - ports: - - name: http - port: 80 - selector: - app: rompr + ports: + - name: http + port: 80 + selector: + app: rompr --- apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: - name: rompr + name: rompr spec: - rules: - - host: musik.lan - http: - paths: - - backend: - serviceName: rompr - servicePort: http + rules: + - host: musik.lan + http: + paths: + - backend: + serviceName: rompr + servicePort: http --- apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: rompr-data + name: rompr-data spec: - storageClassName: nfs-ssd - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 6Gi - + storageClassName: nfs-ssd + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 6Gi \ No newline at end of file