From afb125eac7399df966721366026559a0a07748ce Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Mon, 30 Aug 2021 00:28:32 +0200 Subject: [PATCH] feat: logging version bump, kubezero git-sync for argocd --- charts/kubezero-argocd/Chart.yaml | 6 +++- charts/kubezero-argocd/values.yaml | 15 +++++++++ charts/kubezero-logging/Chart.yaml | 2 +- charts/kubezero-logging/values.yaml | 18 ++++++++--- charts/kubezero/Chart.yaml | 2 +- charts/kubezero/app.yaml | 30 ++++++++++++++++++ charts/kubezero/applicationSet.yaml | 41 +++++++++++++++++++++++++ charts/kubezero/templates/kubezero.yaml | 27 ++++++---------- charts/kubezero/values.yaml | 7 ++--- 9 files changed, 119 insertions(+), 29 deletions(-) create mode 100644 charts/kubezero/app.yaml create mode 100644 charts/kubezero/applicationSet.yaml diff --git a/charts/kubezero-argocd/Chart.yaml b/charts/kubezero-argocd/Chart.yaml index 16942499..0ca5511c 100644 --- a/charts/kubezero-argocd/Chart.yaml +++ b/charts/kubezero-argocd/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: KubeZero ArgoCD Helm chart to install ArgoCD itself and the KubeZero ArgoCD Application name: kubezero-argocd -version: 0.8.1 +version: 0.8.2 home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png keywords: @@ -17,4 +17,8 @@ dependencies: - name: argo-cd version: 3.13.1 repository: https://argoproj.github.io/argo-helm + - name: argocd-applicationset + version: 1.4.0 + repository: https://argoproj.github.io/argo-helm + condition: argocd-applicationset.enabled kubeVersion: ">= 1.18.0" diff --git a/charts/kubezero-argocd/values.yaml b/charts/kubezero-argocd/values.yaml index ace01401..d187f03b 100644 --- a/charts/kubezero-argocd/values.yaml +++ b/charts/kubezero-argocd/values.yaml @@ -101,3 +101,18 @@ argo-cd: dex: enabled: false + + +argocd-applicationset: + enabled: false + + rbac: + pspEnabled: false + + resources: + # limits: + # cpu: 500m + # memory: 2048Mi + requests: + cpu: 50m + memory: 64Mi diff --git a/charts/kubezero-logging/Chart.yaml b/charts/kubezero-logging/Chart.yaml index 8580658d..9e934940 100644 --- a/charts/kubezero-logging/Chart.yaml +++ b/charts/kubezero-logging/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: kubezero-logging description: KubeZero Umbrella Chart for complete EFK stack type: application -version: 0.7.7 +version: 0.7.8 appVersion: 1.6.0 home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png diff --git a/charts/kubezero-logging/values.yaml b/charts/kubezero-logging/values.yaml index bd21f699..11cfddae 100644 --- a/charts/kubezero-logging/values.yaml +++ b/charts/kubezero-logging/values.yaml @@ -46,7 +46,8 @@ fluentd: enabled: false image: repository: fluent/fluentd-kubernetes-daemonset - tag: v1-debian-elasticsearch + # tag: v1-debian-elasticsearch + tag: v1.11.1-debian-elasticsearch7-1.3 istio: enabled: false @@ -123,7 +124,7 @@ fluentd: log_level info ignore_repeated_log_interval 60s ignore_same_log_interval 60s - workers 2 + workers 1 01_sources.conf: |- @@ -165,6 +166,13 @@ fluentd: + # Generate Hash ID to break endless loop for already ingested events during retries + + @type elasticsearch_genid + use_entire_record true + + + # Route through DISPATCH for Prometheus metrics @type relabel @label @DISPATCH @@ -178,8 +186,8 @@ fluentd: @type elasticsearch # @log_level debug include_tag_key true - id_key id - remove_keys id + id_key _hash + remove_keys _hash # KubeZero pipeline incl. GeoIP etc. pipeline fluentd @@ -207,7 +215,7 @@ fluentd: @type file flush_mode interval - flush_thread_count 1 + flush_thread_count 2 flush_interval 30s chunk_limit_size 4MB diff --git a/charts/kubezero/Chart.yaml b/charts/kubezero/Chart.yaml index f8f950cb..4efec973 100644 --- a/charts/kubezero/Chart.yaml +++ b/charts/kubezero/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: kubezero description: KubeZero - Bootstrap and ArgoCD Root App of Apps chart type: application -version: 1.20.8-3 +version: 1.20.8-4 home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png keywords: diff --git a/charts/kubezero/app.yaml b/charts/kubezero/app.yaml new file mode 100644 index 00000000..0ed65b5f --- /dev/null +++ b/charts/kubezero/app.yaml @@ -0,0 +1,30 @@ +# Skeleton template to put into each cluster git folder +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: kubezero + namespace: argocd +spec: + project: kubezero + source: + repoURL: https://zero-down-time.github.io/kubezero + chart: kubezero + targetRevision: {{ .Values.kubezero.version }} + + helm: + parameters: + # We use this to detect if we are called from ArgoCD + - name: argocdAppName + value: $ARGOCD_APP_NAME + # This breaks the recursion, otherwise we install another kubezero project and app + - name: installKubeZero + value: "false" + values: | + {{- toYaml .Values | nindent 8 }} + + destination: + server: https://kubernetes.default.svc + namespace: argocd + syncPolicy: + automated: + prune: true diff --git a/charts/kubezero/applicationSet.yaml b/charts/kubezero/applicationSet.yaml new file mode 100644 index 00000000..4d13d1b4 --- /dev/null +++ b/charts/kubezero/applicationSet.yaml @@ -0,0 +1,41 @@ +kind: ApplicationSet +metadata: + name: kubezero + namespace: argocd + labels: + {{- include "kubezero-lib.labels" . | nindent 4 }} +spec: + generators: + - git: + repoURL: {{ .Values.kubezero.applicationSet.repoURL }} + revision: {{ .Values.kubezero.applicationSet.revision }} + files: + {{- toYaml .Values.kubezero.applicationSet.files | nindent 6 }} + template: + metadata: + name: kubezero + spec: + project: kubezero + source: + repoURL: https://zero-down-time.github.io/kubezero + chart: kubezero + targetRevision: '{{ "{{" }} kubezero.version {{ "}}" }}' + helm: + parameters: + # We use this to detect if we are called from ArgoCD + - name: argocdAppName + value: $ARGOCD_APP_NAME + # This breaks the recursion, otherwise we install another kubezero project and app + # To be removed once we applicationSet is working and AppProject is moved back to ArgoCD chart + - name: installKubeZero + value: "false" + valueFiles: + - '{{ "{{" }} kubezero.valuesPath {{ "}}" }}/kubezero.yaml' + - '{{ "{{" }} kubezero.valuesPath {{ "}}" }}/values.yaml' + + destination: + server: https://kubernetes.default.svc + namespace: argocd + syncPolicy: + automated: + prune: true diff --git a/charts/kubezero/templates/kubezero.yaml b/charts/kubezero/templates/kubezero.yaml index 762dc3e1..a2892759 100644 --- a/charts/kubezero/templates/kubezero.yaml +++ b/charts/kubezero/templates/kubezero.yaml @@ -11,10 +11,11 @@ metadata: spec: description: KubeZero - ZeroDownTime Kubernetes Platform - # Allow manifests to deploy from - {{- with .Values.kubezero.sourceRepos }} + # Add the git repo used for git-sync sourceRepos: - {{- toYaml . | nindent 2 }} + - {{ .Values.kubezero.repoURL }} + {{ with .Values.kubezero.gitSync.repoURL }} + - {{ . }} {{- end }} # platform namespaces in the local cluster @@ -44,28 +45,20 @@ spec: apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - name: kubezero + name: kubezero-git-sync namespace: argocd labels: {{- include "kubezero-lib.labels" . | nindent 4 }} spec: project: kubezero source: - repoURL: https://zero-down-time.github.io/kubezero - chart: kubezero - # targetRevision: '>=1.20.8-0' - targetRevision: '{{ .Chart.Version }}' + repoURL: {{ .Values.kubezero.gitSync.repoURL }} + targetRevision: {{ .Values.kubezero.gitSync.targetRevision }} + path: {{ .Values.kubezero.gitSync.path }} helm: - parameters: - # We use this to detect if we are called from ArgoCD - - name: argocdAppName - value: $ARGOCD_APP_NAME - # This breaks the recursion, otherwise we install another kubezero project and app - - name: installKubeZero - value: "false" - values: | - {{- toYaml .Values | nindent 8 }} + valueFiles: + - kubezero.yaml destination: server: https://kubernetes.default.svc diff --git a/charts/kubezero/values.yaml b/charts/kubezero/values.yaml index 5627d25c..83962624 100644 --- a/charts/kubezero/values.yaml +++ b/charts/kubezero/values.yaml @@ -1,9 +1,8 @@ kubezero: server: https://kubernetes.default.svc repoURL: https://zero-down-time.github.io/kubezero - targetRevision: '*' - sourceRepos: - - 'https://zero-down-time.github.io/kubezero' + defaultTargetRevision: '*' + gitSync: {} HighAvailableControlplane: false @@ -63,7 +62,7 @@ logging: enabled: false crds: true namespace: logging - targetRevision: 0.7.7 + targetRevision: 0.7.8 argocd: enabled: false