ApplicationGrid Controller

ApplicationGrid controller 配置示例

serviceGroup/application-grid-controller.yaml

  1. ---
  2. apiVersion: v1
  3. kind: ServiceAccount
  4. metadata:
  5. name: application-grid-controller
  6. namespace: edge-system
  7. ---
  8. apiVersion: rbac.authorization.k8s.io/v1
  9. kind: ClusterRole
  10. metadata:
  11. name: application-grid-controller
  12. rules:
  13. - apiGroups:
  14. - apiextensions.k8s.io
  15. resources:
  16. - customresourcedefinitions
  17. verbs:
  18. - "*"
  19. - apiGroups:
  20. - ""
  21. resources:
  22. - nodes
  23. - services
  24. verbs:
  25. - "*"
  26. - apiGroups:
  27. - extensions
  28. - apps
  29. resources:
  30. - deployments
  31. - statefulsets
  32. verbs:
  33. - "*"
  34. - apiGroups:
  35. - superedge.io
  36. resources:
  37. - deploymentgrids
  38. - servicegrids
  39. - statefulsetgrids
  40. - deploymentgrids/status
  41. - statefulsetgrids/status
  42. verbs:
  43. - "*"
  44. ---
  45. apiVersion: rbac.authorization.k8s.io/v1
  46. kind: ClusterRoleBinding
  47. metadata:
  48. name: application-grid-controller
  49. roleRef:
  50. apiGroup: rbac.authorization.k8s.io
  51. kind: ClusterRole
  52. name: application-grid-controller
  53. subjects:
  54. - kind: ServiceAccount
  55. name: application-grid-controller
  56. namespace: edge-system
  57. ---
  58. apiVersion: apps/v1
  59. kind: Deployment
  60. metadata:
  61. name: application-grid-controller
  62. namespace: edge-system
  63. spec:
  64. replicas: 1
  65. selector:
  66. matchLabels:
  67. app: application-grid-controller
  68. strategy:
  69. rollingUpdate:
  70. maxSurge: 1
  71. maxUnavailable: 1
  72. type: RollingUpdate
  73. template:
  74. metadata:
  75. labels:
  76. app: application-grid-controller
  77. spec:
  78. serviceAccountName: application-grid-controller
  79. containers:
  80. - name: application-grid-controller
  81. image: superedge/application-grid-controller:v0.3.0
  82. imagePullPolicy: IfNotPresent
  83. command:
  84. - /usr/local/bin/application-grid-controller
  85. resources:
  86. limits:
  87. cpu: 50m
  88. memory: 100Mi
  89. requests:
  90. cpu: 10m
  91. memory: 20Mi
  92. terminationMessagePath: /dev/termination-log
  93. terminationMessagePolicy: File
  94. dnsPolicy: ClusterFirst
  95. restartPolicy: Always
  96. schedulerName: default-scheduler
  97. securityContext: {}
  98. terminationGracePeriodSeconds: 30
  99. nodeSelector:
  100. node-role.kubernetes.io/master: ""
  101. tolerations:
  102. - key: "node-role.kubernetes.io/master"
  103. operator: "Exists"
  104. effect: "NoSchedule"

最后修改 June 15, 2021 : Fixed error links and paths (fef537b)