From e670de89f1c956bc81195a4cee148529e031123a Mon Sep 17 00:00:00 2001 From: Gabor Boros Date: Thu, 28 Dec 2023 18:14:18 +0400 Subject: [PATCH] feat: add kubernetes dashboard Signed-off-by: Gabor Boros --- charts/harmony-chart/Chart.lock | 9 +++++++++ charts/harmony-chart/Chart.yaml | 8 +++++++- charts/harmony-chart/templates/NOTES.txt | 11 +++++++++++ charts/harmony-chart/templates/issuer.yaml | 4 ++-- charts/harmony-chart/values.yaml | 22 ++++++++++++++++++++++ values-example.yaml | 3 +++ values-minikube.yaml | 4 +++- 7 files changed, 57 insertions(+), 4 deletions(-) diff --git a/charts/harmony-chart/Chart.lock b/charts/harmony-chart/Chart.lock index dca39cd..47ae55e 100644 --- a/charts/harmony-chart/Chart.lock +++ b/charts/harmony-chart/Chart.lock @@ -5,6 +5,10 @@ dependencies: - name: cert-manager repository: https://charts.jetstack.io version: v1.11.0 + version: v1.13.3 +- name: elasticsearch + repository: https://helm.elastic.co + version: 7.17.3 - name: metrics-server repository: https://kubernetes-sigs.github.io/metrics-server/ version: 3.8.4 @@ -25,3 +29,8 @@ dependencies: version: 56.6.2 digest: sha256:8d3ab6c27a75b2ab6106164e38ecfaeaecfb329abc3526c25565f4d6fa6d4ed5 generated: "2024-02-05T14:59:50.438116+04:00" +- name: kubernetes-dashboard + repository: https://kubernetes.github.io/dashboard + version: 7.0.0-alpha1 +digest: sha256:bedac332402276e1f3bea3df41874f0b666e8e577e60dc5af9eac9feae3e2314 +generated: "2023-12-26T13:58:52.595736+04:00" diff --git a/charts/harmony-chart/Chart.yaml b/charts/harmony-chart/Chart.yaml index 565a897..010ec77 100644 --- a/charts/harmony-chart/Chart.yaml +++ b/charts/harmony-chart/Chart.yaml @@ -22,7 +22,7 @@ dependencies: condition: ingress-nginx.enabled - name: cert-manager - version: "1.11.0" + version: "1.13.3" repository: https://charts.jetstack.io condition: cert-manager.enabled @@ -58,3 +58,9 @@ dependencies: version: "56.6.2" condition: prometheusstack.enabled repository: https://prometheus-community.github.io/helm-charts + +- name: kubernetes-dashboard + version: "7.0.0-alpha1" + repository: https://kubernetes.github.io/dashboard + alias: k8sdashboard + condition: k8sdashboard.enabled diff --git a/charts/harmony-chart/templates/NOTES.txt b/charts/harmony-chart/templates/NOTES.txt index dff52ce..015b381 100644 --- a/charts/harmony-chart/templates/NOTES.txt +++ b/charts/harmony-chart/templates/NOTES.txt @@ -14,6 +14,17 @@ a JSON response. 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! +{{- if .Values.k8sdashboard.enabled }} +You have enabled the Kubernetes dashboard. For security purposes, it is not +exposed to the internet as is, however, by adjusting the settings, you could +expose it. + +To connect to the dashboard, start port-forwarding with the following command: + + kubectl -n harmony port-forward svc/harmony-nginx-controller 8443:443 + +Now you can connect to https://localhost:8443. The certificate is self-signed by +the cluster. {{- end }} diff --git a/charts/harmony-chart/templates/issuer.yaml b/charts/harmony-chart/templates/issuer.yaml index d3b426b..d04c0e0 100644 --- a/charts/harmony-chart/templates/issuer.yaml +++ b/charts/harmony-chart/templates/issuer.yaml @@ -2,7 +2,7 @@ apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: - name: {{ .Release.Name }}-letsencrypt-global + name: harmony-letsencrypt-global spec: acme: {{- if index .Values "cert-manager" "email" }} @@ -10,7 +10,7 @@ spec: {{- end }} preferredChain: "" privateKeySecretRef: - name: {{ .Release.Name }}-letsencrypt-global + name: harmony-letsencrypt-global server: https://acme-v02.api.letsencrypt.org/directory solvers: - http01: diff --git a/charts/harmony-chart/values.yaml b/charts/harmony-chart/values.yaml index 13d8350..b8a937a 100644 --- a/charts/harmony-chart/values.yaml +++ b/charts/harmony-chart/values.yaml @@ -85,6 +85,23 @@ 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 @@ -185,6 +202,7 @@ opensearch: ".opendistro-asynchronous-search-response*", ] +# Configuration for the Karpenter chart karpenter: # add Karpenter node management for AWS EKS clusters. See: https://karpenter.sh/ enabled: false @@ -311,3 +329,7 @@ prometheusstack: requests: cpu: 200m memory: 256Mi + +# Configuration for the K8s Dashboard chart +k8sdashboard: + enabled: false diff --git a/values-example.yaml b/values-example.yaml index be68230..dd8a361 100644 --- a/values-example.yaml +++ b/values-example.yaml @@ -42,3 +42,6 @@ prometheusstack: # alertmanager: # config: {} # Set it using `--set-file prometheusstack.alertmanager.config=` + +k8sdashboard: + enabled: false diff --git a/values-minikube.yaml b/values-minikube.yaml index 4528485..3793e5f 100644 --- a/values-minikube.yaml +++ b/values-minikube.yaml @@ -25,5 +25,7 @@ opensearch: persistence: size: 8Gi -prometheusstack: +prometheusstack: {} + +k8sdashboard: enabled: false