moved $appvalues

This commit is contained in:
ari committed 2023-04-15 05:02:41 +00:00
1 parent e11e072bad
commit 36263cc6df
17 files changed
+45 -37

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
---
{{ $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 -2
View File
@@ -2,7 +2,7 @@
{{ include "homelab.argo.project" (dict "name" $argoappsetApps "description" "common applications")}}
{{ range $appName, $appProps := .Values.apps }}
{{ range $appName, $appProps := $appvalues.apps }}
{{- $namespace := (printf "apps-%s" $appName) -}}
@@ -26,7 +26,7 @@ spec:
helm:
valueFiles:
- values.yaml
- values-{{$.Values.global.deployment}}.yaml
- values-{{$.Values.deployment}}.yaml
values: |-
{{- tpl $appProps $ | nindent 10 }}
global:
+2 -2
View File
@@ -1,7 +1,7 @@
{{- $infraChartProjectName := "infrastructure-charts" -}}
{{ include "homelab.argo.project" (dict "name" $infraChartProjectName "description" "infrastructure helm charts")}}
{{ range $chartName, $chartProps := .Values.infrastructureCharts }}
{{ range $chartName, $chartProps := $appvalues.infrastructureCharts }}
{{- $namespace := (printf "chart-%s" $chartName) -}}
@@ -24,7 +24,7 @@ spec:
targetRevision: {{ $chartProps.targetRevision }}
helm:
values: |-
{{- tpl ($chartProps.values | default "") $ | nindent 8}}
{{- tpl ($chartProps.values | default "") $appvalues | nindent 8}}
releaseName: {{ $chartName }}
destination:
server: https://kubernetes.default.svc
+1 -1
View File
@@ -1,4 +1,4 @@
{{ range $_, $secretsData := .Values.secrets }}
{{ range $_, $secretsData := $appvalues.secrets }}
---
apiVersion: external-secrets.io/v1beta1
kind: ClusterSecretStore
+2 -2
View File
@@ -1,4 +1,4 @@
{{ range $key, $value := .Values.storage }}
{{ range $key, $value := $appvalues.storage }}
---
apiVersion: v1
kind: PersistentVolumeClaim
@@ -6,7 +6,7 @@ metadata:
name: {{ $value.name }}
namespace: {{ $value.namespace }}
spec:
storageClassName: {{ $.Values.global.nfs.storageClass }}
storageClassName: {{ $appvalues.global.nfs.storageClass }}
accessModes:
{{- $value.accessModes | toYaml | nindent 4 }}
resources:
+4
View File
@@ -0,0 +1,4 @@
deployment: ""
gitops:
repo: ""
commit: ""
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,4 @@
global:
deployment: ""
email: "ariel@sosnovsky.ca"
timezone: America/Toronto
domain: ""
@@ -12,6 +11,3 @@ global:
storageClass: "nfs-generic"
server: "changme"
share: "changeme"
gitops:
commit: "stable"
repo: "asosnovsky/homelab"
+13 -26
View File
@@ -1,21 +1,3 @@
---
{{ $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.selfapp.deployment -}}
{{ range $path, $_ := .Files.Glob $deploymentPath }}
{{- with $currentScope }}
{{ $newobj := .Files.Get $path | fromYaml }}
{{ $appvalues := mergeOverwrite $appvalues $newobj }}
{{- end -}}
{{ end }}
---
apiVersion: v1
kind: Secret
@@ -25,10 +7,10 @@ metadata:
labels:
argocd.argoproj.io/secret-type: repository
annotations:
link.argocd.argoproj.io/external-link: "https://github.com/{{ $appvalues.gitops.repo }}"
link.argocd.argoproj.io/external-link: "https://github.com/{{ .Values.gitops.repo }}"
stringData:
type: git
url: "git@github.com:{{ $appvalues.gitops.repo }}.git"
url: "git@github.com:{{ .Values.gitops.repo }}.git"
sshPrivateKey: {{ .Values.selfapp.sshkey | quote }}
@@ -42,8 +24,8 @@ metadata:
spec:
project: default
source:
repoURL: "git@github.com:{{ $appvalues.gitops.repo }}.git"
targetRevision: "{{ $appvalues.gitops.commit }}"
repoURL: "git@github.com:{{ .Values.gitops.repo }}.git"
targetRevision: "{{ .Values.gitops.commit }}"
path: k8s/argocd
helm:
valueFiles:
@@ -69,14 +51,19 @@ metadata:
spec:
project: default
source:
repoURL: "git@github.com:{{ $appvalues.gitops.repo }}.git"
targetRevision: "{{ $appvalues.gitops.commit }}"
repoURL: "git@github.com:{{ .Values.gitops.repo }}.git"
targetRevision: "{{ .Values.gitops.commit }}"
path: k8s/argoapps
helm:
valueFiles:
- values.yaml
values: |-
{{- $appvalues | toYaml | nindent 8 }}
parameters:
- name: "deployment"
value: {{ .Values.selfapp.deployment | quote }}
- name: "gitops.repo"
value: {{ .Values.gitops.repo | quote }}
- name: "gitops.commit"
value: {{ .Values.gitops.commit | quote }}
destination:
server: https://kubernetes.default.svc
namespace: "{{ .Release.Namespace }}"
+3
View File
@@ -17,3 +17,6 @@ argo-cd:
selfapp:
deployment: ""
sshkey: ""
gitops:
commit: "stable"
repo: "asosnovsky/homelab"