Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(kubernetes-dashboard): move override to separate values.yaml file #179

Merged
merged 5 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
muse-sisay marked this conversation as resolved.
Show resolved Hide resolved
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
muse-sisay marked this conversation as resolved.
Show resolved Hide resolved

# 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"