diff --git a/charts/kubezero-logging/templates/elasticsearch.yaml b/charts/kubezero-logging/templates/elasticsearch.yaml index 94b8f1f0..f99ba51f 100644 --- a/charts/kubezero-logging/templates/elasticsearch.yaml +++ b/charts/kubezero-logging/templates/elasticsearch.yaml @@ -22,7 +22,7 @@ spec: cluster.routing.allocation.awareness.attributes: zone {{- end }} podTemplate: - {{- if $.Values.es.s3_snapshot_iamrole }} + {{- if $.Values.es.s3Snapshot.iamrole }} metadata: annotations: iam.amazonaws.com/role: {{ $.Values.es.s3Snapshot.iamrole }} @@ -36,10 +36,10 @@ spec: - -c - | {{- if $.Values.es.s3Snapshot.enabled }} - bin/elasticsearch-plugin install --batch repository-s3 + bin/elasticsearch-plugin install --batch repository-s3; {{- end }} {{- if $.Values.es.prometheus }} - bin/elasticsearch-plugin install --batch https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/{{ $.Values.version }}.0/prometheus-exporter-{{ $.Values.version }}.0.zip + bin/elasticsearch-plugin install --batch https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/{{ $.Values.version }}.0/prometheus-exporter-{{ $.Values.version }}.0.zip; {{- end }} {{- end }} containers: diff --git a/charts/kubezero-logging/templates/secrets.yaml b/charts/kubezero-logging/templates/secrets.yaml index eb7d3951..7dd79204 100644 --- a/charts/kubezero-logging/templates/secrets.yaml +++ b/charts/kubezero-logging/templates/secrets.yaml @@ -5,7 +5,7 @@ metadata: labels: common.k8s.elastic.co/type: elasticsearch elasticsearch.k8s.elastic.co/cluster-name: {{ template "kubezero-lib.fullname" $ }} - name: {{ template "kubezero-lib.fullname" $ }}-elastic-user + name: {{ template "kubezero-lib.fullname" $ }}-es-elastic-user namespace: {{ .Release.Namespace }} labels: {{ include "kubezero-lib.labels" . | indent 4 }} diff --git a/charts/kubezero-logging/values-test.yaml b/charts/kubezero-logging/values-test.yaml index b67a8f95..077be874 100644 --- a/charts/kubezero-logging/values-test.yaml +++ b/charts/kubezero-logging/values-test.yaml @@ -10,10 +10,11 @@ version: 7.6.0 es: nodeSets: - - count: 2 + - name: default-zone-0 + count: 2 storage: - size: 16Gi - class: local-sc-xfs + size: 512Gi + class: ebs-sc-gp2-xfs zone: us-west-2a s3Snapshot: enabled: true @@ -23,7 +24,6 @@ es: prometheus: true kibana: - replicas: 1 istio: enabled: true url: kibana.example.com diff --git a/charts/kubezero-logging/values.yaml b/charts/kubezero-logging/values.yaml index a0304fb2..b4d00bb8 100644 --- a/charts/kubezero-logging/values.yaml +++ b/charts/kubezero-logging/values.yaml @@ -23,7 +23,7 @@ es: prometheus: false kibana: - #replicas: 1 + count: 1 #servicename: kibana.example.com istio: enabled: false diff --git a/charts/kubezero/Chart.yaml b/charts/kubezero/Chart.yaml index ef983386..4fbf73ba 100644 --- a/charts/kubezero/Chart.yaml +++ b/charts/kubezero/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: kubezero description: KubeZero ArgoCD Application - Root App of Apps chart of KubeZero type: application -version: 0.4.2 +version: 0.4.3 home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png keywords: diff --git a/charts/kubezero/templates/logging.yaml b/charts/kubezero/templates/logging.yaml new file mode 100644 index 00000000..d696c420 --- /dev/null +++ b/charts/kubezero/templates/logging.yaml @@ -0,0 +1,13 @@ +{{- if index .Values "logging" "enabled" }} +{{ template "kubezero-app.app" dict "root" . "name" "logging" "type" "helm" "namespace" "logging"}} + syncPolicy: + automated: + prune: true +--- +apiVersion: v1 +kind: Namespace +metadata: + name: logging + annotations: + iam.amazonaws.com/permitted: ".*ElasticSearchSnapshots.*" +{{- end }} diff --git a/charts/kubezero/values-all.yaml b/charts/kubezero/values-all.yaml index 70a0a956..e99e14c7 100644 --- a/charts/kubezero/values-all.yaml +++ b/charts/kubezero/values-all.yaml @@ -33,3 +33,9 @@ aws-efs-csi-driver: istio: enabled: true + +metrics: + enabled: true + +logging: + enabled: true diff --git a/charts/kubezero/values.yaml b/charts/kubezero/values.yaml index 2c486f11..87248f7d 100644 --- a/charts/kubezero/values.yaml +++ b/charts/kubezero/values.yaml @@ -38,3 +38,6 @@ istio: metrics: enabled: false + +logging: + enabled: false diff --git a/deploy/deploy.sh b/deploy/deploy.sh index d20ee6ee..2e8963ca 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -41,7 +41,7 @@ EOF fi # Deploy initial argo-cad - helm template $DEPLOY_DIR -f values.yaml -f cloudbender.yaml --set kiam.not_ready=true --set cert-manager.not_ready=true --set istio.enabled=false --set metrics.enabled=false > generated-values.yaml + helm template $DEPLOY_DIR -f values.yaml -f cloudbender.yaml --set kiam.not_ready=true --set cert-manager.not_ready=true --set istio.enabled=false --set metrics.enabled=false --set logging.enabled=false > generated-values.yaml helm install -n argocd kubezero kubezero/kubezero-argo-cd --create-namespace -f generated-values.yaml # Wait for argocd-server to be running kubectl rollout status deployment -n argocd kubezero-argocd-server @@ -55,7 +55,7 @@ EOF if [ -f cert-manager-backup.yaml ]; then kubectl apply -f cert-manager-backup.yaml else - helm template $DEPLOY_DIR -f values.yaml -f cloudbender.yaml --set kiam.not_ready=true --set istio.enabled=false --set metrics.enabled=false > generated-values.yaml + helm template $DEPLOY_DIR -f values.yaml -f cloudbender.yaml --set kiam.not_ready=true --set istio.enabled=false --set metrics.enabled=false --set logging.enabled=false > generated-values.yaml helm upgrade -n argocd kubezero kubezero/kubezero-argo-cd --create-namespace -f generated-values.yaml wait_for kubectl get Issuer -n kube-system kubezero-local-ca-issuer 2>/dev/null 1>&2 wait_for kubectl get ClusterIssuer letsencrypt-dns-prod 2>/dev/null 1>&2 diff --git a/deploy/templates/values.yaml b/deploy/templates/values.yaml index 2b1409ac..47752d3f 100644 --- a/deploy/templates/values.yaml +++ b/deploy/templates/values.yaml @@ -9,7 +9,7 @@ kubezero: values: network: {{ default "vxlan" .Values.calico.network }} mtu: {{ default "8941" .Values.calico.mtu }} - prometheus: {{ .Values.prometheus.enabled }} + prometheus: {{ .Values.metrics.enabled }} cert-manager: enabled: {{ index .Values "cert-manager" "enabled" }} values: @@ -59,7 +59,7 @@ kubezero: replicas: {{ ternary 2 1 .Values.HighAvailableControlplane }} prometheus: servicemonitor: - enabled: {{ .Values.prometheus.enabled }} + enabled: {{ .Values.metrics.enabled }} {{- end }} {{- if not .Values.kiam.not_ready }} @@ -123,6 +123,10 @@ kubezero: {{- end }} {{- end }} + logging: + enabled: {{ .Values.logging.enabled }} + values: + argo-cd: {{- with index .Values "argo-cd" "server" }} server: diff --git a/deploy/values.yaml b/deploy/values.yaml index ea9abff7..65cb531a 100644 --- a/deploy/values.yaml +++ b/deploy/values.yaml @@ -33,8 +33,7 @@ metrics: prometheus: enabled: false -# Deprecated once metrics goes live -prometheus: +logging: enabled: false argo-cd: