More logging fixes... ready for first trial

This commit is contained in:
Stefan Reimer 2020-08-14 15:52:10 +01:00
parent 8c1f45cae1
commit 64dbb4e4a6
11 changed files with 41 additions and 16 deletions

View File

@ -22,7 +22,7 @@ spec:
cluster.routing.allocation.awareness.attributes: zone cluster.routing.allocation.awareness.attributes: zone
{{- end }} {{- end }}
podTemplate: podTemplate:
{{- if $.Values.es.s3_snapshot_iamrole }} {{- if $.Values.es.s3Snapshot.iamrole }}
metadata: metadata:
annotations: annotations:
iam.amazonaws.com/role: {{ $.Values.es.s3Snapshot.iamrole }} iam.amazonaws.com/role: {{ $.Values.es.s3Snapshot.iamrole }}
@ -36,10 +36,10 @@ spec:
- -c - -c
- | - |
{{- if $.Values.es.s3Snapshot.enabled }} {{- if $.Values.es.s3Snapshot.enabled }}
bin/elasticsearch-plugin install --batch repository-s3 bin/elasticsearch-plugin install --batch repository-s3;
{{- end }} {{- end }}
{{- if $.Values.es.prometheus }} {{- 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 }}
{{- end }} {{- end }}
containers: containers:

View File

@ -5,7 +5,7 @@ metadata:
labels: labels:
common.k8s.elastic.co/type: elasticsearch common.k8s.elastic.co/type: elasticsearch
elasticsearch.k8s.elastic.co/cluster-name: {{ template "kubezero-lib.fullname" $ }} 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 }} namespace: {{ .Release.Namespace }}
labels: labels:
{{ include "kubezero-lib.labels" . | indent 4 }} {{ include "kubezero-lib.labels" . | indent 4 }}

View File

@ -10,10 +10,11 @@ version: 7.6.0
es: es:
nodeSets: nodeSets:
- count: 2 - name: default-zone-0
count: 2
storage: storage:
size: 16Gi size: 512Gi
class: local-sc-xfs class: ebs-sc-gp2-xfs
zone: us-west-2a zone: us-west-2a
s3Snapshot: s3Snapshot:
enabled: true enabled: true
@ -23,7 +24,6 @@ es:
prometheus: true prometheus: true
kibana: kibana:
replicas: 1
istio: istio:
enabled: true enabled: true
url: kibana.example.com url: kibana.example.com

View File

@ -23,7 +23,7 @@ es:
prometheus: false prometheus: false
kibana: kibana:
#replicas: 1 count: 1
#servicename: kibana.example.com #servicename: kibana.example.com
istio: istio:
enabled: false enabled: false

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: kubezero name: kubezero
description: KubeZero ArgoCD Application - Root App of Apps chart of KubeZero description: KubeZero ArgoCD Application - Root App of Apps chart of KubeZero
type: application type: application
version: 0.4.2 version: 0.4.3
home: https://kubezero.com home: https://kubezero.com
icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png
keywords: keywords:

View File

@ -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 }}

View File

@ -33,3 +33,9 @@ aws-efs-csi-driver:
istio: istio:
enabled: true enabled: true
metrics:
enabled: true
logging:
enabled: true

View File

@ -38,3 +38,6 @@ istio:
metrics: metrics:
enabled: false enabled: false
logging:
enabled: false

View File

@ -41,7 +41,7 @@ EOF
fi fi
# Deploy initial argo-cad # 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 helm install -n argocd kubezero kubezero/kubezero-argo-cd --create-namespace -f generated-values.yaml
# Wait for argocd-server to be running # Wait for argocd-server to be running
kubectl rollout status deployment -n argocd kubezero-argocd-server kubectl rollout status deployment -n argocd kubezero-argocd-server
@ -55,7 +55,7 @@ EOF
if [ -f cert-manager-backup.yaml ]; then if [ -f cert-manager-backup.yaml ]; then
kubectl apply -f cert-manager-backup.yaml kubectl apply -f cert-manager-backup.yaml
else 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 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 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 wait_for kubectl get ClusterIssuer letsencrypt-dns-prod 2>/dev/null 1>&2

View File

@ -9,7 +9,7 @@ kubezero:
values: values:
network: {{ default "vxlan" .Values.calico.network }} network: {{ default "vxlan" .Values.calico.network }}
mtu: {{ default "8941" .Values.calico.mtu }} mtu: {{ default "8941" .Values.calico.mtu }}
prometheus: {{ .Values.prometheus.enabled }} prometheus: {{ .Values.metrics.enabled }}
cert-manager: cert-manager:
enabled: {{ index .Values "cert-manager" "enabled" }} enabled: {{ index .Values "cert-manager" "enabled" }}
values: values:
@ -59,7 +59,7 @@ kubezero:
replicas: {{ ternary 2 1 .Values.HighAvailableControlplane }} replicas: {{ ternary 2 1 .Values.HighAvailableControlplane }}
prometheus: prometheus:
servicemonitor: servicemonitor:
enabled: {{ .Values.prometheus.enabled }} enabled: {{ .Values.metrics.enabled }}
{{- end }} {{- end }}
{{- if not .Values.kiam.not_ready }} {{- if not .Values.kiam.not_ready }}
@ -123,6 +123,10 @@ kubezero:
{{- end }} {{- end }}
{{- end }} {{- end }}
logging:
enabled: {{ .Values.logging.enabled }}
values:
argo-cd: argo-cd:
{{- with index .Values "argo-cd" "server" }} {{- with index .Values "argo-cd" "server" }}
server: server:

View File

@ -33,8 +33,7 @@ metrics:
prometheus: prometheus:
enabled: false enabled: false
# Deprecated once metrics goes live logging:
prometheus:
enabled: false enabled: false
argo-cd: argo-cd: