mirror of https://github.com/openkruise/charts.git
add configmap for kruise game
This commit is contained in:
parent
a44ffe1eb6
commit
a2b44ed698
|
|
@ -0,0 +1,42 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: kruise-game-manager-config
|
||||||
|
namespace: {{ .Values.installation.namespace }}
|
||||||
|
data:
|
||||||
|
config.toml: |
|
||||||
|
[kubernetes]
|
||||||
|
enable = true
|
||||||
|
[kubernetes.hostPort]
|
||||||
|
max_port = 9000
|
||||||
|
min_port = 8000
|
||||||
|
|
||||||
|
[alibabacloud]
|
||||||
|
enable = true
|
||||||
|
[alibabacloud.slb]
|
||||||
|
max_port = 700
|
||||||
|
min_port = 500
|
||||||
|
controller_manager_config.yaml: |
|
||||||
|
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
|
||||||
|
kind: ControllerManagerConfig
|
||||||
|
health:
|
||||||
|
healthProbeBindAddress: :8081
|
||||||
|
metrics:
|
||||||
|
bindAddress: 127.0.0.1:8080
|
||||||
|
webhook:
|
||||||
|
port: 9443
|
||||||
|
leaderElection:
|
||||||
|
leaderElect: true
|
||||||
|
resourceName: c637bb1e.my.domain
|
||||||
|
# leaderElectionReleaseOnCancel defines if the leader should step down volume
|
||||||
|
# when the Manager ends. This requires the binary to immediately end when the
|
||||||
|
# Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
|
||||||
|
# speeds up voluntary leader transitions as the new leader don't have to wait
|
||||||
|
# LeaseDuration time first.
|
||||||
|
# In the default scaffold provided, the program ends immediately after
|
||||||
|
# the manager stops, so would be fine to enable this option. However,
|
||||||
|
# if you are doing or is intended to do any operation such as perform cleanups
|
||||||
|
# after the manager stops then its usage might be unsafe.
|
||||||
|
# leaderElectionReleaseOnCancel: true
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -14,10 +14,10 @@ metadata:
|
||||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: https
|
- name: https
|
||||||
port: {{ .Values.service.port }}
|
port: {{ .Values.service.port }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: https
|
targetPort: https
|
||||||
selector:
|
selector:
|
||||||
control-plane: {{ .Values.kruiseGame.fullname }}
|
control-plane: {{ .Values.kruiseGame.fullname }}
|
||||||
---
|
---
|
||||||
|
|
@ -53,7 +53,8 @@ spec:
|
||||||
- command:
|
- command:
|
||||||
- /manager
|
- /manager
|
||||||
args:
|
args:
|
||||||
- --leader-elect=false
|
- '-leader-elect=false'
|
||||||
|
- '-provider-config=/etc/kruise-game/config.toml'
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
name: manager
|
name: manager
|
||||||
|
|
@ -78,5 +79,16 @@ spec:
|
||||||
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /etc/kruise-game
|
||||||
|
name: provider-config
|
||||||
serviceAccountName: {{ .Values.kruiseGame.fullname }}
|
serviceAccountName: {{ .Values.kruiseGame.fullname }}
|
||||||
terminationGracePeriodSeconds: 10
|
terminationGracePeriodSeconds: 10
|
||||||
|
volumes:
|
||||||
|
- configMap:
|
||||||
|
defaultMode: 420
|
||||||
|
items:
|
||||||
|
- key: config.toml
|
||||||
|
path: config.toml
|
||||||
|
name: kruise-game-manager-config
|
||||||
|
name: provider-config
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,7 @@ metadata:
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: Role
|
kind: Role
|
||||||
metadata:
|
metadata:
|
||||||
name: leader-election-role
|
name: kruise-game-leader-election-role
|
||||||
namespace: {{ .Values.installation.namespace }}
|
|
||||||
rules:
|
rules:
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
|
|
@ -46,7 +45,7 @@ apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
name: manager-role
|
name: kruise-game-manager-role
|
||||||
rules:
|
rules:
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
|
|
@ -241,14 +240,41 @@ rules:
|
||||||
- update
|
- update
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: kruise-game-metrics-reader
|
||||||
|
rules:
|
||||||
|
- nonResourceURLs:
|
||||||
|
- "/metrics"
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: kruise-game-proxy-role
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- authentication.k8s.io
|
||||||
|
resources:
|
||||||
|
- tokenreviews
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- apiGroups:
|
||||||
|
- authorization.k8s.io
|
||||||
|
resources:
|
||||||
|
- subjectaccessreviews
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: RoleBinding
|
kind: RoleBinding
|
||||||
metadata:
|
metadata:
|
||||||
name: leader-election-rolebinding
|
name: kruise-game-leader-election-rolebinding
|
||||||
namespace: {{ .Values.installation.namespace }}
|
|
||||||
roleRef:
|
roleRef:
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
kind: Role
|
kind: Role
|
||||||
name: leader-election-role
|
name: kruise-game-leader-election-role
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: {{ .Values.kruiseGame.fullname }}
|
name: {{ .Values.kruiseGame.fullname }}
|
||||||
|
|
@ -257,12 +283,25 @@ subjects:
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
metadata:
|
metadata:
|
||||||
name: manager-rolebinding
|
name: kruise-game-manager-rolebinding
|
||||||
namespace: {{ .Values.installation.namespace }}
|
namespace: {{ .Values.installation.namespace }}
|
||||||
roleRef:
|
roleRef:
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: manager-role
|
name: kruise-game-manager-role
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ .Values.kruiseGame.fullname }}
|
||||||
|
namespace: {{ .Values.installation.namespace }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: kruise-game-proxy-rolebinding
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: proxy-role
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: {{ .Values.kruiseGame.fullname }}
|
name: {{ .Values.kruiseGame.fullname }}
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ kruiseGame:
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
image:
|
image:
|
||||||
repository: registry.cn-hangzhou.aliyuncs.com/acs/kruise-game-controller-manager
|
repository: openkruise/kruise-game-manager
|
||||||
tag: v0.0.9
|
tag: v0.1.0-pre
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue