---
# Source: metrics-server/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: local-metrics-server
  namespace: default
  labels:
    helm.sh/chart: metrics-server-3.8.3
    app.kubernetes.io/name: metrics-server
    app.kubernetes.io/instance: local-metrics-server
    app.kubernetes.io/version: "0.6.2"
    app.kubernetes.io/managed-by: Helm
---
# Source: metrics-server/templates/clusterrole-aggregated-reader.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: system:metrics-server-aggregated-reader
  labels:
    helm.sh/chart: metrics-server-3.8.3
    app.kubernetes.io/name: metrics-server
    app.kubernetes.io/instance: local-metrics-server
    app.kubernetes.io/version: "0.6.2"
    app.kubernetes.io/managed-by: Helm
    rbac.authorization.k8s.io/aggregate-to-admin: "true"
    rbac.authorization.k8s.io/aggregate-to-edit: "true"
    rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
  - apiGroups:
      - metrics.k8s.io
    resources:
      - pods
      - nodes
    verbs:
      - get
      - list
      - watch
---
# Source: metrics-server/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: system:local-metrics-server
  labels:
    helm.sh/chart: metrics-server-3.8.3
    app.kubernetes.io/name: metrics-server
    app.kubernetes.io/instance: local-metrics-server
    app.kubernetes.io/version: "0.6.2"
    app.kubernetes.io/managed-by: Helm
rules:
  - apiGroups:
    - ""
    resources:
    - nodes/metrics
    verbs:
    - get
  - apiGroups:
    - ""
    resources:
      - pods
      - nodes
      - namespaces
      - configmaps
    verbs:
      - get
      - list
      - watch
---
# Source: metrics-server/templates/clusterrolebinding-auth-delegator.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: local-metrics-server:system:auth-delegator
  labels:
    helm.sh/chart: metrics-server-3.8.3
    app.kubernetes.io/name: metrics-server
    app.kubernetes.io/instance: local-metrics-server
    app.kubernetes.io/version: "0.6.2"
    app.kubernetes.io/managed-by: Helm
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: system:auth-delegator
subjects:
  - kind: ServiceAccount
    name: local-metrics-server
    namespace: default
---
# Source: metrics-server/templates/clusterrolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: system:local-metrics-server
  labels:
    helm.sh/chart: metrics-server-3.8.3
    app.kubernetes.io/name: metrics-server
    app.kubernetes.io/instance: local-metrics-server
    app.kubernetes.io/version: "0.6.2"
    app.kubernetes.io/managed-by: Helm
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: system:local-metrics-server
subjects:
  - kind: ServiceAccount
    name: local-metrics-server
    namespace: default
---
# Source: metrics-server/templates/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: local-metrics-server-auth-reader
  namespace: default
  labels:
    helm.sh/chart: metrics-server-3.8.3
    app.kubernetes.io/name: metrics-server
    app.kubernetes.io/instance: local-metrics-server
    app.kubernetes.io/version: "0.6.2"
    app.kubernetes.io/managed-by: Helm
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: extension-apiserver-authentication-reader
subjects:
  - kind: ServiceAccount
    name: local-metrics-server
    namespace: default
---
# Source: metrics-server/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: local-metrics-server
  namespace: default
  labels:
    helm.sh/chart: metrics-server-3.8.3
    app.kubernetes.io/name: metrics-server
    app.kubernetes.io/instance: local-metrics-server
    app.kubernetes.io/version: "0.6.2"
    app.kubernetes.io/managed-by: Helm
spec:
  type: ClusterIP
  ports:
    - name: https
      port: 443
      protocol: TCP
      targetPort: https
  selector:
    app.kubernetes.io/name: metrics-server
    app.kubernetes.io/instance: local-metrics-server
---
# Source: metrics-server/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: local-metrics-server
  namespace: default
  labels:
    helm.sh/chart: metrics-server-3.8.3
    app.kubernetes.io/name: metrics-server
    app.kubernetes.io/instance: local-metrics-server
    app.kubernetes.io/version: "0.6.2"
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: metrics-server
      app.kubernetes.io/instance: local-metrics-server
  template:
    metadata:
      labels:
        app.kubernetes.io/name: metrics-server
        app.kubernetes.io/instance: local-metrics-server
    spec:
      schedulerName: 
      serviceAccountName: local-metrics-server
      priorityClassName: "system-cluster-critical"
      containers:
        - name: metrics-server
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            runAsUser: 1000
          image: registry.k8s.io/metrics-server/metrics-server:v0.6.2
          imagePullPolicy: IfNotPresent
          args:
            - --secure-port=10250
            - --cert-dir=/tmp
            - --kubelet-insecure-tls
            - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
            - --kubelet-use-node-status-port
            - --metric-resolution=15s
          ports:
          - name: https
            protocol: TCP
            containerPort: 10250
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /livez
              port: https
              scheme: HTTPS
            initialDelaySeconds: 0
            periodSeconds: 10
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /readyz
              port: https
              scheme: HTTPS
            initialDelaySeconds: 20
            periodSeconds: 10
          volumeMounts:
            - name: tmp
              mountPath: /tmp
      volumes:
        - name: tmp
          emptyDir: {}
---
# Source: metrics-server/templates/apiservice.yaml
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
  name: v1beta1.metrics.k8s.io
  labels:
    helm.sh/chart: metrics-server-3.8.3
    app.kubernetes.io/name: metrics-server
    app.kubernetes.io/instance: local-metrics-server
    app.kubernetes.io/version: "0.6.2"
    app.kubernetes.io/managed-by: Helm
spec:
  group: metrics.k8s.io
  groupPriorityMinimum: 100
  insecureSkipTLSVerify: true
  service:
    name: local-metrics-server
    namespace: default
    port: 443
  version: v1beta1
  versionPriority: 100
