Updates after the disaster recovery
This commit is contained in:
62
charts/root/templates/_helpers.tpl
Normal file
62
charts/root/templates/_helpers.tpl
Normal file
@ -0,0 +1,62 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "root.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "root.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "root.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "root.labels" -}}
|
||||
helm.sh/chart: {{ include "root.chart" . }}
|
||||
{{ include "root.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "root.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "root.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "root.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "root.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
25
charts/root/templates/root.yaml
Normal file
25
charts/root/templates/root.yaml
Normal file
@ -0,0 +1,25 @@
|
||||
{{ if .Capabilities.APIVersions.Has "source.toolkit.fluxcd.io/v1" }}
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: GitRepository
|
||||
metadata:
|
||||
name: root
|
||||
spec:
|
||||
interval: 30s
|
||||
url: {{ .Values.url }}
|
||||
ref:
|
||||
branch: {{ .Values.branch }}
|
||||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: root
|
||||
spec:
|
||||
interval: 30s
|
||||
targetNamespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: root
|
||||
path: "."
|
||||
prune: false
|
||||
timeout: 1m
|
||||
{{- end }}
|
25
charts/root/templates/self.yaml
Normal file
25
charts/root/templates/self.yaml
Normal file
@ -0,0 +1,25 @@
|
||||
{{ if .Capabilities.APIVersions.Has "source.toolkit.fluxcd.io/v1" }}
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: GitRepository
|
||||
metadata:
|
||||
name: root-self
|
||||
spec:
|
||||
interval: 30s
|
||||
url: {{ .Values.self.url }}
|
||||
ref:
|
||||
branch: {{ .Values.self.branch }}
|
||||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: root-self
|
||||
spec:
|
||||
interval: 30s
|
||||
targetNamespace: flux-system
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: root-self
|
||||
path: "."
|
||||
prune: false
|
||||
timeout: 1m
|
||||
{{- end }}
|
Reference in New Issue
Block a user