Skip to content

Commit

Permalink
feat: add kubernetes dashboard
Browse files Browse the repository at this point in the history
Signed-off-by: Gabor Boros <[email protected]>
  • Loading branch information
gabor-boros committed Dec 28, 2023
1 parent 87229e5 commit 680024f
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ cd infra-examples/digitalocean
terraform init
terraform apply
cd ..
export KUBECONFIG=`pwd`/infra-examples/kubeconfig
export KUBECONFIG=`pwd`/infra-examples/digitalocean/kubeconfig
```

Then follow steps 1-4 above. When you're done, run `terraform destroy` to clean
Expand Down
9 changes: 6 additions & 3 deletions charts/harmony-chart/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies:
version: 4.4.2
- 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
Expand All @@ -20,5 +20,8 @@ dependencies:
- name: karpenter
repository: oci://public.ecr.aws/karpenter
version: v0.29.2
digest: sha256:453b9f734e2d770948d3cbd36529d98da284b96de051581ea8d11a3c05e7a78e
generated: "2023-10-03T10:52:43.453442762-05: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"
8 changes: 7 additions & 1 deletion charts/harmony-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -52,3 +52,9 @@ dependencies:
version: "v0.29.2"
repository: oci://public.ecr.aws/karpenter
condition: karpenter.enabled

- name: kubernetes-dashboard
version: "7.0.0-alpha1"
repository: https://kubernetes.github.io/dashboard
alias: k8sdashboard
condition: k8sdashboard.enabled
12 changes: 12 additions & 0 deletions charts/harmony-chart/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ that the load balancer is working. First, get its external IP using
Next, go to http://the.external.ip.shown/cluster-echo-test and make sure you get
a JSON response.

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



Expand Down
4 changes: 2 additions & 2 deletions charts/harmony-chart/templates/issuer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
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" }}
email: {{ index .Values "cert-manager" "email" }}
{{- end }}
preferredChain: ""
privateKeySecretRef:
name: {{ .Release.Name }}-letsencrypt-global
name: harmony-letsencrypt-global
server: https://acme-v02.api.letsencrypt.org/directory
solvers:
- http01:
Expand Down
6 changes: 6 additions & 0 deletions charts/harmony-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ metricsserver:
# 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
Expand Down Expand Up @@ -183,6 +184,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
Expand Down Expand Up @@ -235,3 +237,7 @@ karpenter:
# Node template reference. More details in https://karpenter.sh/docs/concepts/node-templates/
nodeTemplate:
name: "default"

# Configuration for the K8s Dashboard chart
k8sdashboard:
enabled: false
3 changes: 3 additions & 0 deletions values-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ vpa:

opensearch:
enabled: false

k8sdashboard:
enabled: false
3 changes: 3 additions & 0 deletions values-minikube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ opensearch:

persistence:
size: 8Gi

k8sdashboard:
enabled: false

0 comments on commit 680024f

Please sign in to comment.