Skip to content

Commit

Permalink
refactor(kubernetes-dashboard): move override to separate values.yaml…
Browse files Browse the repository at this point in the history
… file (#179)

* refactor: use multiple source for kubernetes-dashboard argo application

- store override in a separate values.yaml file
- upgrade to version 7.9.0

* misc: add description

* fix: yaml linting
  • Loading branch information
muse-sisay authored Nov 25, 2024
1 parent 77e6825 commit 546c236
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@ metadata:
- resources-finalizer.argocd.argoproj.io
spec:
project: <PROJECT>
source:
repoURL: 'https://kubernetes.github.io/dashboard'
targetRevision: 6.0.0
chart: kubernetes-dashboard
helm:
values: |
app:
ingress:
hosts:
# keep only the 'localhost' host if you only want to access Dashboard using 'kubectl port-forward ...' on:
# https://localhost:8443
# please note that the ingress itself is managed in ingress.yaml
- localhost
- kubernetes-dashboard.<DOMAIN_NAME>
sources:
- repoURL: "https://kubernetes.github.io/dashboard"
targetRevision: 7.9.0
chart: kubernetes-dashboard
helm:
valueFiles:
- $values/registry/clusters/<CLUSTER_NAME>/components/kubernetes-dashboard/values.yaml
- repoURL: <GITOPS_REPO_URL>
targetRevision: HEAD
ref: values
- repoURL: <GITOPS_REPO_URL>
path: registry/clusters/<CLUSTER_NAME>/components/kubernetes-dashboard/dependencies/
targetRevision: HEAD
destination:
name: <CLUSTER_DESTINATION>
namespace: kubernetes-dashboard
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: k8s-dashboard-clusterrole
name: dashboard-user
annotations:
argocd.argoproj.io/sync-wave: "0"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: <CLUSTER_NAME>-kubernetes-dashboard
name: dashboard-user
namespace: kubernetes-dashboard
roleRef:
kind: ClusterRole
name: admin
apiGroup: rbac.authorization.k8s.io
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: dashboard-user

# to get your bearer token for auth, connect to your cluster, then run command:
# kubectl -n kubernetes-dashboard create token dashboard-user
27 changes: 0 additions & 27 deletions kubernetes-dashboard/components/kubernetes-dashboard/ingress.yaml

This file was deleted.

This file was deleted.

21 changes: 21 additions & 0 deletions kubernetes-dashboard/components/kubernetes-dashboard/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
app:
ingress:
enabled: true
hosts:
- kubernetes-dashboard.<CLUSTER_NAME>.<DOMAIN_NAME>
ingressClassName: nginx
tls:
enabled: true
secretName: "kubernetes-dashboard-tls"
# Adds following annotation cert-manager.io/cluster-issuer: letsencrypt-prod
issuer:
scope: cluster
name: "letsencrypt-prod"
# This will append our Ingress with annotations required by our default configuration.
# nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
# nginx.ingress.kubernetes.io/ssl-passthrough: "true"
# nginx.ingress.kubernetes.io/ssl-redirect: "true"
useDefaultAnnotations: true
annotations:
argocd.argoproj.io/sync-wave: "2"

0 comments on commit 546c236

Please sign in to comment.