diff --git a/bin/dev b/bin/dev index 23ecc78..7e4547a 100755 --- a/bin/dev +++ b/bin/dev @@ -72,4 +72,18 @@ function run-template() { popd &> /dev/null } +function run-template-compose-app() { + : + : + pushd $ROOT_FOLDER/charts/compose-app + helm template -f values.yaml -f $ROOT_FOLDER/charts/apps/argoapps/compose-apps/$1 . > $ROOT_FOLDER/.tmp/compose-app-$1 + echo $ROOT_FOLDER/.tmp/compose-app-$1 + # if [ $? -ne 0 ]; then + # echo "Error: helm template failed" + # ehco $out + # exit 1 + # fi + # echo $out | bat -l yaml +} + start_cli $@ \ No newline at end of file diff --git a/charts/compose-app/templates/deploy.yaml b/charts/compose-app/templates/deploy.yaml index 6870d40..7b08ff8 100644 --- a/charts/compose-app/templates/deploy.yaml +++ b/charts/compose-app/templates/deploy.yaml @@ -16,8 +16,8 @@ spec: app: {{ $name }} spec: {{ if $data.volumes -}} - {{ range $volname, $_ := $data.volumes }} volumes: + {{ range $volname, $_ := $data.volumes }} - name: "{{ $volname }}" persistentVolumeClaim: claimName: "{{ $volname }}" @@ -33,8 +33,8 @@ spec: protocol: {{ $p.protocol | default "TCP" | quote }} {{ end }} {{ if $data.volumes }} - {{ range $volname, $mountPath := $data.volumes }} volumeMounts: + {{ range $volname, $mountPath := $data.volumes }} - name: {{ $volname | quote }} mountPath: {{ $mountPath | quote }} {{ end }} diff --git a/charts/compose-app/values.yaml b/charts/compose-app/values.yaml index 2bbacad..5fc9c5e 100644 --- a/charts/compose-app/values.yaml +++ b/charts/compose-app/values.yaml @@ -1,3 +1,18 @@ +global: + dns: + internalPrefix: k3s.local + primary: + domain: "bob.cat" + root: "" + secondary: + domain: "tod.cat" + root: "gr" + tls: + acmeServer: "http://acme" + enabled: true + issuer: "issue" + skipTLSVerify: true + useWildCard: true services: [] volumes: {} @@ -8,4 +23,5 @@ externalSecrets: generators: {} secrets: {} -ingress: {} \ No newline at end of file +ingress: {} + diff --git a/helmfile.yaml b/helmfile.yaml deleted file mode 100644 index 7d79f8a..0000000 --- a/helmfile.yaml +++ /dev/null @@ -1,50 +0,0 @@ -repositories: - - name: prometheus-community - url: https://prometheus-community.github.io/helm-charts - - name: grafana - url: https://grafana.github.io/helm-charts - - name: external-secrets - url: https://charts.external-secrets.io - - name: metallb - url: https://metallb.github.io/metallb -# helm install metallb -releases: - - name: external-secrets - namespace: plugin-external-secrets - chart: external-secrets/external-secrets - version: "0.11.0" - # - name: metallb - # namespace: plugin-metallb - # chart: metallb/metallb - # version: "0.14.9" - # - name: plugin-infrastructure - # namespace: metallb - # chart: ./k8s/infrastructure - # values: - # - ./k8s/infrastructure/values.yaml - # needs: - # - plugin-metallb/metallb - # - plugin-external-secrets/external-secrets - # - name: loki - # namespace: plugin-monitoring - # chart: grafana/loki-stack - # version: "2.10.2" - # values: - # - helmfile/values-loki-stack.yaml - # - name: kube-prometheus-stack - # namespace: plugin-monitoring - # chart: prometheus-community/kube-prometheus-stack - # version: "68.2.1" - # values: - # - helmfile/values-kube-prometheus-stack.yaml - # needs: - # - plugin-monitoring/prometheus-operator-crds - # - name: infra - # chart: ./charts/infra - # namespace: default - # values: - # - charts/infra/values.yaml - # - charts/infra/environments/sibli-gcp-values.yaml - # needs: - # - plugin-monitoring/kube-prometheus-stack - # - plugin-external-secrets/external-secrets \ No newline at end of file diff --git a/tf-variables.tf b/tf-variables.tf index 7e9be38..81725e6 100644 --- a/tf-variables.tf +++ b/tf-variables.tf @@ -39,6 +39,7 @@ variable "globals" { timezone = string dns = object({ + internalPrefix = string primary = object({ domain = string root = optional(string, "")