k3s-addon/templates/ingress-apisix-values.yaml: enable sa rbac

This commit is contained in:
Haitao Pan 2023-06-03 18:26:17 +08:00
parent cb7a4ca11c
commit d32946be14
2 changed files with 53 additions and 2 deletions

View File

@ -5,8 +5,10 @@ ingress-controller:
serviceNamespace: ingress
etcd:
replicaCount: 1
discovery:
enabled: true
serviceAccount:
create: true
rbac:
create: true
admin:
enabled: true
gateway:
@ -22,3 +24,5 @@ gateway:
- {{ ingress_ip }}
dashboard:
enabled: false
discovery:
enabled: true

View File

@ -0,0 +1,47 @@
kind: ServiceAccount
apiVersion: v1
metadata:
name: apisix-test
namespace: default
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: apisix-test
rules:
- apiGroups: [ "" ]
resources: [ endpoints ]
verbs: [ get,list,watch ]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: apisix-test
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: apisix-test
subjects:
- kind: ServiceAccount
name: apisix-test
namespace: default
---
discovery:
kubernetes:
- id: release # a custom name refer to the cluster, pattern ^[a-z0-9]{1,8}
service:
schema: https #default https
host: "1.cluster.com"
port: "6443"
client:
#token: |-
# eyJhbGciOiJSUzI1NiIsImtpZCI6Ikx5ME1DNWdnbmhQNkZCNlZYMXBsT3pYU3BBS2swYzBPSkN3ZnBESGpkUEEif
# 6Ikx5ME1DNWdnbmhQNkZCNlZYMXBsT3pYU3BBS2swYzBPSkN3ZnBESGpkUEEifeyJhbGciOiJSUzI1NiIsImtpZCI
default_weight: 50 # weight assigned to each discovered endpoint. default 50, minimum 0
namespace_selector:
equal: default
label_selector: |-
first="a",second="b"
shared_size: 1m #default 1m