ApplicationGrid Controller
ApplicationGrid controller 配置示例
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: application-grid-controller
namespace: edge-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: application-grid-controller
rules:
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- "*"
- apiGroups:
- ""
resources:
- nodes
- services
verbs:
- "*"
- apiGroups:
- extensions
- apps
resources:
- deployments
- statefulsets
verbs:
- "*"
- apiGroups:
- superedge.io
resources:
- deploymentgrids
- servicegrids
- statefulsetgrids
- deploymentgrids/status
- statefulsetgrids/status
verbs:
- "*"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: application-grid-controller
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: application-grid-controller
subjects:
- kind: ServiceAccount
name: application-grid-controller
namespace: edge-system
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: application-grid-controller
namespace: edge-system
spec:
replicas: 1
selector:
matchLabels:
app: application-grid-controller
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: application-grid-controller
spec:
serviceAccountName: application-grid-controller
containers:
- name: application-grid-controller
image: superedge/application-grid-controller:v0.3.0
imagePullPolicy: IfNotPresent
command:
- /usr/local/bin/application-grid-controller
resources:
limits:
cpu: 50m
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
nodeSelector:
node-role.kubernetes.io/master: ""
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
Feedback
Was this page helpful?
Glad to hear from you! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
最后修改
June 15, 2021
: Fixed error links and paths (fef537b)