diff --git a/badhouseplants/values/values.gitea.yaml b/badhouseplants/values/values.gitea.yaml index f152ad8..8f8d15a 100644 --- a/badhouseplants/values/values.gitea.yaml +++ b/badhouseplants/values/values.gitea.yaml @@ -1,26 +1,36 @@ +ns: + enabled: true + name: gitea-service istio: enabled: true - hostname: git.badhouseplants.net + istio: + - name: gitea-http + gateway: badhouseplants-net + hostname: git.badhouseplants.net + service: gitea-http + port: 3000 templates: - | + {{ range .Values.istio }} apiVersion: networking.istio.io/v1beta1 kind: VirtualService metadata: - name: gitea-http + name: {{ .name }} spec: gateways: - - istio-system/badhouseplants-net + - "istio-system/{{ .gateway }}" hosts: - - {{ .Values.hostname }} + - {{ .hostname }} http: - match: - uri: prefix: / route: - destination: - host: gitea-http + host: {{ .service }} port: - number: 3000 + number: {{ .port }} + {{ end }} replicaCount: 1 clusterDomain: cluster.local diff --git a/common/values.ns.yaml b/common/values.ns.yaml new file mode 100644 index 0000000..02caabf --- /dev/null +++ b/common/values.ns.yaml @@ -0,0 +1,8 @@ +ns: + templates: + - | + apiVersion: v1 + kind: Namespace + metadata: + name: {{ .Values.name }} + diff --git a/environments.yaml b/environments.yaml index bbecb66..40b9a9b 100644 --- a/environments.yaml +++ b/environments.yaml @@ -1,5 +1,5 @@ environments: badhouseplants: - kubeContext: allanger@badhouseplants-microk8s + # kubeContext: allanger@badhouseplants-microk8s etersoft: kubeContext: allanger@etersoft diff --git a/releases.yaml b/releases.yaml index 15e8b2a..b1c78c2 100644 --- a/releases.yaml +++ b/releases.yaml @@ -26,6 +26,9 @@ templates: # ---------------------------- # -- Configs # ---------------------------- + default-common-values: + values: + - "{{ requiredEnv \"PWD\" }}/commmon/values.{{ .Release.Name }}.yaml" default-env-values: values: - "{{ requiredEnv \"PWD\" }}/{{ .Environment.Name }}/values/values.{{ .Release.Name }}.yaml" @@ -40,6 +43,13 @@ templates: - chart: bedag/raw version: 2.0.0 alias: istio + namespace: + dependencies: + - chart: bedag/raw + version: 2.0.0 + alias: ns + values: + - "{{ requiredEnv \"PWD\" }}/common/values.ns.yaml" # ---------------------------- # -- Releases # ---------------------------- @@ -76,7 +86,9 @@ templates: # ---------------------------- # -- Istio # ---------------------------- - istio-version: + istio-common: + labels: + bundle: istio version: 1.16.1 istio-base: &istio-base @@ -84,20 +96,20 @@ templates: chart: istio/base inherit: - template: crd-management-hook - - template: istio-version + - template: istio-common istio-gateway: &istio-gateway name: istio-ingressgateway chart: istio/gateway inherit: - - template: istio-version + - template: istio-common - template: default-env-values istiod: &istiod name: istiod chart: istio/istiod inherit: - - template: istio-version + - template: istio-common - template: default-env-values # ---------------------------- @@ -154,6 +166,7 @@ templates: chart: gitea/gitea version: 7.0.2 inherit: + - template: namespace - template: default-env-values - template: default-env-secrets - template: istio-resource