---
apiVersion: v1
kind: Pod
metadata:
  annotations:
    openshift.io/scc: privileged
  creationTimestamp: "2022-03-08T10:43:50Z"
  generateName: node-ca-
  labels:
    controller-revision-hash: 6798b99678
    name: node-ca
    pod-template-generation: "1"
  managedFields:
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:generateName: {}
        f:labels:
          .: {}
          f:controller-revision-hash: {}
          f:name: {}
          f:pod-template-generation: {}
        f:ownerReferences:
          .: {}
          k:{"uid":"954498b8-5ae1-4ea5-9af9-3aa30b912527"}:
            .: {}
            f:apiVersion: {}
            f:blockOwnerDeletion: {}
            f:controller: {}
            f:kind: {}
            f:name: {}
            f:uid: {}
      f:spec:
        f:affinity:
          .: {}
          f:nodeAffinity:
            .: {}
            f:requiredDuringSchedulingIgnoredDuringExecution:
              .: {}
              f:nodeSelectorTerms: {}
        f:containers:
          k:{"name":"node-ca"}:
            .: {}
            f:command: {}
            f:image: {}
            f:imagePullPolicy: {}
            f:name: {}
            f:resources:
              .: {}
              f:requests:
                .: {}
                f:cpu: {}
                f:memory: {}
            f:securityContext:
              .: {}
              f:privileged: {}
            f:terminationMessagePath: {}
            f:terminationMessagePolicy: {}
            f:volumeMounts:
              .: {}
              k:{"mountPath":"/etc/docker/certs.d"}:
                .: {}
                f:mountPath: {}
                f:name: {}
              k:{"mountPath":"/tmp/serviceca"}:
                .: {}
                f:mountPath: {}
                f:name: {}
        f:dnsPolicy: {}
        f:enableServiceLinks: {}
        f:hostNetwork: {}
        f:nodeSelector:
          .: {}
          f:kubernetes.io/os: {}
        f:priorityClassName: {}
        f:restartPolicy: {}
        f:schedulerName: {}
        f:securityContext: {}
        f:serviceAccount: {}
        f:serviceAccountName: {}
        f:terminationGracePeriodSeconds: {}
        f:tolerations: {}
        f:volumes:
          .: {}
          k:{"name":"host"}:
            .: {}
            f:hostPath:
              .: {}
              f:path: {}
              f:type: {}
            f:name: {}
          k:{"name":"serviceca"}:
            .: {}
            f:configMap:
              .: {}
              f:defaultMode: {}
              f:name: {}
            f:name: {}
    manager: kube-controller-manager
    operation: Update
    time: "2022-03-08T10:43:50Z"
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:status:
        f:conditions:
          k:{"type":"ContainersReady"}:
            .: {}
            f:lastProbeTime: {}
            f:lastTransitionTime: {}
            f:status: {}
            f:type: {}
          k:{"type":"Initialized"}:
            .: {}
            f:lastProbeTime: {}
            f:lastTransitionTime: {}
            f:status: {}
            f:type: {}
          k:{"type":"Ready"}:
            .: {}
            f:lastProbeTime: {}
            f:lastTransitionTime: {}
            f:status: {}
            f:type: {}
        f:containerStatuses: {}
        f:hostIP: {}
        f:phase: {}
        f:podIP: {}
        f:podIPs:
          .: {}
          k:{"ip":"10.0.95.76"}:
            .: {}
            f:ip: {}
        f:startTime: {}
    manager: kubelet
    operation: Update
    time: "2022-03-08T10:43:54Z"
  name: node-ca-n2hfh
  namespace: openshift-image-registry
  ownerReferences:
  - apiVersion: apps/v1
    blockOwnerDeletion: true
    controller: true
    kind: DaemonSet
    name: node-ca
    uid: 954498b8-5ae1-4ea5-9af9-3aa30b912527
  resourceVersion: "16033"
  selfLink: /api/v1/namespaces/openshift-image-registry/pods/node-ca-n2hfh
  uid: e98a5d00-94b5-4624-9b49-91c5cd2a0b49
spec:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchFields:
          - key: metadata.name
            operator: In
            values:
            - master-1.case03116926.lab.upshift.rdu2.redhat.com
  containers:
  - command:
    - /bin/sh
    - -c
    - |
      trap 'jobs -p | xargs -r kill; echo shutting down node-ca; exit 0' TERM
      while [ true ];
      do
        for f in $(ls /tmp/serviceca); do
            echo $f
            ca_file_path="/tmp/serviceca/${f}"
            f=$(echo $f | sed  -r 's/(.*)\.\./\1:/')
            reg_dir_path="/etc/docker/certs.d/${f}"
            if [ -e "${reg_dir_path}" ]; then
                cp -u $ca_file_path $reg_dir_path/ca.crt
            else
                mkdir $reg_dir_path
                cp $ca_file_path $reg_dir_path/ca.crt
            fi
        done
        for d in $(ls /etc/docker/certs.d); do
            echo $d
            dp=$(echo $d | sed  -r 's/(.*):/\1\.\./')
            reg_conf_path="/tmp/serviceca/${dp}"
            if [ ! -e "${reg_conf_path}" ]; then
                rm -rf /etc/docker/certs.d/$d
            fi
        done
        sleep 60 & wait ${!}
      done
    image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:bf3d24ef4f1e8350c5b5aaef2360121a262adf1cc088cc1c6268d8ccfe8d60d5
    imagePullPolicy: IfNotPresent
    name: node-ca
    resources:
      requests:
        cpu: 10m
        memory: 10Mi
    securityContext:
      privileged: true
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    - mountPath: /tmp/serviceca
      name: serviceca
    - mountPath: /etc/docker/certs.d
      name: host
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: node-ca-token-24h5s
      readOnly: true
  dnsPolicy: ClusterFirst
  enableServiceLinks: true
  hostNetwork: true
  imagePullSecrets:
  - name: node-ca-dockercfg-q94l2
  nodeName: master-1.case03116926.lab.upshift.rdu2.redhat.com
  nodeSelector:
    kubernetes.io/os: linux
  preemptionPolicy: PreemptLowerPriority
  priority: 2000000000
  priorityClassName: system-cluster-critical
  restartPolicy: Always
  schedulerName: default-scheduler
  securityContext: {}
  serviceAccount: node-ca
  serviceAccountName: node-ca
  terminationGracePeriodSeconds: 30
  tolerations:
  - operator: Exists
  volumes:
  - hostPath:
      path: /etc/docker/certs.d
      type: ""
    name: host
  - configMap:
      defaultMode: 420
      name: image-registry-certificates
    name: serviceca
  - name: node-ca-token-24h5s
    secret:
      defaultMode: 420
      secretName: node-ca-token-24h5s
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: "2022-03-08T10:43:50Z"
    status: "True"
    type: Initialized
  - lastProbeTime: null
    lastTransitionTime: "2022-03-08T10:43:54Z"
    status: "True"
    type: Ready
  - lastProbeTime: null
    lastTransitionTime: "2022-03-08T10:43:54Z"
    status: "True"
    type: ContainersReady
  - lastProbeTime: null
    lastTransitionTime: "2022-03-08T10:43:50Z"
    status: "True"
    type: PodScheduled
  containerStatuses:
  - containerID: cri-o://c1a23a7151d12880cf78ae6e85c47e53baeae8ce0361966763c659b2c1588b53
    image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:bf3d24ef4f1e8350c5b5aaef2360121a262adf1cc088cc1c6268d8ccfe8d60d5
    imageID: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:bf3d24ef4f1e8350c5b5aaef2360121a262adf1cc088cc1c6268d8ccfe8d60d5
    lastState: {}
    name: node-ca
    ready: true
    restartCount: 0
    started: true
    state:
      running:
        startedAt: "2022-03-08T10:43:53Z"
  hostIP: 10.0.95.76
  phase: Running
  podIP: 10.0.95.76
  podIPs:
  - ip: 10.0.95.76
  qosClass: Burstable
  startTime: "2022-03-08T10:43:50Z"
