From b60fecde22a7094896eeca0757602b2c496865e8 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Fri, 26 May 2023 12:50:10 -0500 Subject: [PATCH] woot --- clusters/k3s/ip/ip-deployment.yml | 3 ++ clusters/k3s/ip/ip-ingress-traefik-tls.yaml | 2 +- clusters/k3s/ip/ip-ingress.yml | 56 +++++++++---------- clusters/k3s/ip/ip-service.yml | 2 +- clusters/k3s/technitium-localstorage.yaml | 59 +++++++++++++++++++++ 5 files changed, 92 insertions(+), 30 deletions(-) create mode 100644 clusters/k3s/technitium-localstorage.yaml diff --git a/clusters/k3s/ip/ip-deployment.yml b/clusters/k3s/ip/ip-deployment.yml index 9001aa4..5481ea4 100644 --- a/clusters/k3s/ip/ip-deployment.yml +++ b/clusters/k3s/ip/ip-deployment.yml @@ -17,6 +17,9 @@ spec: - name: ip image: gmcintire/ip:main ports: + - name: http + containerPort: 4000 + protocol: TCP - name: epmd containerPort: 4369 protocol: TCP diff --git a/clusters/k3s/ip/ip-ingress-traefik-tls.yaml b/clusters/k3s/ip/ip-ingress-traefik-tls.yaml index d06bea6..c032a19 100644 --- a/clusters/k3s/ip/ip-ingress-traefik-tls.yaml +++ b/clusters/k3s/ip/ip-ingress-traefik-tls.yaml @@ -6,7 +6,7 @@ metadata: annotations: kubernetes.io/ingress.class: traefik cert-manager.io/cluster-issuer: letsencrypt-prod - traefik.ingress.kubernetes.io/router.middlewares: default-redirect-https@kubernetescrd + # traefik.ingress.kubernetes.io/router.middlewares: default-redirect-https@kubernetescrd spec: rules: - host: ip.vntx.net diff --git a/clusters/k3s/ip/ip-ingress.yml b/clusters/k3s/ip/ip-ingress.yml index 588add4..30373a3 100644 --- a/clusters/k3s/ip/ip-ingress.yml +++ b/clusters/k3s/ip/ip-ingress.yml @@ -1,29 +1,29 @@ ## More detailed template -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: ip-deployment - namespace: ip - labels: - app.kubernetes.io/name: ip-deployment - app.kubernetes.io/instance: ip-deployment - app.kubernetes.io/version: "1" - annotations: - kubernetes.io/ingress.class: nginx - cert-manager.io/cluster-issuer: letsencrypt-prod -spec: - tls: - - hosts: - - ip.vntx.net - secretName: ip-deployment-ingress-secret - rules: - - host: ip.vntx.net - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: ip-service - port: - number: 4000 +# apiVersion: networking.k8s.io/v1 +# kind: Ingress +# metadata: +# name: ip-deployment +# namespace: ip +# labels: +# app.kubernetes.io/name: ip-deployment +# app.kubernetes.io/instance: ip-deployment +# app.kubernetes.io/version: "1" +# annotations: +# kubernetes.io/ingress.class: nginx +# cert-manager.io/cluster-issuer: letsencrypt-prod +# spec: +# tls: +# - hosts: +# - ip.vntx.net +# secretName: ip-deployment-ingress-secret +# rules: +# - host: ip.vntx.net +# http: +# paths: +# - path: / +# pathType: Prefix +# backend: +# service: +# name: ip-service +# port: +# number: 4000 diff --git a/clusters/k3s/ip/ip-service.yml b/clusters/k3s/ip/ip-service.yml index dee61af..da3f344 100644 --- a/clusters/k3s/ip/ip-service.yml +++ b/clusters/k3s/ip/ip-service.yml @@ -8,7 +8,7 @@ spec: app: ip type: ClusterIP ports: - - name: https + - name: http port: 4000 targetPort: 4000 protocol: TCP diff --git a/clusters/k3s/technitium-localstorage.yaml b/clusters/k3s/technitium-localstorage.yaml new file mode 100644 index 0000000..d4af693 --- /dev/null +++ b/clusters/k3s/technitium-localstorage.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: technitium +spec: + selector: + matchLabels: + app: technitium + replicas: 1 + template: + metadata: + labels: + app: technitium + spec: + containers: + - name: technitium + image: technitium/dns-server:11.1.1 + volumeMounts: + - name: technitium-volume + mountPath: /etc/dns + volumes: + - name: technitium-volume + persistentVolumeClaim: + claimName: technitium-pvc +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: technitium-pvc + namespace: default +spec: + accessModes: + - ReadWriteOnce + storageClassName: local-path + resources: + requests: + storage: 2Gi +--- +kind: Service +apiVersion: v1 +metadata: + name: technitium-loadbalancer +spec: + ports: + - name: technitium-udp + port: 53 + targetPort: 53 + protocol: UDP + - name: technitium-tcp + port: 53 + targetPort: 53 + protocol: TCP + - name: technitium-http + port: 5380 + targetPort: 5380 + protocol: TCP + selector: + app: technitium + type: LoadBalancer