Switch root app to use common labels

This commit is contained in:
Stefan Reimer 2020-05-19 12:07:58 +01:00
parent fe60e8f362
commit d2e7ae41c1
6 changed files with 13 additions and 10 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: kubezero-app name: kubezero-app
description: KubeZero ArgoCD Application - Root chart of the KubeZero description: KubeZero ArgoCD Application - Root chart of the KubeZero
type: application type: application
version: 0.2.0 version: 0.2.1
home: https://kubezero.com home: https://kubezero.com
icon: https://cdn.zero-downtime.net/assets/logo_small.png icon: https://cdn.zero-downtime.net/assets/logo_small.png
keywords: keywords:
@ -11,4 +11,8 @@ keywords:
- gitops - gitops
maintainers: maintainers:
- name: Quarky9 - name: Quarky9
dependencies:
- name: kubezero-lib
version: ">= 0.1.1"
repository: https://zero-down-time.github.io/kubezero/
kubeVersion: ">= 1.16.0" kubeVersion: ">= 1.16.0"

View File

@ -1,14 +1,11 @@
{{- define "kubezero.app" }} {{- define "kubezero-app.app" }}
apiVersion: argoproj.io/v1alpha1 apiVersion: argoproj.io/v1alpha1
kind: Application kind: Application
metadata: metadata:
name: {{ .name | lower }} name: {{ .name | lower }}
namespace: argocd namespace: argocd
labels: labels:
app.kubernetes.io/name: {{ .name }} {{ include "kubezero-lib.labels" .root | indent 4 }}
helm.sh/chart: {{ .root.Chart.Name }}-{{ .root.Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .root.Release.Service }}
app.kubernetes.io/part-of: kubezero
{{- if not .retain }} {{- if not .retain }}
finalizers: finalizers:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io

View File

@ -1,3 +1,3 @@
{{- if .Values.calico.enabled }} {{- if .Values.calico.enabled }}
{{ template "kubezero.app" dict "root" . "name" "calico" "type" "kustomize" "retain" true }} {{ template "kubezero-app.app" dict "root" . "name" "calico" "type" "kustomize" "retain" true }}
{{- end }} {{- end }}

View File

@ -1,10 +1,12 @@
{{- if index .Values "cert-manager" "enabled" }} {{- if index .Values "cert-manager" "enabled" }}
{{ template "kubezero.app" dict "root" . "name" "cert-manager" "type" "helm" "namespace" "cert-manager" }} {{ template "kubezero-app.app" dict "root" . "name" "cert-manager" "type" "helm" "namespace" "cert-manager" }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: cert-manager name: cert-manager
{{- if index .Values "kiam" "enabled" }}
annotations: annotations:
iam.amazonaws.com/permitted: ".*CertManagerRole.*" iam.amazonaws.com/permitted: ".*CertManagerRole.*"
{{- end }} {{- end }}
{{- end }}

View File

@ -1,3 +1,3 @@
{{- if index .Values "kiam" "enabled" }} {{- if index .Values "kiam" "enabled" }}
{{ template "kubezero.app" dict "root" . "name" "kiam" "type" "helm" }} {{ template "kubezero-app.app" dict "root" . "name" "kiam" "type" "helm" }}
{{- end }} {{- end }}

View File

@ -1,3 +1,3 @@
{{- if index .Values "local-volume-provisioner" "enabled" }} {{- if index .Values "local-volume-provisioner" "enabled" }}
{{ template "kubezero.app" dict "root" . "name" "local-volume-provisioner" "type" "kustomize" }} {{ template "kubezero-app.app" dict "root" . "name" "local-volume-provisioner" "type" "kustomize" }}
{{- end }} {{- end }}