From 066c3ce78e6d46032a7366d663a856dd3eb86c3a Mon Sep 17 00:00:00 2001 From: Morten Olsen Date: Fri, 5 Dec 2025 08:38:39 +0100 Subject: [PATCH] add truenas route --- apps/charts/truenas/Chart.yaml | 3 ++ apps/charts/truenas/templates/a.yaml | 30 +++++++++++++++++++ .../truenas/templates/virtual-service.yaml | 18 +++++++++++ apps/charts/truenas/values.yaml | 1 + 4 files changed, 52 insertions(+) create mode 100644 apps/charts/truenas/Chart.yaml create mode 100644 apps/charts/truenas/templates/a.yaml create mode 100644 apps/charts/truenas/templates/virtual-service.yaml create mode 100644 apps/charts/truenas/values.yaml diff --git a/apps/charts/truenas/Chart.yaml b/apps/charts/truenas/Chart.yaml new file mode 100644 index 0000000..69c1e4c --- /dev/null +++ b/apps/charts/truenas/Chart.yaml @@ -0,0 +1,3 @@ +apiVersion: v2 +version: 1.0.0 +name: truenas diff --git a/apps/charts/truenas/templates/a.yaml b/apps/charts/truenas/templates/a.yaml new file mode 100644 index 0000000..a00d303 --- /dev/null +++ b/apps/charts/truenas/templates/a.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: Service +metadata: + name: truenas + namespace: prod +spec: + ports: + - protocol: TCP + port: 80 + targetPort: 80 + clusterIP: None + type: ClusterIP + +--- +apiVersion: discovery.k8s.io/v1 +kind: EndpointSlice +metadata: + name: truenas + namespace: prod + labels: + kubernetes.io/service-name: truenas + annotations: + argocd.argoproj.io/sync-options: Prune=false;ServerSideApply=true +addressType: IPv4 +endpoints: + - addresses: + - "192.168.20.106" +ports: + - port: 80 + protocol: TCP diff --git a/apps/charts/truenas/templates/virtual-service.yaml b/apps/charts/truenas/templates/virtual-service.yaml new file mode 100644 index 0000000..0af9b24 --- /dev/null +++ b/apps/charts/truenas/templates/virtual-service.yaml @@ -0,0 +1,18 @@ +apiVersion: networking.istio.io/v1 +kind: VirtualService +metadata: + name: "{{ .Release.Name }}" + namespace: "{{ .Release.Namespace }}" +spec: + gateways: + - "{{ .Values.globals.istio.gateway }}" + - mesh + hosts: + - "{{ .Values.subdomain }}.{{ .Values.globals.domain }}" + - mesh + http: + - route: + - destination: + host: "{{ .Release.Name }}" + port: + number: 80 diff --git a/apps/charts/truenas/values.yaml b/apps/charts/truenas/values.yaml new file mode 100644 index 0000000..bed6cb6 --- /dev/null +++ b/apps/charts/truenas/values.yaml @@ -0,0 +1 @@ +subdomain: truenas \ No newline at end of file