Lets give this a whirl

This commit is contained in:
Amarpreet Minhas 2023-07-08 14:58:17 -04:00
parent fda53c3ac1
commit 0902d26581
5 changed files with 78 additions and 1 deletions

View file

@ -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 }}

View file

@ -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

View file

@ -0,0 +1,5 @@
---
apiVersion: v2
name: istio-ingress
version: 1.0.0
...

View file

@ -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 }}

View file

@ -0,0 +1 @@
---