Edge-health

Edge-health 配置示例
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: edge-health
  namespace: edge-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: edge-health
rules:
  - apiGroups:
      - ""
    resources:
      - nodes
      - nodes/proxy
    verbs:
      - get
      - list
      - watch
      - update
      - patch
  - apiGroups:
      - ""
    resources:
      - configmaps
    verbs:
      - get
      - list
      - watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: edge-health
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: edge-health
subjects:
  - kind: ServiceAccount
    name: edge-health
    namespace: edge-system

---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: edge-health
  namespace: edge-system
spec:
  selector:
    matchLabels:
      name: edge-health
  template:
    metadata:
      labels:
        name: edge-health
    spec:
      serviceAccountName: edge-health
      containers:
        - name: edge-health
          image: superedge/edge-health:v0.3.0
          imagePullPolicy: IfNotPresent
          resources:
            limits: 
              cpu: 50m
              memory: 100Mi
            requests: 
              cpu: 10m
              memory: 20Mi
          command:
            - edge-health
          args:
            - --kubeletauthplugin=timeout=5,retrytime=3,weight=1,port=10250
            - --v=2
          env:
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: spec.nodeName
          securityContext:
            procMount: Default
      dnsPolicy: ClusterFirst
      hostNetwork: true
      restartPolicy: Always
      securityContext: {}
      terminationGracePeriodSeconds: 30
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: hmac-config
  namespace: edge-system
data:
  hmackey: {{.HmacKey}}

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