---
apiVersion: v1
kind: Pod
metadata:
  annotations:
    openshift.io/scc: privileged
  creationTimestamp: "2020-05-26T09:46:25Z"
  generateName: node-ca-
  labels:
    controller-revision-hash: 67f5987967
    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":"da92d786-98b7-436d-87c5-2bf6c06c882a"}:
            .: {}
            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: "2020-05-26T09:46:25Z"
  - 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.0.3"}:
            .: {}
            f:ip: {}
        f:startTime: {}
    manager: kubelet
    operation: Update
    time: "2020-05-26T09:46:32Z"
  name: node-ca-xwf7n
  namespace: openshift-image-registry
  ownerReferences:
  - apiVersion: apps/v1
    blockOwnerDeletion: true
    controller: true
    kind: DaemonSet
    name: node-ca
    uid: da92d786-98b7-436d-87c5-2bf6c06c882a
  resourceVersion: "13316"
  selfLink: /api/v1/namespaces/openshift-image-registry/pods/node-ca-xwf7n
  uid: 018c2b62-504f-44fa-9003-8974b0122e8f
spec:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchFields:
          - key: metadata.name
            operator: In
            values:
            - skumari-gcp-wd9nd-master-0.c.openshift-gce-devel.internal
  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: registry.svc.ci.openshift.org/ci-ln-6vywnkk/stable@sha256:9b1d20844abc6561d7b9e1e193a7e2e2eb3f27eadcc489a0cf3a074e06cca87d
    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-l2h4x
      readOnly: true
  dnsPolicy: ClusterFirst
  enableServiceLinks: true
  hostNetwork: true
  imagePullSecrets:
  - name: node-ca-dockercfg-9cx4x
  nodeName: skumari-gcp-wd9nd-master-0.c.openshift-gce-devel.internal
  nodeSelector:
    kubernetes.io/os: linux
  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-l2h4x
    secret:
      defaultMode: 420
      secretName: node-ca-token-l2h4x
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: "2020-05-26T09:46:26Z"
    status: "True"
    type: Initialized
  - lastProbeTime: null
    lastTransitionTime: "2020-05-26T09:46:32Z"
    status: "True"
    type: Ready
  - lastProbeTime: null
    lastTransitionTime: "2020-05-26T09:46:32Z"
    status: "True"
    type: ContainersReady
  - lastProbeTime: null
    lastTransitionTime: "2020-05-26T09:46:26Z"
    status: "True"
    type: PodScheduled
  containerStatuses:
  - containerID: cri-o://e0eceb2a0c02d78f16f8ce9fe65398ba47295943cd199be9e71191c3b5689d40
    image: registry.svc.ci.openshift.org/ci-ln-6vywnkk/stable@sha256:9b1d20844abc6561d7b9e1e193a7e2e2eb3f27eadcc489a0cf3a074e06cca87d
    imageID: registry.svc.ci.openshift.org/ci-ln-6vywnkk/stable@sha256:9b1d20844abc6561d7b9e1e193a7e2e2eb3f27eadcc489a0cf3a074e06cca87d
    lastState: {}
    name: node-ca
    ready: true
    restartCount: 0
    started: true
    state:
      running:
        startedAt: "2020-05-26T09:46:32Z"
  hostIP: 10.0.0.3
  phase: Running
  podIP: 10.0.0.3
  podIPs:
  - ip: 10.0.0.3
  qosClass: Burstable
  startTime: "2020-05-26T09:46:26Z"
