apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
  creationTimestamp: "2026-04-02T13:54:16Z"
  generation: 1
  labels:
    app: kubernetes-nmstate
    component: kubernetes-nmstate-metrics
    prometheus.nmstate.io: "true"
  name: nmstate-metrics
  namespace: openshift-nmstate
  ownerReferences:
  - apiVersion: nmstate.io/v1
    blockOwnerDeletion: true
    controller: true
    kind: NMState
    name: nmstate
    uid: 210b2bef-7bdf-4bce-b8f4-ec7da2e5942a
  resourceVersion: "34376"
  uid: 54cb70c8-ef00-495f-94f2-71e2de4bcbe3
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      name: nmstate-metrics
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        description: kubernetes-nmstate-metrics dump nmstate metrics
      creationTimestamp: null
      labels:
        app: kubernetes-nmstate
        component: kubernetes-nmstate-metrics
        name: nmstate-metrics
        prometheus.nmstate.io: "true"
    spec:
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - preference:
              matchExpressions:
              - key: node-role.kubernetes.io/control-plane
                operator: Exists
            weight: 10
          - preference:
              matchExpressions:
              - key: node-role.kubernetes.io/master
                operator: Exists
            weight: 1
      containers:
      - args:
        - --zap-time-encoding=iso8601
        command:
        - manager
        env:
        - name: WATCH_NAMESPACE
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: RUN_METRICS_MANAGER
        - name: OPERATOR_NAME
          value: nmstate
        - name: ENABLE_PROFILER
          value: "False"
        - name: PROFILER_PORT
          value: "6060"
        image: registry.redhat.io/openshift4/ose-kubernetes-nmstate-handler-rhel9@sha256:b1744b2b84d6e23d83f465f450d2621a86bfec595d64373438b2e7ce5331e82e
        imagePullPolicy: Always
        name: nmstate-metrics
        resources:
          requests:
            cpu: 30m
            memory: 20Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      - args:
        - --logtostderr
        - --secure-listen-address=:8443
        - --upstream=http://127.0.0.1:8089
        image: registry.redhat.io/openshift4/ose-kube-rbac-proxy-rhel9@sha256:4fdd6da66aba2523d2c21cef306b7650659926bbadb96dedd000d2b8c0229078
        imagePullPolicy: IfNotPresent
        name: kube-rbac-proxy
        ports:
        - containerPort: 8443
          name: metrics
          protocol: TCP
        resources:
          requests:
            cpu: 10m
            memory: 20Mi
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - ALL
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: FallbackToLogsOnError
      dnsPolicy: ClusterFirst
      nodeSelector:
        kubernetes.io/arch: amd64
      priorityClassName: system-cluster-critical
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: nmstate-handler
      serviceAccountName: nmstate-handler
      terminationGracePeriodSeconds: 30
      tolerations:
      - effect: NoSchedule
        key: node-role.kubernetes.io/master
        operator: Exists
      - effect: NoSchedule
        key: node-role.kubernetes.io/control-plane
        operator: Exists
      topologySpreadConstraints:
      - labelSelector:
          matchLabels:
            component: kubernetes-nmstate-metrics
        maxSkew: 1
        topologyKey: kubernetes.io/hostname
        whenUnsatisfiable: DoNotSchedule
status:
  availableReplicas: 1
  conditions:
  - lastTransitionTime: "2026-04-02T13:54:28Z"
    lastUpdateTime: "2026-04-02T13:54:28Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2026-04-02T13:54:16Z"
    lastUpdateTime: "2026-04-02T13:54:28Z"
    message: ReplicaSet "nmstate-metrics-9b8c8685d" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 1
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1
