add service account with cluster-admin role for the token
This commit is contained in:
12
apps/kubernetes-dashboard/env/k3s-cluster/cluster-role.yaml
vendored
Normal file
12
apps/kubernetes-dashboard/env/k3s-cluster/cluster-role.yaml
vendored
Normal 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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -2,3 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../../base
|
||||
- ./service-account.yaml
|
||||
- ./cluster-role.yaml
|
||||
5
apps/kubernetes-dashboard/env/k3s-cluster/service-account.yaml
vendored
Normal file
5
apps/kubernetes-dashboard/env/k3s-cluster/service-account.yaml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: admin-user
|
||||
namespace: argocd
|
||||
Reference in New Issue
Block a user