From 0902d26581cd75f66595d14c7b1ba215fb959273 Mon Sep 17 00:00:00 2001 From: Asara Date: Sat, 8 Jul 2023 14:58:17 -0400 Subject: [PATCH] Lets give this a whirl --- argo/apps/templates/helm-apps.yaml | 6 +- argo/apps/values.yaml | 5 ++ argo/istio-ingress/Chart.yaml | 5 ++ .../templates/istio-ingress.yaml | 62 +++++++++++++++++++ argo/istio-ingress/values.yaml | 1 + 5 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 argo/istio-ingress/Chart.yaml create mode 100644 argo/istio-ingress/templates/istio-ingress.yaml create mode 100644 argo/istio-ingress/values.yaml diff --git a/argo/apps/templates/helm-apps.yaml b/argo/apps/templates/helm-apps.yaml index 251a8b7..1f4b474 100644 --- a/argo/apps/templates/helm-apps.yaml +++ b/argo/apps/templates/helm-apps.yaml @@ -1,4 +1,5 @@ {{ range .Values.helmApps }} +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: @@ -19,6 +20,9 @@ spec: - repoURL: 'https://git.minhas.io/Asara/k8s.git' targetRevision: master ref: values + - repoURL: 'https://git.minhas.io/Asara/k8s.git' + targetRevision: master + path: argo/istio-ingress syncPolicy: automated: prune: true @@ -30,5 +34,5 @@ spec: {{- if .ignoreDifferences }} ignoreDifferences: {{- .ignoreDifferences | toYaml | trim | nindent 4 }} {{- end }} ---- +... {{ end }} diff --git a/argo/apps/values.yaml b/argo/apps/values.yaml index 4c3eaf1..3d54619 100644 --- a/argo/apps/values.yaml +++ b/argo/apps/values.yaml @@ -5,3 +5,8 @@ helmApps: repoURL: https://okgolove.github.io/helm-charts chart: goldpinger revision: 5.5.0 + istio: + commonName: goldpinger.teapot.masked.name + ingressSelector: ingressgateway-internal + issuer: vault-issuer + port: 80 diff --git a/argo/istio-ingress/Chart.yaml b/argo/istio-ingress/Chart.yaml new file mode 100644 index 0000000..2826b10 --- /dev/null +++ b/argo/istio-ingress/Chart.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v2 +name: istio-ingress +version: 1.0.0 +... diff --git a/argo/istio-ingress/templates/istio-ingress.yaml b/argo/istio-ingress/templates/istio-ingress.yaml new file mode 100644 index 0000000..a1d5759 --- /dev/null +++ b/argo/istio-ingress/templates/istio-ingress.yaml @@ -0,0 +1,62 @@ +{{ if .Values.istio }} +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: {{ .Values.name }}-cert + namespace: istio-system +spec: + secretName: {{ .Values.name }}-cert + commonName: {{ .Values.istio.commonName }} + dnsNames: + - {{ .Values.istio.commonName }} +{{- range .Values.sans }} + - {{ . }} +{{- end }} + issuerRef: + name: {{ .Values.istio.issuer }} + kind: ClusterIssuer + group: cert-manager.io +... +--- +apiVersion: networking.istio.io/v1beta1 +kind: Gateway +metadata: + name: {{ .Values.name }}-gateway + namespace: {{ .Values.namespace }} +spec: + selector: + istio: {{ .Values.istio.ingressSelector }} + servers: + - port: + number: 443 + name: https + protocol: HTTPS + tls: + mode: SIMPLE + credentialName: {{ .Values.name }}-cert + hosts: + - {{ .Values.istio.commonName }} +... +--- +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: {{ .Values.name }}-gateway + namespace: {{ .Values.namespace }} +spec: + hosts: + - {{ .Values.istio.commonName }} + gateways: + - {{ .Values.name }}-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + port: + number: {{ .Values.istio.port }} + host: {{ .Values.name }} +... +{{ end }} diff --git a/argo/istio-ingress/values.yaml b/argo/istio-ingress/values.yaml new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/argo/istio-ingress/values.yaml @@ -0,0 +1 @@ +---