clean up
This commit is contained in:
1 parent
c66434dd0d
commit
321b723228
17 files changed
+124
-157
No files matched your search
+1
-11
@@ -20,22 +20,12 @@ if [ -f "$tmp_path" ]; then
|
||||
mv $tmp_path $tmp_path".old"
|
||||
fi
|
||||
|
||||
extraArgs=""
|
||||
for f in k8s/argocd/values/shared/*.yaml; do
|
||||
full_file_path=$(realpath $f)
|
||||
extraArgs=$extraArgs" --values ${full_file_path}"
|
||||
done
|
||||
for f in k8s/argocd/values/$deployment/*.yaml; do
|
||||
full_file_path=$(realpath $f)
|
||||
extraArgs=$extraArgs" --values ${full_file_path}"
|
||||
done
|
||||
|
||||
echo $extraArgs
|
||||
|
||||
helm template $app $full_path --namespace $app \
|
||||
--debug \
|
||||
--values $full_path/values.yaml \
|
||||
$extraArgs \
|
||||
--values $full_path/values-$deployment.yaml \
|
||||
> $tmp_path
|
||||
|
||||
echo "Wrote Template! --> $tmp_path"
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
{{ $currentScope := .}}
|
||||
{{- $appvalues := dict -}}
|
||||
{{ range $path, $_ := .Files.Glob "values/shared/**.yaml" }}
|
||||
{{- with $currentScope }}
|
||||
{{ $newobj := .Files.Get $path | fromYaml }}
|
||||
{{ $appvalues := mergeOverwrite $appvalues $newobj }}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{- $deploymentPath := printf "values/%s/**.yaml" .Values.deployment -}}
|
||||
{{ range $path, $_ := .Files.Glob $deploymentPath }}
|
||||
{{- with $currentScope }}
|
||||
{{ $newobj := .Files.Get $path | fromYaml }}
|
||||
{{ $appvalues := mergeOverwrite $appvalues $newobj }}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
---
|
||||
@@ -2,7 +2,7 @@
|
||||
{{ include "homelab.argo.project" (dict "name" $argoappsetApps "description" "common applications")}}
|
||||
|
||||
|
||||
{{ range $appName, $appProps := $appvalues.apps }}
|
||||
{{ range $appName, $appProps := .Values.apps }}
|
||||
|
||||
{{- $namespace := (printf "apps-%s" $appName) -}}
|
||||
|
||||
@@ -26,7 +26,7 @@ spec:
|
||||
helm:
|
||||
valueFiles:
|
||||
- values.yaml
|
||||
- values-{{$.Values.deployment}}.yaml
|
||||
- values-{{$.Values.global.deployment}}.yaml
|
||||
values: |-
|
||||
{{- tpl $appProps $ | nindent 10 }}
|
||||
global:
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
---
|
||||
{{- $infraChartProjectName := "infrastructure-charts" -}}
|
||||
{{ include "homelab.argo.project" (dict "name" $infraChartProjectName "description" "infrastructure helm charts")}}
|
||||
|
||||
{{ range $chartName, $chartProps := $appvalues.infrastructureCharts }}
|
||||
{{ range $chartName, $chartProps := .Values.infrastructureCharts }}
|
||||
|
||||
{{- $namespace := (printf "chart-%s" $chartName) -}}
|
||||
|
||||
@@ -24,7 +25,7 @@ spec:
|
||||
targetRevision: {{ $chartProps.targetRevision }}
|
||||
helm:
|
||||
values: |-
|
||||
{{- tpl ($chartProps.values | default "") $appvalues | nindent 8}}
|
||||
{{- tpl ($chartProps.values | default "") $ | nindent 8}}
|
||||
releaseName: {{ $chartName }}
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ range $_, $secretsData := $appvalues.secrets }}
|
||||
{{ range $_, $secretsData := .Values.secrets }}
|
||||
---
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ClusterSecretStore
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ range $key, $value := $appvalues.storage }}
|
||||
{{ range $key, $value := .Values.storage }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
@@ -6,7 +6,7 @@ metadata:
|
||||
name: {{ $value.name }}
|
||||
namespace: {{ $value.namespace }}
|
||||
spec:
|
||||
storageClassName: {{ $appvalues.global.nfs.storageClass }}
|
||||
storageClassName: {{ $.Values.global.nfs.storageClass }}
|
||||
accessModes:
|
||||
{{- $value.accessModes | toYaml | nindent 4 }}
|
||||
resources:
|
||||
|
||||
File renamed without changes.
File renamed without changes.
+114
-1
@@ -1,4 +1,117 @@
|
||||
deployment: ""
|
||||
gitops:
|
||||
repo: ""
|
||||
commit: ""
|
||||
apps:
|
||||
ingresses: ""
|
||||
global:
|
||||
email: "ariel@sosnovsky.ca"
|
||||
timezone: America/Toronto
|
||||
domain: ""
|
||||
tls:
|
||||
enabled: false
|
||||
issuer: ""
|
||||
acmeServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
skipTLSVerify: "false"
|
||||
nfs:
|
||||
storageClass: "nfs-generic"
|
||||
server: "changme"
|
||||
share: "changeme"
|
||||
infrastructureCharts:
|
||||
cert-manager:
|
||||
repoURL: "https://charts.jetstack.io"
|
||||
targetRevision: "1.10.2"
|
||||
values: |-
|
||||
installCRDs: true
|
||||
external-secrets:
|
||||
repoURL: "https://charts.external-secrets.io"
|
||||
targetRevision: "0.7.2"
|
||||
values: |-
|
||||
installCRDs: true
|
||||
nfs-generic-storageclass:
|
||||
chart: nfs-subdir-external-provisioner
|
||||
repoURL: "https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/"
|
||||
targetRevision: "v4.0.2"
|
||||
values: |-
|
||||
storageClass:
|
||||
name: "{{ .Values.global.nfs.storageClass }}"
|
||||
nfs:
|
||||
server: "{{ .Values.global.nfs.server }}"
|
||||
path: "{{ .Values.global.nfs.share }}"
|
||||
kubernetes-secret-generator:
|
||||
repoURL: "https://helm.mittwald.de"
|
||||
targetRevision: "v3.4.0"
|
||||
database:
|
||||
chart: postgresql
|
||||
repoURL: "https://charts.bitnami.com/bitnami"
|
||||
targetRevision: "12.1.8"
|
||||
values: |-
|
||||
fullnameOverride: "postgres"
|
||||
image:
|
||||
tag: 15.1.0-debian-11-r19
|
||||
repository: bitnami/postgresql
|
||||
pullPolicy: IfNotPresent
|
||||
auth:
|
||||
secretKeys:
|
||||
adminPasswordKey: password
|
||||
existingSecret: "{{ .Values.secrets.database.secrets.dbmain.name }}"
|
||||
architecture: standalone
|
||||
postgresqlDataDir: /bitnami/postgresql/data
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
mountPath: /bitnami/postgresql
|
||||
storageClass: "{{ .Values.global.nfs.storageClass }}"
|
||||
existingClaim: "{{ .Values.storage.database.name }}"
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
readReplicas:
|
||||
replicaCount: 0
|
||||
# monitoring:
|
||||
# chart: prometheus
|
||||
# repoURL: "https://prometheus-community.github.io/helm-charts"
|
||||
# targetRevision: "20.2.0"
|
||||
# values: |-
|
||||
# configmapReload:
|
||||
# prometheus:
|
||||
# enabled: false
|
||||
# alertmanager:
|
||||
# persistence:
|
||||
# enabled: true
|
||||
# size: 8Gi
|
||||
# storageClass: "local-path"
|
||||
# ingress:
|
||||
# enabled: false
|
||||
# ingressClassName: traefik
|
||||
# annotations: {}
|
||||
# hosts:
|
||||
# - host: "{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
# paths:
|
||||
# - path: /alertmanager
|
||||
# pathType: Prefix
|
||||
# server:
|
||||
# {{ if .Values.global.tls.enabled }}
|
||||
# baseURL: "https://{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
# {{ else }}
|
||||
# baseURL: "http://{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
# {{ end }}
|
||||
# persistentVolume:
|
||||
# enabled: true
|
||||
# size: 8Gi
|
||||
# storageClass: "local-path"
|
||||
# ingress:
|
||||
# enabled: false
|
||||
secrets:
|
||||
database:
|
||||
namespace: chart-database
|
||||
secrets:
|
||||
dbmain:
|
||||
name: "pg.password"
|
||||
storage:
|
||||
database:
|
||||
name: primary-database
|
||||
namespace: chart-database
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 8Gi
|
||||
@@ -1,2 +0,0 @@
|
||||
apps:
|
||||
ingresses: ""
|
||||
@@ -1,2 +0,0 @@
|
||||
apps:
|
||||
ingresses: ""
|
||||
@@ -1,2 +0,0 @@
|
||||
apps:
|
||||
ingresses: ""
|
||||
@@ -1,13 +0,0 @@
|
||||
global:
|
||||
email: "ariel@sosnovsky.ca"
|
||||
timezone: America/Toronto
|
||||
domain: ""
|
||||
tls:
|
||||
enabled: false
|
||||
issuer: ""
|
||||
acmeServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
skipTLSVerify: "false"
|
||||
nfs:
|
||||
storageClass: "nfs-generic"
|
||||
server: "changme"
|
||||
share: "changeme"
|
||||
@@ -1,84 +0,0 @@
|
||||
infrastructureCharts:
|
||||
cert-manager:
|
||||
repoURL: "https://charts.jetstack.io"
|
||||
targetRevision: "1.10.2"
|
||||
values: |-
|
||||
installCRDs: true
|
||||
external-secrets:
|
||||
repoURL: "https://charts.external-secrets.io"
|
||||
targetRevision: "0.7.2"
|
||||
values: |-
|
||||
installCRDs: true
|
||||
nfs-generic-storageclass:
|
||||
chart: nfs-subdir-external-provisioner
|
||||
repoURL: "https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/"
|
||||
targetRevision: "v4.0.2"
|
||||
values: |-
|
||||
storageClass:
|
||||
name: "{{ .Values.global.nfs.storageClass }}"
|
||||
nfs:
|
||||
server: "{{ .Values.global.nfs.server }}"
|
||||
path: "{{ .Values.global.nfs.share }}"
|
||||
kubernetes-secret-generator:
|
||||
repoURL: "https://helm.mittwald.de"
|
||||
targetRevision: "v3.4.0"
|
||||
database:
|
||||
chart: postgresql
|
||||
repoURL: "https://charts.bitnami.com/bitnami"
|
||||
targetRevision: "12.1.8"
|
||||
values: |-
|
||||
fullnameOverride: "postgres"
|
||||
image:
|
||||
tag: 15.1.0-debian-11-r19
|
||||
repository: bitnami/postgresql
|
||||
pullPolicy: IfNotPresent
|
||||
auth:
|
||||
secretKeys:
|
||||
adminPasswordKey: password
|
||||
existingSecret: "{{ .Values.secrets.database.secrets.dbmain.name }}"
|
||||
architecture: standalone
|
||||
postgresqlDataDir: /bitnami/postgresql/data
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
mountPath: /bitnami/postgresql
|
||||
storageClass: "{{ .Values.global.nfs.storageClass }}"
|
||||
existingClaim: "{{ .Values.storage.database.name }}"
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
readReplicas:
|
||||
replicaCount: 0
|
||||
# monitoring:
|
||||
# chart: prometheus
|
||||
# repoURL: "https://prometheus-community.github.io/helm-charts"
|
||||
# targetRevision: "20.2.0"
|
||||
# values: |-
|
||||
# configmapReload:
|
||||
# prometheus:
|
||||
# enabled: false
|
||||
# alertmanager:
|
||||
# persistence:
|
||||
# enabled: true
|
||||
# size: 8Gi
|
||||
# storageClass: "local-path"
|
||||
# ingress:
|
||||
# enabled: false
|
||||
# ingressClassName: traefik
|
||||
# annotations: {}
|
||||
# hosts:
|
||||
# - host: "{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
# paths:
|
||||
# - path: /alertmanager
|
||||
# pathType: Prefix
|
||||
# server:
|
||||
# {{ if .Values.global.tls.enabled }}
|
||||
# baseURL: "https://{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
# {{ else }}
|
||||
# baseURL: "http://{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
# {{ end }}
|
||||
# persistentVolume:
|
||||
# enabled: true
|
||||
# size: 8Gi
|
||||
# storageClass: "local-path"
|
||||
# ingress:
|
||||
# enabled: false
|
||||
@@ -1,6 +0,0 @@
|
||||
secrets:
|
||||
database:
|
||||
namespace: chart-database
|
||||
secrets:
|
||||
dbmain:
|
||||
name: "pg.password"
|
||||
@@ -1,9 +0,0 @@
|
||||
storage:
|
||||
database:
|
||||
name: primary-database
|
||||
namespace: chart-database
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 8Gi
|
||||
@@ -57,9 +57,8 @@ spec:
|
||||
helm:
|
||||
valueFiles:
|
||||
- values.yaml
|
||||
- values-{{ .Values.selfapp.deployment }}.yaml
|
||||
parameters:
|
||||
- name: "deployment"
|
||||
value: {{ .Values.selfapp.deployment | quote }}
|
||||
- name: "gitops.repo"
|
||||
value: {{ .Values.gitops.repo | quote }}
|
||||
- name: "gitops.commit"
|
||||
|
||||
Reference in new issue
Block a user