---
apiVersion: apps/v1
items:
- apiVersion: apps/v1
  kind: DaemonSet
  metadata:
    annotations:
      deprecated.daemonset.template.generation: "1"
    creationTimestamp: "2020-05-26T14:23:29Z"
    generation: 1
    managedFields:
    - apiVersion: apps/v1
      fieldsType: FieldsV1
      fieldsV1:
        f:metadata:
          f:annotations:
            .: {}
            f:deprecated.daemonset.template.generation: {}
        f:spec:
          f:revisionHistoryLimit: {}
          f:selector:
            f:matchLabels:
              .: {}
              f:name: {}
          f:template:
            f:metadata:
              f:labels:
                .: {}
                f:name: {}
            f:spec:
              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: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: {}
          f:updateStrategy:
            f:rollingUpdate:
              .: {}
              f:maxUnavailable: {}
            f:type: {}
      manager: cluster-image-registry-operator
      operation: Update
      time: "2020-05-26T14:23:29Z"
    - apiVersion: apps/v1
      fieldsType: FieldsV1
      fieldsV1:
        f:status:
          f:currentNumberScheduled: {}
          f:desiredNumberScheduled: {}
          f:numberAvailable: {}
          f:numberReady: {}
          f:observedGeneration: {}
          f:updatedNumberScheduled: {}
      manager: kube-controller-manager
      operation: Update
      time: "2020-05-26T14:29:04Z"
    name: node-ca
    namespace: openshift-image-registry
    resourceVersion: "18050"
    selfLink: /apis/apps/v1/namespaces/openshift-image-registry/daemonsets/node-ca
    uid: 27fe1c14-ad09-41d3-855c-9db0ee64233d
  spec:
    revisionHistoryLimit: 10
    selector:
      matchLabels:
        name: node-ca
    template:
      metadata:
        creationTimestamp: null
        labels:
          name: node-ca
      spec:
        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
        dnsPolicy: ClusterFirst
        hostNetwork: true
        nodeSelector:
          kubernetes.io/os: linux
        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
    updateStrategy:
      rollingUpdate:
        maxUnavailable: 1
      type: RollingUpdate
  status:
    currentNumberScheduled: 6
    desiredNumberScheduled: 6
    numberAvailable: 6
    numberMisscheduled: 0
    numberReady: 6
    observedGeneration: 1
    updatedNumberScheduled: 6
kind: DaemonSetList
metadata:
  resourceVersion: "53584"
  selfLink: /apis/apps/v1/namespaces/openshift-image-registry/daemonsets
