diff --git a/charts/harmony-chart/templates/NOTES.txt b/charts/harmony-chart/templates/NOTES.txt index 37c2f34..dff52ce 100644 --- a/charts/harmony-chart/templates/NOTES.txt +++ b/charts/harmony-chart/templates/NOTES.txt @@ -7,9 +7,14 @@ that the load balancer is working. First, get its external IP using kubectl get svc -n {{ .Release.Namespace }} harmony-ingress-nginx-controller -Next, go to http://the.external.ip.shown/cluster-echo-test and make sure you get +Next, go to http://{{ .Values.clusterDomain }}/cluster-echo-test and make sure you get a JSON response. +{{ if and .Values.prometheusstack.grafana.enabled .Values.prometheusstack.grafana.ingress.enabled }} +Grafana shipped with the default admin user password as a bug prevents +changing it. Since is enabled on the cluster and exposed to the internet. +Please make sure you update the default admin user password! +{{- end }} diff --git a/charts/harmony-chart/templates/echo.yaml b/charts/harmony-chart/templates/echo.yaml index 87f5227..093dbd9 100644 --- a/charts/harmony-chart/templates/echo.yaml +++ b/charts/harmony-chart/templates/echo.yaml @@ -47,7 +47,8 @@ metadata: spec: ingressClassName: {{ (index .Values "ingress-nginx" "controller" "ingressClass") }} rules: - - http: + - host: {{ .Values.clusterDomain }} + http: paths: - path: /cluster-echo-test pathType: Prefix diff --git a/charts/harmony-chart/values.yaml b/charts/harmony-chart/values.yaml index bcf37f4..02c9e51 100644 --- a/charts/harmony-chart/values.yaml +++ b/charts/harmony-chart/values.yaml @@ -2,6 +2,8 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +clusterDomain: "*" + ingress-nginx: # Use ingress-nginx as a default controller. enabled: true @@ -14,6 +16,23 @@ cert-manager: # certificates. email: "" +# Configuration for the metrics server chart +metricsserver: + # Control the chart inclusion + enabled: false + # See https://github.com/kubernetes-sigs/metrics-server/blob/master/charts/metrics-server/values.yaml + # for all available options + replicas: 1 + +# Configuration for the Vertical Pod Autoscaler chart +vpa: + # Control the chart inclusion + enabled: false + # See https://github.com/cowboysysop/charts/blob/master/charts/vertical-pod-autoscaler/values.yaml + # for all available options + admissionController: + replicaCount: 1 + # Multi-tenant ElasticSearch elasticsearch: enabled: false @@ -66,23 +85,6 @@ elasticsearch: xpack.security.transport.ssl.certificate_authorities: /usr/share/elasticsearch/config/certs/ca.crt xpack.security.transport.ssl.verification_mode: certificate -# Configuration for the metrics server chart -metricsserver: - # Control the chart inclusion - enabled: false - # See https://github.com/kubernetes-sigs/metrics-server/blob/master/charts/metrics-server/values.yaml - # for all available options - replicas: 1 -# Configuration for the Vertical Pod Autoscaler chart -vpa: - # Control the chart inclusion - enabled: false - # See https://github.com/cowboysysop/charts/blob/master/charts/vertical-pod-autoscaler/values.yaml - # for all available options - admissionController: - replicaCount: 1 - - # Multi-tenant OpenSearch opensearch: enabled: false @@ -100,7 +102,6 @@ opensearch: # K8S_HARMONY_USE_SHARED_OPENSEARCH: true # HARMONY_SEARCH_HTTP_AUTH: "username:actual_password" - # # This secret will contain the ssl certificates. secretMounts: - name: opensearch-certificates @@ -183,3 +184,71 @@ opensearch: ".opendistro-notebooks", ".opendistro-asynchronous-search-response*", ] + +# Prometheus stack +prometheusstack: + enabled: false + + kubeStateMetrics: + enabled: true + + nodeExporter: + enabled: true + + prometheus: + enabled: true + + prometheusSpec: + resources: + requests: + cpu: "200m" + memory: "450Mi" + + alertmanager: + enabled: true + + alertmanagerSpec: + resources: + requests: + cpu: "100m" + memory: "50Mi" + + # Admin password is not pre-generated, because it is not picked up by the + # grafana pod yet -- this is a bug on their end. For more information, visit: + # https://github.com/prometheus-community/helm-charts/issues/3679 + grafana: + enabled: false + + ingress: + enabled: false + + dashboardProviders: + dashboardproviders.yaml: + apiVersion: 1 + providers: + - name: 'default' + orgId: 1 + folder: '' + type: file + disableDeletion: false + editable: true + options: + path: /var/lib/grafana/dashboards/default + + dashboards: + default: + kubernetes-views-global: + # url: https://grafana.com/api/dashboards/15757/revisions/31/download + gnetId: 15757 + revision: 31 + datasource: Prometheus + + grafana.ini: + dashboards: + default_home_dashboard_path: /var/lib/grafana/dashboards/default/kubernetes-views-global.json + + + resources: + requests: + cpu: 200m + memory: 256Mi diff --git a/values-example.yaml b/values-example.yaml index 0df602e..be68230 100644 --- a/values-example.yaml +++ b/values-example.yaml @@ -1,7 +1,10 @@ +clusterDomain: "example.com" + ingress-nginx: controller: config: proxy-body-size: 100m + cert-manager: # Set your email address here so auto-generated HTTPS certs will work: email: "email@example.com" @@ -11,8 +14,31 @@ elasticsearch: metricsserver: enabled: false + vpa: enabled: false opensearch: enabled: false + +prometheusstack: + enabled: false + + grafana: + enabled: false + + ingress: + enabled: true + ingressClassName: nginx + annotations: + cert-manager.io/cluster-issuer: "harmony-letsencrypt-global" + nginx.ingress.kubernetes.io/ssl-redirect: "true" + hosts: + - grafana.example.com + tls: + - secretName: promstack-ingress-tls + hosts: + - grafana.example.com + + # alertmanager: + # config: {} # Set it using `--set-file prometheusstack.alertmanager.config=` diff --git a/values-minikube.yaml b/values-minikube.yaml index c739977..4528485 100644 --- a/values-minikube.yaml +++ b/values-minikube.yaml @@ -2,6 +2,8 @@ cert-manager: enabled: false +clusterDomain: "example.local" + elasticsearch: enabled: false @@ -22,3 +24,6 @@ opensearch: persistence: size: 8Gi + +prometheusstack: + enabled: false