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

View File

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

View File

@ -1,3 +1,3 @@
{{- 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 }}

View File

@ -1,10 +1,12 @@
{{- 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
kind: Namespace
metadata:
name: cert-manager
{{- if index .Values "kiam" "enabled" }}
annotations:
iam.amazonaws.com/permitted: ".*CertManagerRole.*"
{{- end }}
{{- end }}

View File

@ -1,3 +1,3 @@
{{- 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 }}

View File

@ -1,3 +1,3 @@
{{- 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 }}