add service account with cluster-admin role for the token

This commit is contained in:
2024-07-24 08:09:00 +10:00
parent 49ad1962b7
commit db130c7ec6
5 changed files with 20 additions and 84 deletions

View File

@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: argocd

View File

@@ -1,54 +0,0 @@
apiVersion: v1
data:
kong.yml: |
_format_version: "3.0"
services:
- name: auth
host: kubernetes-dashboard-auth
port: 8000
protocol: http
routes:
- name: authLogin
paths:
- /api/v1/login
strip_path: false
- name: authCsrf
paths:
- /api/v1/csrftoken/login
strip_path: false
- name: authMe
paths:
- /api/v1/me
strip_path: false
- name: api
host: kubernetes-dashboard-api
port: 8000
protocol: http
routes:
- name: api
paths:
- /api
strip_path: false
- name: metrics
paths:
- /metrics
strip_path: false
- name: web
host: kubernetes-dashboard-web
port: 8000
protocol: http
routes:
- name: root
paths:
- /
strip_path: false
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/instance: kubernetes-dashboard
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kubernetes-dashboard
argocd.argoproj.io/instance: kubernetes-dashboard
helm.sh/chart: kubernetes-dashboard-7.5.0
name: kong-dbless-config
namespace: argocd

View File

@@ -1,29 +0,0 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
cert-manager.io/issuer: selfsigned
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
nginx.ingress.kubernetes.io/ssl-passthrough: 'true'
nginx.ingress.kubernetes.io/ssl-redirect: 'true'
labels:
app.kubernetes.io/instance: kubernetes-dashboard
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kubernetes-dashboard
argocd.argoproj.io/instance: kubernetes-dashboard
helm.sh/chart: kubernetes-dashboard-7.5.0
name: kubernetes-dashboard
namespace: argocd
spec:
ingressClassName: nginx
rules:
- host: k3s-dashboard.cluster.edward.sydney
http:
paths:
- backend:
service:
name: kubernetes-dashboard-kong-proxy
port:
number: 443
path: /
pathType: ImplementationSpecific

View File

@@ -1,4 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
- ../../base
- ./service-account.yaml
- ./cluster-role.yaml

View File

@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: argocd