From f8b0cb75cac2a7d02f1b34670b945c270bf75e4a Mon Sep 17 00:00:00 2001 From: mickeyzzc Date: Wed, 11 Oct 2023 14:05:31 +0800 Subject: [PATCH] add examples Signed-off-by: mickeyzzc --- .../deployment-no-node-pods.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 examples/daemonsetsharding/deployment-no-node-pods.yaml diff --git a/examples/daemonsetsharding/deployment-no-node-pods.yaml b/examples/daemonsetsharding/deployment-no-node-pods.yaml new file mode 100644 index 0000000000..144a76f446 --- /dev/null +++ b/examples/daemonsetsharding/deployment-no-node-pods.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: exporter + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 2.10.0 + name: kube-state-metrics-pods + namespace: kube-system +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: kube-state-metrics + template: + metadata: + labels: + app.kubernetes.io/component: exporter + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 2.10.0 + spec: + automountServiceAccountToken: true + containers: + - args: + - --resources=pods + - --node="" + - --enable-no-node-scrape + image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.0 + livenessProbe: + httpGet: + path: /healthz + port: 8080 + initialDelaySeconds: 5 + timeoutSeconds: 5 + name: kube-state-metrics + ports: + - containerPort: 8080 + name: http-metrics + - containerPort: 8081 + name: telemetry + readinessProbe: + httpGet: + path: / + port: 8081 + initialDelaySeconds: 5 + timeoutSeconds: 5 + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 65534 + seccompProfile: + type: RuntimeDefault + nodeSelector: + kubernetes.io/os: linux + serviceAccountName: kube-state-metrics