Edge-health Admission

Edge-health admission sample config

edge-health/edge-health-admission.yaml

  1. ---
  2. apiVersion: v1
  3. kind: ServiceAccount
  4. metadata:
  5. name: edge-health-admission
  6. namespace: edge-system
  7. ---
  8. apiVersion: rbac.authorization.k8s.io/v1
  9. kind: ClusterRole
  10. metadata:
  11. name: edge-health-admission
  12. rules:
  13. - apiGroups:
  14. - ""
  15. resources:
  16. - nodes
  17. verbs:
  18. - "*"
  19. ---
  20. apiVersion: rbac.authorization.k8s.io/v1
  21. kind: ClusterRoleBinding
  22. metadata:
  23. name: edge-health-admission
  24. roleRef:
  25. apiGroup: rbac.authorization.k8s.io
  26. kind: ClusterRole
  27. name: edge-health-admission
  28. subjects:
  29. - kind: ServiceAccount
  30. name: edge-health-admission
  31. namespace: edge-system
  32. ---
  33. apiVersion: v1
  34. data:
  35. server.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURYekNDQWtlZ0F3SUJBZ0lKQUovcUhvQ0ptUnNwTUEwR0NTcUdTSWIzRFFFQkJRVUFNRnN4Q3pBSkJnTlYKQkFZVEFrTk9NUkl3RUFZRFZRUUlEQWxIZFdGdVoyUnZibWN4RVRBUEJnTlZCQWNNQ0ZOb1pXNTZhR1Z1TVJBdwpEZ1lEVlFRS0RBZFVaVzVqWlc1ME1STXdFUVlEVlFRRERBcHpkWEJsY2kxbFpHZGxNQjRYRFRJeE1EVXhOekUwCk1qa3pORm9YRFRNMU1ERXlOREUwTWprek5Gb3dJREVlTUJ3R0ExVUVBd3dWWldSblpTMW9aV0ZzZEdndFlXUnQKYVhOemFXOXVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXc5Z2lmY05QNkJPSQo1dVRLTWszUXZrOGQycm1lS2RsQTZoTTFCUUdrRjRpeG5ldlN6RUFScmR6V2ZDRzZFOGZnR0pGM0V6ZzI5L3FVCndGR2JKL1d5TVRWdDVoOU95ZlZZQ0dYeTlMZ1hBV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bgpWLzlxNTE3ZlBITW5jUmd0K1drY043L3VUbGNmM2w5dUlXWmlicWtyVmJmOVNwNXNHMCtFVXc9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
  37. kind: Secret
  38. metadata:
  39. name: validate-admission-control-server-certs
  40. namespace: edge-system
  41. ---
  42. apiVersion: apps/v1
  43. kind: Deployment
  44. metadata:
  45. name: edge-health-admission
  46. namespace: edge-system
  47. spec:
  48. replicas: 1
  49. selector:
  50. matchLabels:
  51. k8s-app: edge-health-admission
  52. strategy:
  53. rollingUpdate:
  54. maxSurge: 1
  55. maxUnavailable: 1
  56. type: RollingUpdate
  57. template:
  58. metadata:
  59. labels:
  60. k8s-app: edge-health-admission
  61. spec:
  62. containers:
  63. - name: edge-health-admission
  64. image: superedge/edge-health-admission:v0.3.0
  65. imagePullPolicy: Always
  66. command:
  67. - edge-health-admission
  68. args:
  69. - --alsologtostderr
  70. - --v=4
  71. - --admission-control-server-cert=/etc/edge-health-admission/certs/server.crt
  72. - --admission-control-server-key=/etc/edge-health-admission/certs/server.key
  73. env:
  74. - name: MASTER_NAMESPACE
  75. valueFrom:
  76. fieldRef:
  77. apiVersion: v1
  78. fieldPath: metadata.namespace
  79. volumeMounts:
  80. - mountPath: /etc/edge-health-admission/certs
  81. name: admission-server-certs
  82. resources:
  83. limits:
  84. cpu: 50m
  85. memory: 100Mi
  86. requests:
  87. cpu: 10m
  88. memory: 20Mi
  89. dnsPolicy: ClusterFirst
  90. restartPolicy: Always
  91. volumes:
  92. - secret:
  93. secretName: validate-admission-control-server-certs
  94. name: admission-server-certs
  95. nodeSelector:
  96. node-role.kubernetes.io/master: ""
  97. tolerations:
  98. - effect: NoSchedule
  99. key: node-role.kubernetes.io/master
  100. serviceAccountName: edge-health-admission
  101. ---
  102. apiVersion: v1
  103. kind: Service
  104. metadata:
  105. name: edge-health-admission
  106. namespace: edge-system
  107. spec:
  108. ports:
  109. - port: 443
  110. protocol: TCP
  111. targetPort: 8443
  112. selector:
  113. k8s-app: edge-health-admission
  114. type: ClusterIP

Last modified June 15, 2021 : Fixed error links and paths (fef537b)