---
apiVersion: v1
items:
- apiVersion: v1
  data:
    config.yaml: |
      {"apiVersion":"kubecontrolplane.config.openshift.io/v1","kind":"EtcdConfig"}
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:39:08Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:config.yaml: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:39:08Z"
    name: config
    namespace: openshift-etcd
    resourceVersion: "7721"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/config
    uid: 03e35add-4343-478b-84e4-cda94e8fdfe4
- apiVersion: v1
  data:
    config.yaml: |
      {"apiVersion":"kubecontrolplane.config.openshift.io/v1","kind":"EtcdConfig"}
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:39:11Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:config.yaml: {}
        f:metadata:
          f:ownerReferences:
            .: {}
            k:{"uid":"32f406cf-02cd-45a2-93cf-728006ee4ea6"}:
              .: {}
              f:apiVersion: {}
              f:kind: {}
              f:name: {}
              f:uid: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:39:11Z"
    name: config-2
    namespace: openshift-etcd
    ownerReferences:
    - apiVersion: v1
      kind: ConfigMap
      name: revision-status-2
      uid: 32f406cf-02cd-45a2-93cf-728006ee4ea6
    resourceVersion: "7875"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/config-2
    uid: 8696ee39-3641-46bf-8c48-8a15b5ecd19d
- apiVersion: v1
  data:
    config.yaml: |
      {"apiVersion":"kubecontrolplane.config.openshift.io/v1","kind":"EtcdConfig"}
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:44:10Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:config.yaml: {}
        f:metadata:
          f:ownerReferences:
            .: {}
            k:{"uid":"4bb60619-7cc8-4ada-8e7f-2c93da64c7f8"}:
              .: {}
              f:apiVersion: {}
              f:kind: {}
              f:name: {}
              f:uid: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:44:10Z"
    name: config-3
    namespace: openshift-etcd
    ownerReferences:
    - apiVersion: v1
      kind: ConfigMap
      name: revision-status-3
      uid: 4bb60619-7cc8-4ada-8e7f-2c93da64c7f8
    resourceVersion: "16374"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/config-3
    uid: 3bb9941f-a021-427b-b7f8-72b029d66c20
- apiVersion: v1
  data:
    ca-bundle.crt: |
      -----BEGIN CERTIFICATE-----
      MIIDGDCCAgCgAwIBAgIIEOB7widDiQwwDQYJKoZIhvcNAQELBQAwKjESMBAGA1UE
      CxMJb3BlbnNoaWZ0MRQwEgYDVQQDEwtldGNkLXNpZ25lcjAeFw0yMjAzMDgxMDEw
      MjRaFw0zMjAzMDUxMDEwMjRaMCoxEjAQBgNVBAsTCW9wZW5zaGlmdDEUMBIGA1UE
      AxMLZXRjZC1zaWduZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDM
      qN2MxX+ct316ZR7yiujlm3Geq2yHBaexfDkwFFV5jaD/UKG6x/oWy7oSOU3h2GQV
      EgrNUMab53XdjOFKCfDI2TOdaYxSKRtXN+9CW7P71EJ4/INXazLzSxR9YqH93ANH
      uHxbBndPKmjkcA5beU8ZbXuGpasb5QM0orIJQUBPJDGWxPFJu1WRhkebqLbOyRVL
      SiyfN5XgnM72KAQgeMbauoUfkJaVbNd9VMPxcBFf+WRoWi5ypvxZohUmiIshxHFo
      qBWRf0l8VgTEu3sf9DpDEkv1hhfIxhQRJiGkeCBB1oNwUvm90163HUcQRzOVSpbo
      uhV3dpt/5nhqiNB0zAipAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMB
      Af8EBTADAQH/MB0GA1UdDgQWBBRGHfEUBzZMHxIqd3UtuyqYBvr4KTANBgkqhkiG
      9w0BAQsFAAOCAQEAhndKtei2BpAWKsf4M/w2drHBFfEz1X1T8EiE0Chdyt+9Ko+l
      XiHLBEFxR+JJyaQcREjZLcVIqRYERX1iHaVEfiUWQgRImYR5XI25y9EQ/3CP+uFP
      wzVcERhkCIkXrvI6QT9e6nR7htMsKGtF7eiD8/RGcD2w8TrQ91kB7zSPODBgZwVp
      qWFWPR5BsnSZDdy3rcldCVlxnHOgCjLpyWbNQzW3G0j9xtTMfuS0BWNH2NcGTlBz
      qTU6hmnzR/CrHekxxrzkyrtlFOzL406/PXPDgEhbyKzgYUssAg5g0NgLJxz6rqs0
      ZAmADm4FqC1BV/afreI0oSjc2UH7Fg6FMQYulQ==
      -----END CERTIFICATE-----
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:38:47Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:ca-bundle.crt: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:38:47Z"
    name: etcd-ca-bundle
    namespace: openshift-etcd
    resourceVersion: "6055"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-ca-bundle
    uid: d935a204-f5af-4e6f-94f8-b0b0d8f062af
- apiVersion: v1
  data:
    MTAuMC45NC4xMTk: 10.0.94.119
    MTAuMC45NC4yMTk: 10.0.94.219
    MTAuMC45NS43Ng: 10.0.95.76
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:13:30Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:MTAuMC45NC4xMTk: {}
          f:MTAuMC45NC4yMTk: {}
          f:MTAuMC45NS43Ng: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:38:45Z"
    name: etcd-endpoints
    namespace: openshift-etcd
    resourceVersion: "16078"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-endpoints
    uid: da4c6175-a9f9-4b33-af73-55bf945c2a84
- apiVersion: v1
  data:
    ca-bundle.crt: |
      -----BEGIN CERTIFICATE-----
      MIIDJjCCAg6gAwIBAgIIbLRb+tJ8fDYwDQYJKoZIhvcNAQELBQAwMTESMBAGA1UE
      CxMJb3BlbnNoaWZ0MRswGQYDVQQDExJldGNkLW1ldHJpYy1zaWduZXIwHhcNMjIw
      MzA4MTAxMDI1WhcNMzIwMzA1MTAxMDI1WjAxMRIwEAYDVQQLEwlvcGVuc2hpZnQx
      GzAZBgNVBAMTEmV0Y2QtbWV0cmljLXNpZ25lcjCCASIwDQYJKoZIhvcNAQEBBQAD
      ggEPADCCAQoCggEBALxOTMpZ4e/sD6jSleQcvaeFxf3YDv37O2M8HQncQFtq9mbs
      nKiTi5HX/jxBUx6uZ7zxP0LV548WqL2rR4z2TFrqZHf5Mb0JmjgZdXbmq7oT8Iyf
      j6BOggGcyzzmPp0+IAE5/JUgugJSSVK/UA3gvkZkqsfAUiZHCvbah5ZT5hJbCLsA
      wrSxXfxhjknr6ICAWpng5MNq8MnGyM0TiM3Xug1wHM5r0eLDKGTaGMrYw/cSXn8P
      TVkGPzbRe4xY4I5HBv3w/vtA5ikaedJD7xDrrmw1qHyB7kQlkd1Xjkd4TQm+FNJl
      FBbsHcNtbCAMKvn72Z36vI2CT5aSjRFThW9UPKkCAwEAAaNCMEAwDgYDVR0PAQH/
      BAQDAgKkMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFLTJgwWBpCSsFgtwpVnb
      Krw159FrMA0GCSqGSIb3DQEBCwUAA4IBAQAIVMoO7bc7VlVXTK/MQxJRI9ORBi5g
      Wrgj7SdMm4HpSN4OhJ/Jq5MrD45uQ9GsHMZI8vq09W6uV+z4r6bSfucMCltDhDb9
      xRhpY8wmD5ekEOW0rxST/T879POlyDASmgpA9JRXXTft88SnKMsiY3izp7+NtnTq
      CNyV3U0sDVuxjdMwdwKbDyDaaHQwKDFsvkRYxxIHDmSoZ/uHZH2dyAU+9TBBRPlP
      w0cu53+2mwOSBxqtSwNcKClUHG0/fMEeMG3VCebXz2y1motq0Y2hxp2sTWTe5pFl
      hpgrlcUE1Zr42gs2pnKT9j8sT60/qnGnjR6c11x/rcf1cD5hLq3Ydj/T
      -----END CERTIFICATE-----
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:38:48Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:ca-bundle.crt: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:38:48Z"
    name: etcd-metrics-proxy-client-ca
    namespace: openshift-etcd
    resourceVersion: "6175"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-metrics-proxy-client-ca
    uid: 88a8715e-426e-4bfc-a73b-303937b89d12
- apiVersion: v1
  data:
    ca-bundle.crt: |
      -----BEGIN CERTIFICATE-----
      MIIDJjCCAg6gAwIBAgIIbLRb+tJ8fDYwDQYJKoZIhvcNAQELBQAwMTESMBAGA1UE
      CxMJb3BlbnNoaWZ0MRswGQYDVQQDExJldGNkLW1ldHJpYy1zaWduZXIwHhcNMjIw
      MzA4MTAxMDI1WhcNMzIwMzA1MTAxMDI1WjAxMRIwEAYDVQQLEwlvcGVuc2hpZnQx
      GzAZBgNVBAMTEmV0Y2QtbWV0cmljLXNpZ25lcjCCASIwDQYJKoZIhvcNAQEBBQAD
      ggEPADCCAQoCggEBALxOTMpZ4e/sD6jSleQcvaeFxf3YDv37O2M8HQncQFtq9mbs
      nKiTi5HX/jxBUx6uZ7zxP0LV548WqL2rR4z2TFrqZHf5Mb0JmjgZdXbmq7oT8Iyf
      j6BOggGcyzzmPp0+IAE5/JUgugJSSVK/UA3gvkZkqsfAUiZHCvbah5ZT5hJbCLsA
      wrSxXfxhjknr6ICAWpng5MNq8MnGyM0TiM3Xug1wHM5r0eLDKGTaGMrYw/cSXn8P
      TVkGPzbRe4xY4I5HBv3w/vtA5ikaedJD7xDrrmw1qHyB7kQlkd1Xjkd4TQm+FNJl
      FBbsHcNtbCAMKvn72Z36vI2CT5aSjRFThW9UPKkCAwEAAaNCMEAwDgYDVR0PAQH/
      BAQDAgKkMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFLTJgwWBpCSsFgtwpVnb
      Krw159FrMA0GCSqGSIb3DQEBCwUAA4IBAQAIVMoO7bc7VlVXTK/MQxJRI9ORBi5g
      Wrgj7SdMm4HpSN4OhJ/Jq5MrD45uQ9GsHMZI8vq09W6uV+z4r6bSfucMCltDhDb9
      xRhpY8wmD5ekEOW0rxST/T879POlyDASmgpA9JRXXTft88SnKMsiY3izp7+NtnTq
      CNyV3U0sDVuxjdMwdwKbDyDaaHQwKDFsvkRYxxIHDmSoZ/uHZH2dyAU+9TBBRPlP
      w0cu53+2mwOSBxqtSwNcKClUHG0/fMEeMG3VCebXz2y1motq0Y2hxp2sTWTe5pFl
      hpgrlcUE1Zr42gs2pnKT9j8sT60/qnGnjR6c11x/rcf1cD5hLq3Ydj/T
      -----END CERTIFICATE-----
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:39:14Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:ca-bundle.crt: {}
        f:metadata:
          f:ownerReferences:
            .: {}
            k:{"uid":"32f406cf-02cd-45a2-93cf-728006ee4ea6"}:
              .: {}
              f:apiVersion: {}
              f:kind: {}
              f:name: {}
              f:uid: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:39:14Z"
    name: etcd-metrics-proxy-client-ca-2
    namespace: openshift-etcd
    ownerReferences:
    - apiVersion: v1
      kind: ConfigMap
      name: revision-status-2
      uid: 32f406cf-02cd-45a2-93cf-728006ee4ea6
    resourceVersion: "8009"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-metrics-proxy-client-ca-2
    uid: c8eb0d13-30ba-4081-9dd5-5a470dad74cd
- apiVersion: v1
  data:
    ca-bundle.crt: |
      -----BEGIN CERTIFICATE-----
      MIIDJjCCAg6gAwIBAgIIbLRb+tJ8fDYwDQYJKoZIhvcNAQELBQAwMTESMBAGA1UE
      CxMJb3BlbnNoaWZ0MRswGQYDVQQDExJldGNkLW1ldHJpYy1zaWduZXIwHhcNMjIw
      MzA4MTAxMDI1WhcNMzIwMzA1MTAxMDI1WjAxMRIwEAYDVQQLEwlvcGVuc2hpZnQx
      GzAZBgNVBAMTEmV0Y2QtbWV0cmljLXNpZ25lcjCCASIwDQYJKoZIhvcNAQEBBQAD
      ggEPADCCAQoCggEBALxOTMpZ4e/sD6jSleQcvaeFxf3YDv37O2M8HQncQFtq9mbs
      nKiTi5HX/jxBUx6uZ7zxP0LV548WqL2rR4z2TFrqZHf5Mb0JmjgZdXbmq7oT8Iyf
      j6BOggGcyzzmPp0+IAE5/JUgugJSSVK/UA3gvkZkqsfAUiZHCvbah5ZT5hJbCLsA
      wrSxXfxhjknr6ICAWpng5MNq8MnGyM0TiM3Xug1wHM5r0eLDKGTaGMrYw/cSXn8P
      TVkGPzbRe4xY4I5HBv3w/vtA5ikaedJD7xDrrmw1qHyB7kQlkd1Xjkd4TQm+FNJl
      FBbsHcNtbCAMKvn72Z36vI2CT5aSjRFThW9UPKkCAwEAAaNCMEAwDgYDVR0PAQH/
      BAQDAgKkMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFLTJgwWBpCSsFgtwpVnb
      Krw159FrMA0GCSqGSIb3DQEBCwUAA4IBAQAIVMoO7bc7VlVXTK/MQxJRI9ORBi5g
      Wrgj7SdMm4HpSN4OhJ/Jq5MrD45uQ9GsHMZI8vq09W6uV+z4r6bSfucMCltDhDb9
      xRhpY8wmD5ekEOW0rxST/T879POlyDASmgpA9JRXXTft88SnKMsiY3izp7+NtnTq
      CNyV3U0sDVuxjdMwdwKbDyDaaHQwKDFsvkRYxxIHDmSoZ/uHZH2dyAU+9TBBRPlP
      w0cu53+2mwOSBxqtSwNcKClUHG0/fMEeMG3VCebXz2y1motq0Y2hxp2sTWTe5pFl
      hpgrlcUE1Zr42gs2pnKT9j8sT60/qnGnjR6c11x/rcf1cD5hLq3Ydj/T
      -----END CERTIFICATE-----
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:44:13Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:ca-bundle.crt: {}
        f:metadata:
          f:ownerReferences:
            .: {}
            k:{"uid":"4bb60619-7cc8-4ada-8e7f-2c93da64c7f8"}:
              .: {}
              f:apiVersion: {}
              f:kind: {}
              f:name: {}
              f:uid: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:44:13Z"
    name: etcd-metrics-proxy-client-ca-3
    namespace: openshift-etcd
    ownerReferences:
    - apiVersion: v1
      kind: ConfigMap
      name: revision-status-3
      uid: 4bb60619-7cc8-4ada-8e7f-2c93da64c7f8
    resourceVersion: "16476"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-metrics-proxy-client-ca-3
    uid: d7677075-381c-47f7-92c5-0aa3b2edf156
- apiVersion: v1
  data:
    ca-bundle.crt: |
      -----BEGIN CERTIFICATE-----
      MIIDJjCCAg6gAwIBAgIIbLRb+tJ8fDYwDQYJKoZIhvcNAQELBQAwMTESMBAGA1UE
      CxMJb3BlbnNoaWZ0MRswGQYDVQQDExJldGNkLW1ldHJpYy1zaWduZXIwHhcNMjIw
      MzA4MTAxMDI1WhcNMzIwMzA1MTAxMDI1WjAxMRIwEAYDVQQLEwlvcGVuc2hpZnQx
      GzAZBgNVBAMTEmV0Y2QtbWV0cmljLXNpZ25lcjCCASIwDQYJKoZIhvcNAQEBBQAD
      ggEPADCCAQoCggEBALxOTMpZ4e/sD6jSleQcvaeFxf3YDv37O2M8HQncQFtq9mbs
      nKiTi5HX/jxBUx6uZ7zxP0LV548WqL2rR4z2TFrqZHf5Mb0JmjgZdXbmq7oT8Iyf
      j6BOggGcyzzmPp0+IAE5/JUgugJSSVK/UA3gvkZkqsfAUiZHCvbah5ZT5hJbCLsA
      wrSxXfxhjknr6ICAWpng5MNq8MnGyM0TiM3Xug1wHM5r0eLDKGTaGMrYw/cSXn8P
      TVkGPzbRe4xY4I5HBv3w/vtA5ikaedJD7xDrrmw1qHyB7kQlkd1Xjkd4TQm+FNJl
      FBbsHcNtbCAMKvn72Z36vI2CT5aSjRFThW9UPKkCAwEAAaNCMEAwDgYDVR0PAQH/
      BAQDAgKkMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFLTJgwWBpCSsFgtwpVnb
      Krw159FrMA0GCSqGSIb3DQEBCwUAA4IBAQAIVMoO7bc7VlVXTK/MQxJRI9ORBi5g
      Wrgj7SdMm4HpSN4OhJ/Jq5MrD45uQ9GsHMZI8vq09W6uV+z4r6bSfucMCltDhDb9
      xRhpY8wmD5ekEOW0rxST/T879POlyDASmgpA9JRXXTft88SnKMsiY3izp7+NtnTq
      CNyV3U0sDVuxjdMwdwKbDyDaaHQwKDFsvkRYxxIHDmSoZ/uHZH2dyAU+9TBBRPlP
      w0cu53+2mwOSBxqtSwNcKClUHG0/fMEeMG3VCebXz2y1motq0Y2hxp2sTWTe5pFl
      hpgrlcUE1Zr42gs2pnKT9j8sT60/qnGnjR6c11x/rcf1cD5hLq3Ydj/T
      -----END CERTIFICATE-----
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:38:49Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:ca-bundle.crt: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:38:49Z"
    name: etcd-metrics-proxy-serving-ca
    namespace: openshift-etcd
    resourceVersion: "6265"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-metrics-proxy-serving-ca
    uid: 1745855f-e267-47ef-8945-d4850553f8ce
- apiVersion: v1
  data:
    ca-bundle.crt: |
      -----BEGIN CERTIFICATE-----
      MIIDJjCCAg6gAwIBAgIIbLRb+tJ8fDYwDQYJKoZIhvcNAQELBQAwMTESMBAGA1UE
      CxMJb3BlbnNoaWZ0MRswGQYDVQQDExJldGNkLW1ldHJpYy1zaWduZXIwHhcNMjIw
      MzA4MTAxMDI1WhcNMzIwMzA1MTAxMDI1WjAxMRIwEAYDVQQLEwlvcGVuc2hpZnQx
      GzAZBgNVBAMTEmV0Y2QtbWV0cmljLXNpZ25lcjCCASIwDQYJKoZIhvcNAQEBBQAD
      ggEPADCCAQoCggEBALxOTMpZ4e/sD6jSleQcvaeFxf3YDv37O2M8HQncQFtq9mbs
      nKiTi5HX/jxBUx6uZ7zxP0LV548WqL2rR4z2TFrqZHf5Mb0JmjgZdXbmq7oT8Iyf
      j6BOggGcyzzmPp0+IAE5/JUgugJSSVK/UA3gvkZkqsfAUiZHCvbah5ZT5hJbCLsA
      wrSxXfxhjknr6ICAWpng5MNq8MnGyM0TiM3Xug1wHM5r0eLDKGTaGMrYw/cSXn8P
      TVkGPzbRe4xY4I5HBv3w/vtA5ikaedJD7xDrrmw1qHyB7kQlkd1Xjkd4TQm+FNJl
      FBbsHcNtbCAMKvn72Z36vI2CT5aSjRFThW9UPKkCAwEAAaNCMEAwDgYDVR0PAQH/
      BAQDAgKkMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFLTJgwWBpCSsFgtwpVnb
      Krw159FrMA0GCSqGSIb3DQEBCwUAA4IBAQAIVMoO7bc7VlVXTK/MQxJRI9ORBi5g
      Wrgj7SdMm4HpSN4OhJ/Jq5MrD45uQ9GsHMZI8vq09W6uV+z4r6bSfucMCltDhDb9
      xRhpY8wmD5ekEOW0rxST/T879POlyDASmgpA9JRXXTft88SnKMsiY3izp7+NtnTq
      CNyV3U0sDVuxjdMwdwKbDyDaaHQwKDFsvkRYxxIHDmSoZ/uHZH2dyAU+9TBBRPlP
      w0cu53+2mwOSBxqtSwNcKClUHG0/fMEeMG3VCebXz2y1motq0Y2hxp2sTWTe5pFl
      hpgrlcUE1Zr42gs2pnKT9j8sT60/qnGnjR6c11x/rcf1cD5hLq3Ydj/T
      -----END CERTIFICATE-----
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:39:13Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:ca-bundle.crt: {}
        f:metadata:
          f:ownerReferences:
            .: {}
            k:{"uid":"32f406cf-02cd-45a2-93cf-728006ee4ea6"}:
              .: {}
              f:apiVersion: {}
              f:kind: {}
              f:name: {}
              f:uid: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:39:13Z"
    name: etcd-metrics-proxy-serving-ca-2
    namespace: openshift-etcd
    ownerReferences:
    - apiVersion: v1
      kind: ConfigMap
      name: revision-status-2
      uid: 32f406cf-02cd-45a2-93cf-728006ee4ea6
    resourceVersion: "7965"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-metrics-proxy-serving-ca-2
    uid: beaf621c-fcc9-4e56-8502-69d1429eb7a0
- apiVersion: v1
  data:
    ca-bundle.crt: |
      -----BEGIN CERTIFICATE-----
      MIIDJjCCAg6gAwIBAgIIbLRb+tJ8fDYwDQYJKoZIhvcNAQELBQAwMTESMBAGA1UE
      CxMJb3BlbnNoaWZ0MRswGQYDVQQDExJldGNkLW1ldHJpYy1zaWduZXIwHhcNMjIw
      MzA4MTAxMDI1WhcNMzIwMzA1MTAxMDI1WjAxMRIwEAYDVQQLEwlvcGVuc2hpZnQx
      GzAZBgNVBAMTEmV0Y2QtbWV0cmljLXNpZ25lcjCCASIwDQYJKoZIhvcNAQEBBQAD
      ggEPADCCAQoCggEBALxOTMpZ4e/sD6jSleQcvaeFxf3YDv37O2M8HQncQFtq9mbs
      nKiTi5HX/jxBUx6uZ7zxP0LV548WqL2rR4z2TFrqZHf5Mb0JmjgZdXbmq7oT8Iyf
      j6BOggGcyzzmPp0+IAE5/JUgugJSSVK/UA3gvkZkqsfAUiZHCvbah5ZT5hJbCLsA
      wrSxXfxhjknr6ICAWpng5MNq8MnGyM0TiM3Xug1wHM5r0eLDKGTaGMrYw/cSXn8P
      TVkGPzbRe4xY4I5HBv3w/vtA5ikaedJD7xDrrmw1qHyB7kQlkd1Xjkd4TQm+FNJl
      FBbsHcNtbCAMKvn72Z36vI2CT5aSjRFThW9UPKkCAwEAAaNCMEAwDgYDVR0PAQH/
      BAQDAgKkMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFLTJgwWBpCSsFgtwpVnb
      Krw159FrMA0GCSqGSIb3DQEBCwUAA4IBAQAIVMoO7bc7VlVXTK/MQxJRI9ORBi5g
      Wrgj7SdMm4HpSN4OhJ/Jq5MrD45uQ9GsHMZI8vq09W6uV+z4r6bSfucMCltDhDb9
      xRhpY8wmD5ekEOW0rxST/T879POlyDASmgpA9JRXXTft88SnKMsiY3izp7+NtnTq
      CNyV3U0sDVuxjdMwdwKbDyDaaHQwKDFsvkRYxxIHDmSoZ/uHZH2dyAU+9TBBRPlP
      w0cu53+2mwOSBxqtSwNcKClUHG0/fMEeMG3VCebXz2y1motq0Y2hxp2sTWTe5pFl
      hpgrlcUE1Zr42gs2pnKT9j8sT60/qnGnjR6c11x/rcf1cD5hLq3Ydj/T
      -----END CERTIFICATE-----
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:44:12Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:ca-bundle.crt: {}
        f:metadata:
          f:ownerReferences:
            .: {}
            k:{"uid":"4bb60619-7cc8-4ada-8e7f-2c93da64c7f8"}:
              .: {}
              f:apiVersion: {}
              f:kind: {}
              f:name: {}
              f:uid: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:44:12Z"
    name: etcd-metrics-proxy-serving-ca-3
    namespace: openshift-etcd
    ownerReferences:
    - apiVersion: v1
      kind: ConfigMap
      name: revision-status-3
      uid: 4bb60619-7cc8-4ada-8e7f-2c93da64c7f8
    resourceVersion: "16459"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-metrics-proxy-serving-ca-3
    uid: cf16ec5a-8663-479b-8106-057732614290
- apiVersion: v1
  data:
    ca-bundle.crt: |
      -----BEGIN CERTIFICATE-----
      MIIDGDCCAgCgAwIBAgIIEOB7widDiQwwDQYJKoZIhvcNAQELBQAwKjESMBAGA1UE
      CxMJb3BlbnNoaWZ0MRQwEgYDVQQDEwtldGNkLXNpZ25lcjAeFw0yMjAzMDgxMDEw
      MjRaFw0zMjAzMDUxMDEwMjRaMCoxEjAQBgNVBAsTCW9wZW5zaGlmdDEUMBIGA1UE
      AxMLZXRjZC1zaWduZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDM
      qN2MxX+ct316ZR7yiujlm3Geq2yHBaexfDkwFFV5jaD/UKG6x/oWy7oSOU3h2GQV
      EgrNUMab53XdjOFKCfDI2TOdaYxSKRtXN+9CW7P71EJ4/INXazLzSxR9YqH93ANH
      uHxbBndPKmjkcA5beU8ZbXuGpasb5QM0orIJQUBPJDGWxPFJu1WRhkebqLbOyRVL
      SiyfN5XgnM72KAQgeMbauoUfkJaVbNd9VMPxcBFf+WRoWi5ypvxZohUmiIshxHFo
      qBWRf0l8VgTEu3sf9DpDEkv1hhfIxhQRJiGkeCBB1oNwUvm90163HUcQRzOVSpbo
      uhV3dpt/5nhqiNB0zAipAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMB
      Af8EBTADAQH/MB0GA1UdDgQWBBRGHfEUBzZMHxIqd3UtuyqYBvr4KTANBgkqhkiG
      9w0BAQsFAAOCAQEAhndKtei2BpAWKsf4M/w2drHBFfEz1X1T8EiE0Chdyt+9Ko+l
      XiHLBEFxR+JJyaQcREjZLcVIqRYERX1iHaVEfiUWQgRImYR5XI25y9EQ/3CP+uFP
      wzVcERhkCIkXrvI6QT9e6nR7htMsKGtF7eiD8/RGcD2w8TrQ91kB7zSPODBgZwVp
      qWFWPR5BsnSZDdy3rcldCVlxnHOgCjLpyWbNQzW3G0j9xtTMfuS0BWNH2NcGTlBz
      qTU6hmnzR/CrHekxxrzkyrtlFOzL406/PXPDgEhbyKzgYUssAg5g0NgLJxz6rqs0
      ZAmADm4FqC1BV/afreI0oSjc2UH7Fg6FMQYulQ==
      -----END CERTIFICATE-----
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:38:48Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:ca-bundle.crt: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:38:48Z"
    name: etcd-peer-client-ca
    namespace: openshift-etcd
    resourceVersion: "6118"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-peer-client-ca
    uid: ba17ee81-0bc5-40f5-9800-ad6de9d2f244
- apiVersion: v1
  data:
    ca-bundle.crt: |
      -----BEGIN CERTIFICATE-----
      MIIDGDCCAgCgAwIBAgIIEOB7widDiQwwDQYJKoZIhvcNAQELBQAwKjESMBAGA1UE
      CxMJb3BlbnNoaWZ0MRQwEgYDVQQDEwtldGNkLXNpZ25lcjAeFw0yMjAzMDgxMDEw
      MjRaFw0zMjAzMDUxMDEwMjRaMCoxEjAQBgNVBAsTCW9wZW5zaGlmdDEUMBIGA1UE
      AxMLZXRjZC1zaWduZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDM
      qN2MxX+ct316ZR7yiujlm3Geq2yHBaexfDkwFFV5jaD/UKG6x/oWy7oSOU3h2GQV
      EgrNUMab53XdjOFKCfDI2TOdaYxSKRtXN+9CW7P71EJ4/INXazLzSxR9YqH93ANH
      uHxbBndPKmjkcA5beU8ZbXuGpasb5QM0orIJQUBPJDGWxPFJu1WRhkebqLbOyRVL
      SiyfN5XgnM72KAQgeMbauoUfkJaVbNd9VMPxcBFf+WRoWi5ypvxZohUmiIshxHFo
      qBWRf0l8VgTEu3sf9DpDEkv1hhfIxhQRJiGkeCBB1oNwUvm90163HUcQRzOVSpbo
      uhV3dpt/5nhqiNB0zAipAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMB
      Af8EBTADAQH/MB0GA1UdDgQWBBRGHfEUBzZMHxIqd3UtuyqYBvr4KTANBgkqhkiG
      9w0BAQsFAAOCAQEAhndKtei2BpAWKsf4M/w2drHBFfEz1X1T8EiE0Chdyt+9Ko+l
      XiHLBEFxR+JJyaQcREjZLcVIqRYERX1iHaVEfiUWQgRImYR5XI25y9EQ/3CP+uFP
      wzVcERhkCIkXrvI6QT9e6nR7htMsKGtF7eiD8/RGcD2w8TrQ91kB7zSPODBgZwVp
      qWFWPR5BsnSZDdy3rcldCVlxnHOgCjLpyWbNQzW3G0j9xtTMfuS0BWNH2NcGTlBz
      qTU6hmnzR/CrHekxxrzkyrtlFOzL406/PXPDgEhbyKzgYUssAg5g0NgLJxz6rqs0
      ZAmADm4FqC1BV/afreI0oSjc2UH7Fg6FMQYulQ==
      -----END CERTIFICATE-----
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:39:12Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:ca-bundle.crt: {}
        f:metadata:
          f:ownerReferences:
            .: {}
            k:{"uid":"32f406cf-02cd-45a2-93cf-728006ee4ea6"}:
              .: {}
              f:apiVersion: {}
              f:kind: {}
              f:name: {}
              f:uid: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:39:12Z"
    name: etcd-peer-client-ca-2
    namespace: openshift-etcd
    ownerReferences:
    - apiVersion: v1
      kind: ConfigMap
      name: revision-status-2
      uid: 32f406cf-02cd-45a2-93cf-728006ee4ea6
    resourceVersion: "7941"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-peer-client-ca-2
    uid: fa0e21e4-1816-46ff-800b-d7bb6a6d25e7
- apiVersion: v1
  data:
    ca-bundle.crt: |
      -----BEGIN CERTIFICATE-----
      MIIDGDCCAgCgAwIBAgIIEOB7widDiQwwDQYJKoZIhvcNAQELBQAwKjESMBAGA1UE
      CxMJb3BlbnNoaWZ0MRQwEgYDVQQDEwtldGNkLXNpZ25lcjAeFw0yMjAzMDgxMDEw
      MjRaFw0zMjAzMDUxMDEwMjRaMCoxEjAQBgNVBAsTCW9wZW5zaGlmdDEUMBIGA1UE
      AxMLZXRjZC1zaWduZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDM
      qN2MxX+ct316ZR7yiujlm3Geq2yHBaexfDkwFFV5jaD/UKG6x/oWy7oSOU3h2GQV
      EgrNUMab53XdjOFKCfDI2TOdaYxSKRtXN+9CW7P71EJ4/INXazLzSxR9YqH93ANH
      uHxbBndPKmjkcA5beU8ZbXuGpasb5QM0orIJQUBPJDGWxPFJu1WRhkebqLbOyRVL
      SiyfN5XgnM72KAQgeMbauoUfkJaVbNd9VMPxcBFf+WRoWi5ypvxZohUmiIshxHFo
      qBWRf0l8VgTEu3sf9DpDEkv1hhfIxhQRJiGkeCBB1oNwUvm90163HUcQRzOVSpbo
      uhV3dpt/5nhqiNB0zAipAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMB
      Af8EBTADAQH/MB0GA1UdDgQWBBRGHfEUBzZMHxIqd3UtuyqYBvr4KTANBgkqhkiG
      9w0BAQsFAAOCAQEAhndKtei2BpAWKsf4M/w2drHBFfEz1X1T8EiE0Chdyt+9Ko+l
      XiHLBEFxR+JJyaQcREjZLcVIqRYERX1iHaVEfiUWQgRImYR5XI25y9EQ/3CP+uFP
      wzVcERhkCIkXrvI6QT9e6nR7htMsKGtF7eiD8/RGcD2w8TrQ91kB7zSPODBgZwVp
      qWFWPR5BsnSZDdy3rcldCVlxnHOgCjLpyWbNQzW3G0j9xtTMfuS0BWNH2NcGTlBz
      qTU6hmnzR/CrHekxxrzkyrtlFOzL406/PXPDgEhbyKzgYUssAg5g0NgLJxz6rqs0
      ZAmADm4FqC1BV/afreI0oSjc2UH7Fg6FMQYulQ==
      -----END CERTIFICATE-----
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:44:12Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:ca-bundle.crt: {}
        f:metadata:
          f:ownerReferences:
            .: {}
            k:{"uid":"4bb60619-7cc8-4ada-8e7f-2c93da64c7f8"}:
              .: {}
              f:apiVersion: {}
              f:kind: {}
              f:name: {}
              f:uid: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:44:12Z"
    name: etcd-peer-client-ca-3
    namespace: openshift-etcd
    ownerReferences:
    - apiVersion: v1
      kind: ConfigMap
      name: revision-status-3
      uid: 4bb60619-7cc8-4ada-8e7f-2c93da64c7f8
    resourceVersion: "16439"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-peer-client-ca-3
    uid: ce80398b-189e-4fbe-9a08-e0211234da7a
- apiVersion: v1
  data:
    forceRedeploymentReason: ""
    pod.yaml: |+
      apiVersion: v1
      kind: Pod
      metadata:
        name: etcd
        namespace: openshift-etcd
        labels:
          app: etcd
          k8s-app: etcd
          etcd: "true"
          revision: "REVISION"
      spec:
        initContainers:
          - name: etcd-ensure-env-vars
            image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
            imagePullPolicy: IfNotPresent
            terminationMessagePolicy: FallbackToLogsOnError
            command:
              - /bin/sh
              - -c
              - |
                #!/bin/sh
                set -euo pipefail

                : "${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST?not set}"
                : "${NODE_NODE_ENVVAR_NAME_ETCD_NAME?not set}"
                : "${NODE_NODE_ENVVAR_NAME_IP?not set}"

                # check for ipv4 addresses as well as ipv6 addresses with extra square brackets
                if [[ "${NODE_NODE_ENVVAR_NAME_IP}" != "${NODE_IP}" && "${NODE_NODE_ENVVAR_NAME_IP}" != "[${NODE_IP}]" ]]; then
                  # echo the error message to stderr
                  echo "Expected node IP to be ${NODE_IP} got ${NODE_NODE_ENVVAR_NAME_IP}" >&2
                  exit 1
                fi

                # check for ipv4 addresses as well as ipv6 addresses with extra square brackets
                if [[ "${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}" != "${NODE_IP}" && "${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}" != "[${NODE_IP}]" ]]; then
                  # echo the error message to stderr
                  echo "Expected etcd url host to be ${NODE_IP} got ${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}" >&2
                  exit 1
                fi

            resources:
              requests:
                memory: 60Mi
                cpu: 30m
            securityContext:
              privileged: true
            env:
            - name: "ALL_ETCD_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_API"
              value: "3"
            - name: "ETCDCTL_CACERT"
              value: "/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
            - name: "ETCDCTL_CERT"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
            - name: "ETCDCTL_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_KEY"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
            - name: "ETCD_CIPHER_SUITES"
              value: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
            - name: "ETCD_DATA_DIR"
              value: "/var/lib/etcd"
            - name: "ETCD_ELECTION_TIMEOUT"
              value: "1000"
            - name: "ETCD_ENABLE_PPROF"
              value: "true"
            - name: "ETCD_HEARTBEAT_INTERVAL"
              value: "100"
            - name: "ETCD_IMAGE"
              value: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
            - name: "ETCD_INITIAL_CLUSTER_STATE"
              value: "existing"
            - name: "ETCD_QUOTA_BACKEND_BYTES"
              value: "7516192768"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-0.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.119"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.119"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-1.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.95.76"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.95.76"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-2.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.219"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.219"
            - name: NODE_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
          - name: etcd-resources-copy
            image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
            imagePullPolicy: IfNotPresent
            terminationMessagePolicy: FallbackToLogsOnError
            command:
              - /bin/sh
              - -c
              - |
                #!/bin/sh
                set -euo pipefail

                cp /etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt /etc/kubernetes/etcd-backup-dir/system:etcd-peer-NODE_NAME.crt
                cp /etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key /etc/kubernetes/etcd-backup-dir/system:etcd-peer-NODE_NAME.key
                rm -f $(grep -l '^### Created by cluster-etcd-operator' /usr/local/bin/*)
                cp -p /etc/kubernetes/static-pod-certs/configmaps/etcd-scripts/*.sh /usr/local/bin

            resources:
              requests:
                memory: 60Mi
                cpu: 30m
            securityContext:
              privileged: true
            volumeMounts:
              - mountPath: /etc/kubernetes/etcd-backup-dir
                name: etcd-backup-dir
              - mountPath: /etc/kubernetes/static-pod-resources
                name: resource-dir
              - mountPath: /etc/kubernetes/static-pod-certs
                name: cert-dir
              - mountPath: /usr/local/bin
                name: usr-local-bin
        containers:
        # The etcdctl container should always be first. It is intended to be used
        # to open a remote shell via `oc rsh` that is ready to run `etcdctl`.
        - name: etcdctl
          image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
          imagePullPolicy: IfNotPresent
          terminationMessagePolicy: FallbackToLogsOnError
          command:
            - "/bin/bash"
            - "-c"
            - "trap TERM INT; sleep infinity & wait"
          resources:
            requests:
              memory: 60Mi
              cpu: 30m
          volumeMounts:
            - mountPath: /etc/kubernetes/manifests
              name: static-pod-dir
            - mountPath: /etc/kubernetes/etcd-backup-dir
              name: etcd-backup-dir
            - mountPath: /etc/kubernetes/static-pod-resources
              name: resource-dir
            - mountPath: /etc/kubernetes/static-pod-certs
              name: cert-dir
            - mountPath: /var/lib/etcd/
              name: data-dir
          env:
            - name: "ALL_ETCD_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_API"
              value: "3"
            - name: "ETCDCTL_CACERT"
              value: "/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
            - name: "ETCDCTL_CERT"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
            - name: "ETCDCTL_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_KEY"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
            - name: "ETCD_CIPHER_SUITES"
              value: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
            - name: "ETCD_DATA_DIR"
              value: "/var/lib/etcd"
            - name: "ETCD_ELECTION_TIMEOUT"
              value: "1000"
            - name: "ETCD_ENABLE_PPROF"
              value: "true"
            - name: "ETCD_HEARTBEAT_INTERVAL"
              value: "100"
            - name: "ETCD_IMAGE"
              value: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
            - name: "ETCD_INITIAL_CLUSTER_STATE"
              value: "existing"
            - name: "ETCD_QUOTA_BACKEND_BYTES"
              value: "7516192768"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-0.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.119"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.119"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-1.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.95.76"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.95.76"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-2.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.219"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.219"
        - name: etcd
          image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
          imagePullPolicy: IfNotPresent
          terminationMessagePolicy: FallbackToLogsOnError
          command:
            - /bin/sh
            - -c
            - |
              #!/bin/sh
              set -euo pipefail

              etcdctl member list || true

              # this has a non-zero return code if the command is non-zero.  If you use an export first, it doesn't and you
              # will succeed when you should fail.
              ETCD_INITIAL_CLUSTER=$(discover-etcd-initial-cluster \
                --cacert=/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt \
                --cert=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt \
                --key=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key \
                --endpoints=${ALL_ETCD_ENDPOINTS} \
                --data-dir=/var/lib/etcd \
                --target-peer-url-host=${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST} \
                --target-name=NODE_NAME)
               export ETCD_INITIAL_CLUSTER

              # at this point we know this member is added.  To support a transition, we must remove the old etcd pod.
              # move it somewhere safe so we can retrieve it again later if something goes badly.
              mv /etc/kubernetes/manifests/etcd-member.yaml /etc/kubernetes/etcd-backup-dir || true

              # we cannot use the "normal" port conflict initcontainer because when we upgrade, the existing static pod will never yield,
              # so we do the detection in etcd container itsefl.
              echo -n "Waiting for ports 2379, 2380 and 9978 to be released."
              while [ -n "$(ss -Htan '( sport = 2379 or sport = 2380 or sport = 9978 )')" ]; do
                echo -n "."
                sleep 1
              done

              export ETCD_NAME=${NODE_NODE_ENVVAR_NAME_ETCD_NAME}
              env | grep ETCD | grep -v NODE

              set -x
              # See https://etcd.io/docs/v3.4.0/tuning/ for why we use ionice
              exec ionice -c2 -n0 etcd \
                --initial-advertise-peer-urls=https://${NODE_NODE_ENVVAR_NAME_IP}:2380 \
                --cert-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-NODE_NAME.crt \
                --key-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-NODE_NAME.key \
                --trusted-ca-file=/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt \
                --client-cert-auth=true \
                --peer-cert-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt \
                --peer-key-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key \
                --peer-trusted-ca-file=/etc/kubernetes/static-pod-certs/configmaps/etcd-peer-client-ca/ca-bundle.crt \
                --peer-client-cert-auth=true \
                --advertise-client-urls=https://${NODE_NODE_ENVVAR_NAME_IP}:2379 \
                --listen-client-urls=https://0.0.0.0:2379 \
                --listen-peer-urls=https://0.0.0.0:2380 \
                --listen-metrics-urls=https://0.0.0.0:9978 ||  mv /etc/kubernetes/etcd-backup-dir/etcd-member.yaml /etc/kubernetes/manifests
          env:
            - name: "ALL_ETCD_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_API"
              value: "3"
            - name: "ETCDCTL_CACERT"
              value: "/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
            - name: "ETCDCTL_CERT"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
            - name: "ETCDCTL_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_KEY"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
            - name: "ETCD_CIPHER_SUITES"
              value: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
            - name: "ETCD_DATA_DIR"
              value: "/var/lib/etcd"
            - name: "ETCD_ELECTION_TIMEOUT"
              value: "1000"
            - name: "ETCD_ENABLE_PPROF"
              value: "true"
            - name: "ETCD_HEARTBEAT_INTERVAL"
              value: "100"
            - name: "ETCD_IMAGE"
              value: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
            - name: "ETCD_INITIAL_CLUSTER_STATE"
              value: "existing"
            - name: "ETCD_QUOTA_BACKEND_BYTES"
              value: "7516192768"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-0.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.119"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.119"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-1.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.95.76"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.95.76"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-2.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.219"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.219"
          resources:
            requests:
              memory: 600Mi
              cpu: 300m
          readinessProbe:
            tcpSocket:
              port: 2380
            failureThreshold: 3
            initialDelaySeconds: 3
            periodSeconds: 5
            successThreshold: 1
            timeoutSeconds: 5
          securityContext:
            privileged: true
          volumeMounts:
            - mountPath: /etc/kubernetes/manifests
              name: static-pod-dir
            - mountPath: /etc/kubernetes/etcd-backup-dir
              name: etcd-backup-dir
            - mountPath: /etc/kubernetes/static-pod-resources
              name: resource-dir
            - mountPath: /etc/kubernetes/static-pod-certs
              name: cert-dir
            - mountPath: /var/lib/etcd/
              name: data-dir
        - name: etcd-metrics
          image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
          imagePullPolicy: IfNotPresent
          terminationMessagePolicy: FallbackToLogsOnError
          command:
            - /bin/sh
            - -c
            - |
              #!/bin/sh
              set -euo pipefail

              export ETCD_NAME=${NODE_NODE_ENVVAR_NAME_ETCD_NAME}

              exec etcd grpc-proxy start \
                --endpoints https://${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}:9978 \
                --metrics-addr https://0.0.0.0:9979 \
                --listen-addr 127.0.0.1:9977 \
                --key /etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key \
                --key-file /etc/kubernetes/static-pod-certs/secrets/etcd-all-serving-metrics/etcd-serving-metrics-NODE_NAME.key \
                --cert /etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt \
                --cert-file /etc/kubernetes/static-pod-certs/secrets/etcd-all-serving-metrics/etcd-serving-metrics-NODE_NAME.crt \
                --cacert /etc/kubernetes/static-pod-certs/configmaps/etcd-peer-client-ca/ca-bundle.crt \
                --trusted-ca-file /etc/kubernetes/static-pod-certs/configmaps/etcd-metrics-proxy-serving-ca/ca-bundle.crt
          env:
            - name: "ALL_ETCD_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_API"
              value: "3"
            - name: "ETCDCTL_CACERT"
              value: "/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
            - name: "ETCDCTL_CERT"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
            - name: "ETCDCTL_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_KEY"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
            - name: "ETCD_CIPHER_SUITES"
              value: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
            - name: "ETCD_DATA_DIR"
              value: "/var/lib/etcd"
            - name: "ETCD_ELECTION_TIMEOUT"
              value: "1000"
            - name: "ETCD_ENABLE_PPROF"
              value: "true"
            - name: "ETCD_HEARTBEAT_INTERVAL"
              value: "100"
            - name: "ETCD_IMAGE"
              value: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
            - name: "ETCD_INITIAL_CLUSTER_STATE"
              value: "existing"
            - name: "ETCD_QUOTA_BACKEND_BYTES"
              value: "7516192768"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-0.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.119"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.119"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-1.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.95.76"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.95.76"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-2.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.219"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.219"
          resources:
            requests:
              memory: 200Mi
              cpu: 100m
          securityContext:
            privileged: true
          volumeMounts:
            - mountPath: /etc/kubernetes/static-pod-resources
              name: resource-dir
            - mountPath: /etc/kubernetes/static-pod-certs
              name: cert-dir
            - mountPath: /var/lib/etcd/
              name: data-dir
        hostNetwork: true
        priorityClassName: system-node-critical
        tolerations:
        - operator: "Exists"
        volumes:
          - hostPath:
              path: /etc/kubernetes/manifests
            name: static-pod-dir
          - hostPath:
              path: /etc/kubernetes/static-pod-resources/etcd-member
            name: etcd-backup-dir
          - hostPath:
              path: /etc/kubernetes/static-pod-resources/etcd-pod-REVISION
            name: resource-dir
          - hostPath:
              path: /etc/kubernetes/static-pod-resources/etcd-certs
            name: cert-dir
          - hostPath:
              path: /var/lib/etcd
              type: ""
            name: data-dir
          - hostPath:
              path: /usr/local/bin
            name: usr-local-bin

    version: v0.0.0-alpha.0-603-g6a3f3b50
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:39:09Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:forceRedeploymentReason: {}
          f:pod.yaml: {}
          f:version: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:39:09Z"
    name: etcd-pod
    namespace: openshift-etcd
    resourceVersion: "16245"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-pod
    uid: b6251fa4-0b55-4eff-a31f-13f4228264b4
- apiVersion: v1
  data:
    forceRedeploymentReason: ""
    pod.yaml: |+
      apiVersion: v1
      kind: Pod
      metadata:
        name: etcd
        namespace: openshift-etcd
        labels:
          app: etcd
          k8s-app: etcd
          etcd: "true"
          revision: "REVISION"
      spec:
        initContainers:
          - name: etcd-ensure-env-vars
            image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
            imagePullPolicy: IfNotPresent
            terminationMessagePolicy: FallbackToLogsOnError
            command:
              - /bin/sh
              - -c
              - |
                #!/bin/sh
                set -euo pipefail

                : "${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST?not set}"
                : "${NODE_NODE_ENVVAR_NAME_ETCD_NAME?not set}"
                : "${NODE_NODE_ENVVAR_NAME_IP?not set}"

                # check for ipv4 addresses as well as ipv6 addresses with extra square brackets
                if [[ "${NODE_NODE_ENVVAR_NAME_IP}" != "${NODE_IP}" && "${NODE_NODE_ENVVAR_NAME_IP}" != "[${NODE_IP}]" ]]; then
                  # echo the error message to stderr
                  echo "Expected node IP to be ${NODE_IP} got ${NODE_NODE_ENVVAR_NAME_IP}" >&2
                  exit 1
                fi

                # check for ipv4 addresses as well as ipv6 addresses with extra square brackets
                if [[ "${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}" != "${NODE_IP}" && "${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}" != "[${NODE_IP}]" ]]; then
                  # echo the error message to stderr
                  echo "Expected etcd url host to be ${NODE_IP} got ${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}" >&2
                  exit 1
                fi

            resources:
              requests:
                memory: 60Mi
                cpu: 30m
            securityContext:
              privileged: true
            env:
            - name: "ALL_ETCD_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379,https://10.0.89.186:2379"
            - name: "ETCDCTL_API"
              value: "3"
            - name: "ETCDCTL_CACERT"
              value: "/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
            - name: "ETCDCTL_CERT"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
            - name: "ETCDCTL_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_KEY"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
            - name: "ETCD_CIPHER_SUITES"
              value: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
            - name: "ETCD_DATA_DIR"
              value: "/var/lib/etcd"
            - name: "ETCD_ELECTION_TIMEOUT"
              value: "1000"
            - name: "ETCD_ENABLE_PPROF"
              value: "true"
            - name: "ETCD_HEARTBEAT_INTERVAL"
              value: "100"
            - name: "ETCD_IMAGE"
              value: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
            - name: "ETCD_INITIAL_CLUSTER_STATE"
              value: "existing"
            - name: "ETCD_QUOTA_BACKEND_BYTES"
              value: "7516192768"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-0.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.119"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.119"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-1.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.95.76"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.95.76"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-2.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.219"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.219"
            - name: NODE_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
          - name: etcd-resources-copy
            image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
            imagePullPolicy: IfNotPresent
            terminationMessagePolicy: FallbackToLogsOnError
            command:
              - /bin/sh
              - -c
              - |
                #!/bin/sh
                set -euo pipefail

                cp /etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt /etc/kubernetes/etcd-backup-dir/system:etcd-peer-NODE_NAME.crt
                cp /etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key /etc/kubernetes/etcd-backup-dir/system:etcd-peer-NODE_NAME.key
                rm -f $(grep -l '^### Created by cluster-etcd-operator' /usr/local/bin/*)
                cp -p /etc/kubernetes/static-pod-certs/configmaps/etcd-scripts/*.sh /usr/local/bin

            resources:
              requests:
                memory: 60Mi
                cpu: 30m
            securityContext:
              privileged: true
            volumeMounts:
              - mountPath: /etc/kubernetes/etcd-backup-dir
                name: etcd-backup-dir
              - mountPath: /etc/kubernetes/static-pod-resources
                name: resource-dir
              - mountPath: /etc/kubernetes/static-pod-certs
                name: cert-dir
              - mountPath: /usr/local/bin
                name: usr-local-bin
        containers:
        # The etcdctl container should always be first. It is intended to be used
        # to open a remote shell via `oc rsh` that is ready to run `etcdctl`.
        - name: etcdctl
          image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
          imagePullPolicy: IfNotPresent
          terminationMessagePolicy: FallbackToLogsOnError
          command:
            - "/bin/bash"
            - "-c"
            - "trap TERM INT; sleep infinity & wait"
          resources:
            requests:
              memory: 60Mi
              cpu: 30m
          volumeMounts:
            - mountPath: /etc/kubernetes/manifests
              name: static-pod-dir
            - mountPath: /etc/kubernetes/etcd-backup-dir
              name: etcd-backup-dir
            - mountPath: /etc/kubernetes/static-pod-resources
              name: resource-dir
            - mountPath: /etc/kubernetes/static-pod-certs
              name: cert-dir
            - mountPath: /var/lib/etcd/
              name: data-dir
          env:
            - name: "ALL_ETCD_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379,https://10.0.89.186:2379"
            - name: "ETCDCTL_API"
              value: "3"
            - name: "ETCDCTL_CACERT"
              value: "/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
            - name: "ETCDCTL_CERT"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
            - name: "ETCDCTL_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_KEY"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
            - name: "ETCD_CIPHER_SUITES"
              value: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
            - name: "ETCD_DATA_DIR"
              value: "/var/lib/etcd"
            - name: "ETCD_ELECTION_TIMEOUT"
              value: "1000"
            - name: "ETCD_ENABLE_PPROF"
              value: "true"
            - name: "ETCD_HEARTBEAT_INTERVAL"
              value: "100"
            - name: "ETCD_IMAGE"
              value: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
            - name: "ETCD_INITIAL_CLUSTER_STATE"
              value: "existing"
            - name: "ETCD_QUOTA_BACKEND_BYTES"
              value: "7516192768"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-0.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.119"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.119"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-1.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.95.76"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.95.76"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-2.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.219"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.219"
        - name: etcd
          image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
          imagePullPolicy: IfNotPresent
          terminationMessagePolicy: FallbackToLogsOnError
          command:
            - /bin/sh
            - -c
            - |
              #!/bin/sh
              set -euo pipefail

              etcdctl member list || true

              # this has a non-zero return code if the command is non-zero.  If you use an export first, it doesn't and you
              # will succeed when you should fail.
              ETCD_INITIAL_CLUSTER=$(discover-etcd-initial-cluster \
                --cacert=/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt \
                --cert=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt \
                --key=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key \
                --endpoints=${ALL_ETCD_ENDPOINTS} \
                --data-dir=/var/lib/etcd \
                --target-peer-url-host=${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST} \
                --target-name=NODE_NAME)
               export ETCD_INITIAL_CLUSTER

              # at this point we know this member is added.  To support a transition, we must remove the old etcd pod.
              # move it somewhere safe so we can retrieve it again later if something goes badly.
              mv /etc/kubernetes/manifests/etcd-member.yaml /etc/kubernetes/etcd-backup-dir || true

              # we cannot use the "normal" port conflict initcontainer because when we upgrade, the existing static pod will never yield,
              # so we do the detection in etcd container itsefl.
              echo -n "Waiting for ports 2379, 2380 and 9978 to be released."
              while [ -n "$(ss -Htan '( sport = 2379 or sport = 2380 or sport = 9978 )')" ]; do
                echo -n "."
                sleep 1
              done

              export ETCD_NAME=${NODE_NODE_ENVVAR_NAME_ETCD_NAME}
              env | grep ETCD | grep -v NODE

              set -x
              # See https://etcd.io/docs/v3.4.0/tuning/ for why we use ionice
              exec ionice -c2 -n0 etcd \
                --initial-advertise-peer-urls=https://${NODE_NODE_ENVVAR_NAME_IP}:2380 \
                --cert-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-NODE_NAME.crt \
                --key-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-NODE_NAME.key \
                --trusted-ca-file=/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt \
                --client-cert-auth=true \
                --peer-cert-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt \
                --peer-key-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key \
                --peer-trusted-ca-file=/etc/kubernetes/static-pod-certs/configmaps/etcd-peer-client-ca/ca-bundle.crt \
                --peer-client-cert-auth=true \
                --advertise-client-urls=https://${NODE_NODE_ENVVAR_NAME_IP}:2379 \
                --listen-client-urls=https://0.0.0.0:2379 \
                --listen-peer-urls=https://0.0.0.0:2380 \
                --listen-metrics-urls=https://0.0.0.0:9978 ||  mv /etc/kubernetes/etcd-backup-dir/etcd-member.yaml /etc/kubernetes/manifests
          env:
            - name: "ALL_ETCD_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379,https://10.0.89.186:2379"
            - name: "ETCDCTL_API"
              value: "3"
            - name: "ETCDCTL_CACERT"
              value: "/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
            - name: "ETCDCTL_CERT"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
            - name: "ETCDCTL_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_KEY"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
            - name: "ETCD_CIPHER_SUITES"
              value: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
            - name: "ETCD_DATA_DIR"
              value: "/var/lib/etcd"
            - name: "ETCD_ELECTION_TIMEOUT"
              value: "1000"
            - name: "ETCD_ENABLE_PPROF"
              value: "true"
            - name: "ETCD_HEARTBEAT_INTERVAL"
              value: "100"
            - name: "ETCD_IMAGE"
              value: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
            - name: "ETCD_INITIAL_CLUSTER_STATE"
              value: "existing"
            - name: "ETCD_QUOTA_BACKEND_BYTES"
              value: "7516192768"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-0.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.119"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.119"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-1.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.95.76"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.95.76"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-2.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.219"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.219"
          resources:
            requests:
              memory: 600Mi
              cpu: 300m
          readinessProbe:
            tcpSocket:
              port: 2380
            failureThreshold: 3
            initialDelaySeconds: 3
            periodSeconds: 5
            successThreshold: 1
            timeoutSeconds: 5
          securityContext:
            privileged: true
          volumeMounts:
            - mountPath: /etc/kubernetes/manifests
              name: static-pod-dir
            - mountPath: /etc/kubernetes/etcd-backup-dir
              name: etcd-backup-dir
            - mountPath: /etc/kubernetes/static-pod-resources
              name: resource-dir
            - mountPath: /etc/kubernetes/static-pod-certs
              name: cert-dir
            - mountPath: /var/lib/etcd/
              name: data-dir
        - name: etcd-metrics
          image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
          imagePullPolicy: IfNotPresent
          terminationMessagePolicy: FallbackToLogsOnError
          command:
            - /bin/sh
            - -c
            - |
              #!/bin/sh
              set -euo pipefail

              export ETCD_NAME=${NODE_NODE_ENVVAR_NAME_ETCD_NAME}

              exec etcd grpc-proxy start \
                --endpoints https://${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}:9978 \
                --metrics-addr https://0.0.0.0:9979 \
                --listen-addr 127.0.0.1:9977 \
                --key /etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key \
                --key-file /etc/kubernetes/static-pod-certs/secrets/etcd-all-serving-metrics/etcd-serving-metrics-NODE_NAME.key \
                --cert /etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt \
                --cert-file /etc/kubernetes/static-pod-certs/secrets/etcd-all-serving-metrics/etcd-serving-metrics-NODE_NAME.crt \
                --cacert /etc/kubernetes/static-pod-certs/configmaps/etcd-peer-client-ca/ca-bundle.crt \
                --trusted-ca-file /etc/kubernetes/static-pod-certs/configmaps/etcd-metrics-proxy-serving-ca/ca-bundle.crt
          env:
            - name: "ALL_ETCD_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379,https://10.0.89.186:2379"
            - name: "ETCDCTL_API"
              value: "3"
            - name: "ETCDCTL_CACERT"
              value: "/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
            - name: "ETCDCTL_CERT"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
            - name: "ETCDCTL_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_KEY"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
            - name: "ETCD_CIPHER_SUITES"
              value: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
            - name: "ETCD_DATA_DIR"
              value: "/var/lib/etcd"
            - name: "ETCD_ELECTION_TIMEOUT"
              value: "1000"
            - name: "ETCD_ENABLE_PPROF"
              value: "true"
            - name: "ETCD_HEARTBEAT_INTERVAL"
              value: "100"
            - name: "ETCD_IMAGE"
              value: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
            - name: "ETCD_INITIAL_CLUSTER_STATE"
              value: "existing"
            - name: "ETCD_QUOTA_BACKEND_BYTES"
              value: "7516192768"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-0.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.119"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.119"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-1.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.95.76"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.95.76"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-2.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.219"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.219"
          resources:
            requests:
              memory: 200Mi
              cpu: 100m
          securityContext:
            privileged: true
          volumeMounts:
            - mountPath: /etc/kubernetes/static-pod-resources
              name: resource-dir
            - mountPath: /etc/kubernetes/static-pod-certs
              name: cert-dir
            - mountPath: /var/lib/etcd/
              name: data-dir
        hostNetwork: true
        priorityClassName: system-node-critical
        tolerations:
        - operator: "Exists"
        volumes:
          - hostPath:
              path: /etc/kubernetes/manifests
            name: static-pod-dir
          - hostPath:
              path: /etc/kubernetes/static-pod-resources/etcd-member
            name: etcd-backup-dir
          - hostPath:
              path: /etc/kubernetes/static-pod-resources/etcd-pod-REVISION
            name: resource-dir
          - hostPath:
              path: /etc/kubernetes/static-pod-resources/etcd-certs
            name: cert-dir
          - hostPath:
              path: /var/lib/etcd
              type: ""
            name: data-dir
          - hostPath:
              path: /usr/local/bin
            name: usr-local-bin

    version: v0.0.0-alpha.0-603-g6a3f3b50
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:39:10Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:forceRedeploymentReason: {}
          f:pod.yaml: {}
          f:version: {}
        f:metadata:
          f:ownerReferences:
            .: {}
            k:{"uid":"32f406cf-02cd-45a2-93cf-728006ee4ea6"}:
              .: {}
              f:apiVersion: {}
              f:kind: {}
              f:name: {}
              f:uid: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:39:10Z"
    name: etcd-pod-2
    namespace: openshift-etcd
    ownerReferences:
    - apiVersion: v1
      kind: ConfigMap
      name: revision-status-2
      uid: 32f406cf-02cd-45a2-93cf-728006ee4ea6
    resourceVersion: "7838"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-pod-2
    uid: 49e3871a-c433-4dfd-8a8f-0902dde139c5
- apiVersion: v1
  data:
    forceRedeploymentReason: ""
    pod.yaml: |+
      apiVersion: v1
      kind: Pod
      metadata:
        name: etcd
        namespace: openshift-etcd
        labels:
          app: etcd
          k8s-app: etcd
          etcd: "true"
          revision: "REVISION"
      spec:
        initContainers:
          - name: etcd-ensure-env-vars
            image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
            imagePullPolicy: IfNotPresent
            terminationMessagePolicy: FallbackToLogsOnError
            command:
              - /bin/sh
              - -c
              - |
                #!/bin/sh
                set -euo pipefail

                : "${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST?not set}"
                : "${NODE_NODE_ENVVAR_NAME_ETCD_NAME?not set}"
                : "${NODE_NODE_ENVVAR_NAME_IP?not set}"

                # check for ipv4 addresses as well as ipv6 addresses with extra square brackets
                if [[ "${NODE_NODE_ENVVAR_NAME_IP}" != "${NODE_IP}" && "${NODE_NODE_ENVVAR_NAME_IP}" != "[${NODE_IP}]" ]]; then
                  # echo the error message to stderr
                  echo "Expected node IP to be ${NODE_IP} got ${NODE_NODE_ENVVAR_NAME_IP}" >&2
                  exit 1
                fi

                # check for ipv4 addresses as well as ipv6 addresses with extra square brackets
                if [[ "${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}" != "${NODE_IP}" && "${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}" != "[${NODE_IP}]" ]]; then
                  # echo the error message to stderr
                  echo "Expected etcd url host to be ${NODE_IP} got ${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}" >&2
                  exit 1
                fi

            resources:
              requests:
                memory: 60Mi
                cpu: 30m
            securityContext:
              privileged: true
            env:
            - name: "ALL_ETCD_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_API"
              value: "3"
            - name: "ETCDCTL_CACERT"
              value: "/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
            - name: "ETCDCTL_CERT"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
            - name: "ETCDCTL_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_KEY"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
            - name: "ETCD_CIPHER_SUITES"
              value: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
            - name: "ETCD_DATA_DIR"
              value: "/var/lib/etcd"
            - name: "ETCD_ELECTION_TIMEOUT"
              value: "1000"
            - name: "ETCD_ENABLE_PPROF"
              value: "true"
            - name: "ETCD_HEARTBEAT_INTERVAL"
              value: "100"
            - name: "ETCD_IMAGE"
              value: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
            - name: "ETCD_INITIAL_CLUSTER_STATE"
              value: "existing"
            - name: "ETCD_QUOTA_BACKEND_BYTES"
              value: "7516192768"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-0.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.119"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.119"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-1.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.95.76"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.95.76"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-2.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.219"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.219"
            - name: NODE_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
          - name: etcd-resources-copy
            image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
            imagePullPolicy: IfNotPresent
            terminationMessagePolicy: FallbackToLogsOnError
            command:
              - /bin/sh
              - -c
              - |
                #!/bin/sh
                set -euo pipefail

                cp /etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt /etc/kubernetes/etcd-backup-dir/system:etcd-peer-NODE_NAME.crt
                cp /etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key /etc/kubernetes/etcd-backup-dir/system:etcd-peer-NODE_NAME.key
                rm -f $(grep -l '^### Created by cluster-etcd-operator' /usr/local/bin/*)
                cp -p /etc/kubernetes/static-pod-certs/configmaps/etcd-scripts/*.sh /usr/local/bin

            resources:
              requests:
                memory: 60Mi
                cpu: 30m
            securityContext:
              privileged: true
            volumeMounts:
              - mountPath: /etc/kubernetes/etcd-backup-dir
                name: etcd-backup-dir
              - mountPath: /etc/kubernetes/static-pod-resources
                name: resource-dir
              - mountPath: /etc/kubernetes/static-pod-certs
                name: cert-dir
              - mountPath: /usr/local/bin
                name: usr-local-bin
        containers:
        # The etcdctl container should always be first. It is intended to be used
        # to open a remote shell via `oc rsh` that is ready to run `etcdctl`.
        - name: etcdctl
          image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
          imagePullPolicy: IfNotPresent
          terminationMessagePolicy: FallbackToLogsOnError
          command:
            - "/bin/bash"
            - "-c"
            - "trap TERM INT; sleep infinity & wait"
          resources:
            requests:
              memory: 60Mi
              cpu: 30m
          volumeMounts:
            - mountPath: /etc/kubernetes/manifests
              name: static-pod-dir
            - mountPath: /etc/kubernetes/etcd-backup-dir
              name: etcd-backup-dir
            - mountPath: /etc/kubernetes/static-pod-resources
              name: resource-dir
            - mountPath: /etc/kubernetes/static-pod-certs
              name: cert-dir
            - mountPath: /var/lib/etcd/
              name: data-dir
          env:
            - name: "ALL_ETCD_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_API"
              value: "3"
            - name: "ETCDCTL_CACERT"
              value: "/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
            - name: "ETCDCTL_CERT"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
            - name: "ETCDCTL_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_KEY"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
            - name: "ETCD_CIPHER_SUITES"
              value: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
            - name: "ETCD_DATA_DIR"
              value: "/var/lib/etcd"
            - name: "ETCD_ELECTION_TIMEOUT"
              value: "1000"
            - name: "ETCD_ENABLE_PPROF"
              value: "true"
            - name: "ETCD_HEARTBEAT_INTERVAL"
              value: "100"
            - name: "ETCD_IMAGE"
              value: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
            - name: "ETCD_INITIAL_CLUSTER_STATE"
              value: "existing"
            - name: "ETCD_QUOTA_BACKEND_BYTES"
              value: "7516192768"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-0.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.119"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.119"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-1.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.95.76"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.95.76"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-2.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.219"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.219"
        - name: etcd
          image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
          imagePullPolicy: IfNotPresent
          terminationMessagePolicy: FallbackToLogsOnError
          command:
            - /bin/sh
            - -c
            - |
              #!/bin/sh
              set -euo pipefail

              etcdctl member list || true

              # this has a non-zero return code if the command is non-zero.  If you use an export first, it doesn't and you
              # will succeed when you should fail.
              ETCD_INITIAL_CLUSTER=$(discover-etcd-initial-cluster \
                --cacert=/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt \
                --cert=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt \
                --key=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key \
                --endpoints=${ALL_ETCD_ENDPOINTS} \
                --data-dir=/var/lib/etcd \
                --target-peer-url-host=${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST} \
                --target-name=NODE_NAME)
               export ETCD_INITIAL_CLUSTER

              # at this point we know this member is added.  To support a transition, we must remove the old etcd pod.
              # move it somewhere safe so we can retrieve it again later if something goes badly.
              mv /etc/kubernetes/manifests/etcd-member.yaml /etc/kubernetes/etcd-backup-dir || true

              # we cannot use the "normal" port conflict initcontainer because when we upgrade, the existing static pod will never yield,
              # so we do the detection in etcd container itsefl.
              echo -n "Waiting for ports 2379, 2380 and 9978 to be released."
              while [ -n "$(ss -Htan '( sport = 2379 or sport = 2380 or sport = 9978 )')" ]; do
                echo -n "."
                sleep 1
              done

              export ETCD_NAME=${NODE_NODE_ENVVAR_NAME_ETCD_NAME}
              env | grep ETCD | grep -v NODE

              set -x
              # See https://etcd.io/docs/v3.4.0/tuning/ for why we use ionice
              exec ionice -c2 -n0 etcd \
                --initial-advertise-peer-urls=https://${NODE_NODE_ENVVAR_NAME_IP}:2380 \
                --cert-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-NODE_NAME.crt \
                --key-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-NODE_NAME.key \
                --trusted-ca-file=/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt \
                --client-cert-auth=true \
                --peer-cert-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt \
                --peer-key-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key \
                --peer-trusted-ca-file=/etc/kubernetes/static-pod-certs/configmaps/etcd-peer-client-ca/ca-bundle.crt \
                --peer-client-cert-auth=true \
                --advertise-client-urls=https://${NODE_NODE_ENVVAR_NAME_IP}:2379 \
                --listen-client-urls=https://0.0.0.0:2379 \
                --listen-peer-urls=https://0.0.0.0:2380 \
                --listen-metrics-urls=https://0.0.0.0:9978 ||  mv /etc/kubernetes/etcd-backup-dir/etcd-member.yaml /etc/kubernetes/manifests
          env:
            - name: "ALL_ETCD_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_API"
              value: "3"
            - name: "ETCDCTL_CACERT"
              value: "/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
            - name: "ETCDCTL_CERT"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
            - name: "ETCDCTL_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_KEY"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
            - name: "ETCD_CIPHER_SUITES"
              value: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
            - name: "ETCD_DATA_DIR"
              value: "/var/lib/etcd"
            - name: "ETCD_ELECTION_TIMEOUT"
              value: "1000"
            - name: "ETCD_ENABLE_PPROF"
              value: "true"
            - name: "ETCD_HEARTBEAT_INTERVAL"
              value: "100"
            - name: "ETCD_IMAGE"
              value: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
            - name: "ETCD_INITIAL_CLUSTER_STATE"
              value: "existing"
            - name: "ETCD_QUOTA_BACKEND_BYTES"
              value: "7516192768"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-0.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.119"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.119"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-1.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.95.76"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.95.76"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-2.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.219"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.219"
          resources:
            requests:
              memory: 600Mi
              cpu: 300m
          readinessProbe:
            tcpSocket:
              port: 2380
            failureThreshold: 3
            initialDelaySeconds: 3
            periodSeconds: 5
            successThreshold: 1
            timeoutSeconds: 5
          securityContext:
            privileged: true
          volumeMounts:
            - mountPath: /etc/kubernetes/manifests
              name: static-pod-dir
            - mountPath: /etc/kubernetes/etcd-backup-dir
              name: etcd-backup-dir
            - mountPath: /etc/kubernetes/static-pod-resources
              name: resource-dir
            - mountPath: /etc/kubernetes/static-pod-certs
              name: cert-dir
            - mountPath: /var/lib/etcd/
              name: data-dir
        - name: etcd-metrics
          image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
          imagePullPolicy: IfNotPresent
          terminationMessagePolicy: FallbackToLogsOnError
          command:
            - /bin/sh
            - -c
            - |
              #!/bin/sh
              set -euo pipefail

              export ETCD_NAME=${NODE_NODE_ENVVAR_NAME_ETCD_NAME}

              exec etcd grpc-proxy start \
                --endpoints https://${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}:9978 \
                --metrics-addr https://0.0.0.0:9979 \
                --listen-addr 127.0.0.1:9977 \
                --key /etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key \
                --key-file /etc/kubernetes/static-pod-certs/secrets/etcd-all-serving-metrics/etcd-serving-metrics-NODE_NAME.key \
                --cert /etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt \
                --cert-file /etc/kubernetes/static-pod-certs/secrets/etcd-all-serving-metrics/etcd-serving-metrics-NODE_NAME.crt \
                --cacert /etc/kubernetes/static-pod-certs/configmaps/etcd-peer-client-ca/ca-bundle.crt \
                --trusted-ca-file /etc/kubernetes/static-pod-certs/configmaps/etcd-metrics-proxy-serving-ca/ca-bundle.crt
          env:
            - name: "ALL_ETCD_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_API"
              value: "3"
            - name: "ETCDCTL_CACERT"
              value: "/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
            - name: "ETCDCTL_CERT"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
            - name: "ETCDCTL_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_KEY"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
            - name: "ETCD_CIPHER_SUITES"
              value: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
            - name: "ETCD_DATA_DIR"
              value: "/var/lib/etcd"
            - name: "ETCD_ELECTION_TIMEOUT"
              value: "1000"
            - name: "ETCD_ENABLE_PPROF"
              value: "true"
            - name: "ETCD_HEARTBEAT_INTERVAL"
              value: "100"
            - name: "ETCD_IMAGE"
              value: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
            - name: "ETCD_INITIAL_CLUSTER_STATE"
              value: "existing"
            - name: "ETCD_QUOTA_BACKEND_BYTES"
              value: "7516192768"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-0.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.119"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.119"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-1.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.95.76"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.95.76"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-2.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.219"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.219"
          resources:
            requests:
              memory: 200Mi
              cpu: 100m
          securityContext:
            privileged: true
          volumeMounts:
            - mountPath: /etc/kubernetes/static-pod-resources
              name: resource-dir
            - mountPath: /etc/kubernetes/static-pod-certs
              name: cert-dir
            - mountPath: /var/lib/etcd/
              name: data-dir
        hostNetwork: true
        priorityClassName: system-node-critical
        tolerations:
        - operator: "Exists"
        volumes:
          - hostPath:
              path: /etc/kubernetes/manifests
            name: static-pod-dir
          - hostPath:
              path: /etc/kubernetes/static-pod-resources/etcd-member
            name: etcd-backup-dir
          - hostPath:
              path: /etc/kubernetes/static-pod-resources/etcd-pod-REVISION
            name: resource-dir
          - hostPath:
              path: /etc/kubernetes/static-pod-resources/etcd-certs
            name: cert-dir
          - hostPath:
              path: /var/lib/etcd
              type: ""
            name: data-dir
          - hostPath:
              path: /usr/local/bin
            name: usr-local-bin

    version: v0.0.0-alpha.0-603-g6a3f3b50
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:44:09Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:forceRedeploymentReason: {}
          f:pod.yaml: {}
          f:version: {}
        f:metadata:
          f:ownerReferences:
            .: {}
            k:{"uid":"4bb60619-7cc8-4ada-8e7f-2c93da64c7f8"}:
              .: {}
              f:apiVersion: {}
              f:kind: {}
              f:name: {}
              f:uid: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:44:09Z"
    name: etcd-pod-3
    namespace: openshift-etcd
    ownerReferences:
    - apiVersion: v1
      kind: ConfigMap
      name: revision-status-3
      uid: 4bb60619-7cc8-4ada-8e7f-2c93da64c7f8
    resourceVersion: "16309"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-pod-3
    uid: 1c4d45bd-1a9e-4676-a65b-ca1957879c3a
- apiVersion: v1
  data:
    cluster-backup.sh: |
      #!/usr/bin/env bash

      ### Created by cluster-etcd-operator. DO NOT edit.

      set -o errexit
      set -o pipefail
      set -o errtrace

      # example
      # cluster-backup.sh $path-to-snapshot

      if [[ $EUID -ne 0 ]]; then
        echo "This script must be run as root"
        exit 1
      fi

      function usage {
        echo 'Path to backup dir required: ./cluster-backup.sh [--force] <path-to-backup-dir>'
        exit 1
      }

      IS_DIRTY=""
      if [ "$1" == "--force" ]; then
        IS_DIRTY="__POSSIBLY_DIRTY__"
        shift
      fi

      # If the first argument is missing, or it is an existing file, then print usage and exit
      if [ -z "$1" ] || [ -f "$1" ]; then
        usage
      fi

      if [ ! -d "$1" ]; then
        mkdir -p "$1"
      fi

      function check_if_operator_is_progressing {
         operator="$1"

         export KUBECONFIG="/etc/kubernetes/static-pod-resources/kube-apiserver-certs/secrets/node-kubeconfigs/localhost.kubeconfig"
         if [ ! -f "${KUBECONFIG}" ]; then
            echo "Valid kubeconfig is not found in kube-apiserver-certs. Exiting!"
            exit 1
         fi

         progressing=$(oc get co "${operator}" -o jsonpath='{.status.conditions[?(@.type=="Progressing")].status}') || true
         if [ "$progressing" == "" ]; then
            echo "Could not find the status of the $operator. Check if the API server is running. Pass the --force flag to skip checks."
            exit 1
         elif [ "$progressing" != "False" ]; then
            echo "Currently the $operator operator is progressing. A reliable backup requires that a rollout is not in progress.  Aborting!"
            exit 1
         fi
      }

      # backup latest static pod resources
      function backup_latest_kube_static_resources {
        RESOURCES=("$@")

        LATEST_RESOURCE_DIRS=()
        for RESOURCE in "${RESOURCES[@]}"; do
          if [ ! -f "/etc/kubernetes/manifests/${RESOURCE}-pod.yaml" ]; then
            echo "error finding manifests for the ${RESOURCE} pod. please check if it is running."
            exit 1
          fi

          LATEST_RESOURCE=$(grep -o -m 1 "/etc/kubernetes/static-pod-resources/${RESOURCE}-pod-[0-9]*" "/etc/kubernetes/manifests/${RESOURCE}-pod.yaml") || true

          if [ -z "$LATEST_RESOURCE" ]; then
            echo "error finding static-pod-resources for the ${RESOURCE} pod. please check if it is running."
            exit 1
          fi
          if [ "${IS_DIRTY}" == "" ]; then
            check_if_operator_is_progressing "${RESOURCE}"
          fi

          echo "found latest ${RESOURCE}: ${LATEST_RESOURCE}"
          LATEST_RESOURCE_DIRS+=("${LATEST_RESOURCE#${CONFIG_FILE_DIR}/}")
        done

        # tar latest resources with the path relative to CONFIG_FILE_DIR
        tar -cpzf "$BACKUP_TAR_FILE" -C "${CONFIG_FILE_DIR}" "${LATEST_RESOURCE_DIRS[@]}"
        chmod 600 "$BACKUP_TAR_FILE"
      }

      function source_required_dependency {
        local path="$1"
        if [ ! -f "${path}" ]; then
          echo "required dependencies not found, please ensure this script is run on a node with a functional etcd static pod"
          exit 1
        fi
        # shellcheck disable=SC1090
        source "${path}"
      }

      BACKUP_DIR="$1"
      DATESTRING=$(date "+%F_%H%M%S")
      BACKUP_TAR_FILE=${BACKUP_DIR}/static_kuberesources_${DATESTRING}${IS_DIRTY}.tar.gz
      SNAPSHOT_FILE="${BACKUP_DIR}/snapshot_${DATESTRING}${IS_DIRTY}.db"
      BACKUP_RESOURCE_LIST=("kube-apiserver" "kube-controller-manager" "kube-scheduler" "etcd")

      trap 'rm -f ${BACKUP_TAR_FILE} ${SNAPSHOT_FILE}' ERR

      source_required_dependency /etc/kubernetes/static-pod-resources/etcd-certs/configmaps/etcd-scripts/etcd.env
      source_required_dependency /etc/kubernetes/static-pod-resources/etcd-certs/configmaps/etcd-scripts/etcd-common-tools

      # TODO handle properly
      if [ ! -f "$ETCDCTL_CACERT" ] && [ ! -d "${CONFIG_FILE_DIR}/static-pod-certs" ]; then
        ln -s "${CONFIG_FILE_DIR}"/static-pod-resources/etcd-certs "${CONFIG_FILE_DIR}"/static-pod-certs
      fi

      dl_etcdctl
      backup_latest_kube_static_resources "${BACKUP_RESOURCE_LIST[@]}"
      ETCDCTL_ENDPOINTS="https://${NODE_NODE_ENVVAR_NAME_IP}:2379" etcdctl snapshot save "${SNAPSHOT_FILE}"

      # Check the integrity of the snapshot
      check_snapshot_status "${SNAPSHOT_FILE}"
      echo "snapshot db and kube resources are successfully saved to ${BACKUP_DIR}"
    cluster-restore.sh: |
      #!/usr/bin/env bash

      ### Created by cluster-etcd-operator. DO NOT edit.

      set -o errexit
      set -o pipefail
      set -o errtrace

      # example
      # ./cluster-restore.sh $path-to-backup

      if [[ $EUID -ne 0 ]]; then
        echo "This script must be run as root"
        exit 1
      fi

      function source_required_dependency {
        local path="$1"
        if [ ! -f "${path}" ]; then
          echo "required dependencies not found, please ensure this script is run on a node with a functional etcd static pod"
          exit 1
        fi
        # shellcheck disable=SC1090
        source "${path}"
      }
      source_required_dependency /etc/kubernetes/static-pod-resources/etcd-certs/configmaps/etcd-scripts/etcd.env
      source_required_dependency /etc/kubernetes/static-pod-resources/etcd-certs/configmaps/etcd-scripts/etcd-common-tools

      function usage() {
        echo 'Path to the directory containing backup files is required: ./cluster-restore.sh <path-to-backup>'
        echo 'The backup directory is expected to be contain two files:'
        echo '        1. etcd snapshot'
        echo '        2. A copy of the Static POD resources at the time of backup'
        exit 1
      }

      # If the argument is not passed, or if it is not a directory, print usage and exit.
      if [ "$1" == "" ] || [ ! -d "$1" ]; then
        usage
      fi

      function restore_static_pods() {
        STATIC_PODS=("$@")

        for POD_FILE_NAME in "${STATIC_PODS[@]}"; do
          BACKUP_POD_PATH=$(tar -tvf "${BACKUP_FILE}" "*${POD_FILE_NAME}" | awk '{ print $6 }') || true
          if [ -z "${BACKUP_POD_PATH}" ]; then
            echo "${POD_FILE_NAME} does not exist in ${BACKUP_FILE}"
            exit 1
          fi

          echo "starting ${POD_FILE_NAME}"
          tar -xvf "${BACKUP_FILE}" --strip-components=2 -C "${MANIFEST_DIR}"/ "${BACKUP_POD_PATH}"
        done
      }

      function wait_for_containers_to_stop() {
        CONTAINERS=("$@")

        for NAME in "${CONTAINERS[@]}"; do
          echo "Waiting for container ${NAME} to stop"
          while [[ -n $(crictl ps --label io.kubernetes.container.name="${NAME}" -q) ]]; do
            echo -n "."
            sleep 1
          done
          echo "complete"
        done
      }

      BACKUP_DIR="$1"
      # shellcheck disable=SC2012
      BACKUP_FILE=$(ls -vd "${BACKUP_DIR}"/static_kuberesources*.tar.gz | tail -1) || true
      # shellcheck disable=SC2012
      SNAPSHOT_FILE=$(ls -vd "${BACKUP_DIR}"/snapshot*.db | tail -1) || true
      STATIC_POD_LIST=("kube-apiserver-pod.yaml" "kube-controller-manager-pod.yaml" "kube-scheduler-pod.yaml")
      STATIC_POD_CONTAINERS=("etcd" "etcdctl" "etcd-metrics" "kube-controller-manager" "kube-apiserver" "kube-scheduler")

      if [ ! -f "${SNAPSHOT_FILE}" ]; then
        echo "etcd snapshot ${SNAPSHOT_FILE} does not exist"
        exit 1
      fi

      # Move manifests and stop static pods
      if [ ! -d "$MANIFEST_STOPPED_DIR" ]; then
        mkdir -p "$MANIFEST_STOPPED_DIR"
      fi

      # Download etcdctl and check the snapshot status
      dl_etcdctl
      check_snapshot_status "${SNAPSHOT_FILE}"

      # Move static pod manifests out of MANIFEST_DIR
      for POD_FILE_NAME in "${STATIC_POD_LIST[@]}" etcd-pod.yaml; do
        echo "...stopping ${POD_FILE_NAME}"
        [ ! -f "${MANIFEST_DIR}/${POD_FILE_NAME}" ] && continue
        mv "${MANIFEST_DIR}/${POD_FILE_NAME}" "${MANIFEST_STOPPED_DIR}"
      done

      # wait for every static pod container to stop
      wait_for_containers_to_stop "${STATIC_POD_CONTAINERS[@]}"

      if [ ! -d "${ETCD_DATA_DIR_BACKUP}" ]; then
        mkdir -p "${ETCD_DATA_DIR_BACKUP}"
      fi

      # backup old data-dir
      if [ -d "${ETCD_DATA_DIR}/member" ]; then
        if [ -d "${ETCD_DATA_DIR_BACKUP}/member" ]; then
          echo "removing previous backup ${ETCD_DATA_DIR_BACKUP}/member"
          rm -rf "${ETCD_DATA_DIR_BACKUP}"/member
        fi
        echo "Moving etcd data-dir ${ETCD_DATA_DIR}/member to ${ETCD_DATA_DIR_BACKUP}"
        mv "${ETCD_DATA_DIR}"/member "${ETCD_DATA_DIR_BACKUP}"/
      fi

      # Restore static pod resources
      tar -C "${CONFIG_FILE_DIR}" -xzf "${BACKUP_FILE}" static-pod-resources

      # Copy snapshot to backupdir
      cp -p "${SNAPSHOT_FILE}" "${ETCD_DATA_DIR_BACKUP}"/snapshot.db

      echo "starting restore-etcd static pod"
      cp -p ${RESTORE_ETCD_POD_YAML} ${MANIFEST_DIR}/etcd-pod.yaml

      # start remaining static pods
      restore_static_pods "${STATIC_POD_LIST[@]}"
    etcd-common-tools: |
      # Common environment variables
      ASSET_DIR="/home/core/assets"
      CONFIG_FILE_DIR="/etc/kubernetes"
      MANIFEST_DIR="${CONFIG_FILE_DIR}/manifests"
      ETCD_DATA_DIR="/var/lib/etcd"
      ETCD_DATA_DIR_BACKUP="/var/lib/etcd-backup"
      MANIFEST_STOPPED_DIR="${ASSET_DIR}/manifests-stopped"
      RESTORE_ETCD_POD_YAML="${CONFIG_FILE_DIR}/static-pod-resources/etcd-certs/configmaps/restore-etcd-pod/pod.yaml"
      ETCDCTL_BIN_DIR="${CONFIG_FILE_DIR}/static-pod-resources/bin"
      PATH=${PATH}:${ETCDCTL_BIN_DIR}

      # download etcdctl from upstream release assets
      function dl_etcdctl {
        local etcdimg=${ETCD_IMAGE}
        local etcdctr=$(podman create ${etcdimg} --authfile=/var/lib/kubelet/config.json)
        local etcdmnt=$(podman mount "${etcdctr}")
        [ ! -d ${ETCDCTL_BIN_DIR} ] && mkdir -p ${ETCDCTL_BIN_DIR}
        cp ${etcdmnt}/bin/etcdctl ${ETCDCTL_BIN_DIR}/
        umount "${etcdmnt}"
        podman rm "${etcdctr}"
        etcdctl version
      }

      # execute etcdctl command inside of running etcdctl container
      function exec_etcdctl {
        local command="$@"
        local container_id=$(sudo crictl ps --label io.kubernetes.container.name=etcdctl -o json | jq -r '.containers[0].id') || true
        if [ -z "$container_id" ]; then
          echo "etcdctl container is not running"
          exit 1
        fi
        crictl exec -it $container_id /bin/sh -c "etcdctl $command"
      }

      function check_snapshot_status() {
        local snap_file="$1"
        if ! etcdctl snapshot status "${snap_file}" -w json; then
          echo "Backup integrity verification failed. Backup appears corrupted. Aborting!"
          return 1
        fi
      }
    etcd.env: |
      export ALL_ETCD_ENDPOINTS="https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
      export ETCDCTL_API="3"
      export ETCDCTL_CACERT="/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
      export ETCDCTL_CERT="/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
      export ETCDCTL_ENDPOINTS="https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
      export ETCDCTL_KEY="/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
      export ETCD_CIPHER_SUITES="TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
      export ETCD_DATA_DIR="/var/lib/etcd"
      export ETCD_ELECTION_TIMEOUT="1000"
      export ETCD_ENABLE_PPROF="true"
      export ETCD_HEARTBEAT_INTERVAL="100"
      export ETCD_IMAGE="quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
      export ETCD_INITIAL_CLUSTER_STATE="existing"
      export ETCD_QUOTA_BACKEND_BYTES="7516192768"
      export NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME="master-0.case03116926.lab.upshift.rdu2.redhat.com"
      export NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST="10.0.94.119"
      export NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP="10.0.94.119"
      export NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME="master-1.case03116926.lab.upshift.rdu2.redhat.com"
      export NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST="10.0.95.76"
      export NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP="10.0.95.76"
      export NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME="master-2.case03116926.lab.upshift.rdu2.redhat.com"
      export NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST="10.0.94.219"
      export NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP="10.0.94.219"
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:39:08Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:cluster-backup.sh: {}
          f:cluster-restore.sh: {}
          f:etcd-common-tools: {}
          f:etcd.env: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:39:08Z"
    name: etcd-scripts
    namespace: openshift-etcd
    resourceVersion: "16157"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-scripts
    uid: 81f74bb7-f0ef-43c3-a8f8-b4064d994e85
- apiVersion: v1
  data:
    ca-bundle.crt: |
      -----BEGIN CERTIFICATE-----
      MIIDGDCCAgCgAwIBAgIIEOB7widDiQwwDQYJKoZIhvcNAQELBQAwKjESMBAGA1UE
      CxMJb3BlbnNoaWZ0MRQwEgYDVQQDEwtldGNkLXNpZ25lcjAeFw0yMjAzMDgxMDEw
      MjRaFw0zMjAzMDUxMDEwMjRaMCoxEjAQBgNVBAsTCW9wZW5zaGlmdDEUMBIGA1UE
      AxMLZXRjZC1zaWduZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDM
      qN2MxX+ct316ZR7yiujlm3Geq2yHBaexfDkwFFV5jaD/UKG6x/oWy7oSOU3h2GQV
      EgrNUMab53XdjOFKCfDI2TOdaYxSKRtXN+9CW7P71EJ4/INXazLzSxR9YqH93ANH
      uHxbBndPKmjkcA5beU8ZbXuGpasb5QM0orIJQUBPJDGWxPFJu1WRhkebqLbOyRVL
      SiyfN5XgnM72KAQgeMbauoUfkJaVbNd9VMPxcBFf+WRoWi5ypvxZohUmiIshxHFo
      qBWRf0l8VgTEu3sf9DpDEkv1hhfIxhQRJiGkeCBB1oNwUvm90163HUcQRzOVSpbo
      uhV3dpt/5nhqiNB0zAipAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMB
      Af8EBTADAQH/MB0GA1UdDgQWBBRGHfEUBzZMHxIqd3UtuyqYBvr4KTANBgkqhkiG
      9w0BAQsFAAOCAQEAhndKtei2BpAWKsf4M/w2drHBFfEz1X1T8EiE0Chdyt+9Ko+l
      XiHLBEFxR+JJyaQcREjZLcVIqRYERX1iHaVEfiUWQgRImYR5XI25y9EQ/3CP+uFP
      wzVcERhkCIkXrvI6QT9e6nR7htMsKGtF7eiD8/RGcD2w8TrQ91kB7zSPODBgZwVp
      qWFWPR5BsnSZDdy3rcldCVlxnHOgCjLpyWbNQzW3G0j9xtTMfuS0BWNH2NcGTlBz
      qTU6hmnzR/CrHekxxrzkyrtlFOzL406/PXPDgEhbyKzgYUssAg5g0NgLJxz6rqs0
      ZAmADm4FqC1BV/afreI0oSjc2UH7Fg6FMQYulQ==
      -----END CERTIFICATE-----
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:38:49Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:ca-bundle.crt: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:38:49Z"
    name: etcd-serving-ca
    namespace: openshift-etcd
    resourceVersion: "6219"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-serving-ca
    uid: 61a20439-2780-46b8-8522-8af6b8446872
- apiVersion: v1
  data:
    ca-bundle.crt: |
      -----BEGIN CERTIFICATE-----
      MIIDGDCCAgCgAwIBAgIIEOB7widDiQwwDQYJKoZIhvcNAQELBQAwKjESMBAGA1UE
      CxMJb3BlbnNoaWZ0MRQwEgYDVQQDEwtldGNkLXNpZ25lcjAeFw0yMjAzMDgxMDEw
      MjRaFw0zMjAzMDUxMDEwMjRaMCoxEjAQBgNVBAsTCW9wZW5zaGlmdDEUMBIGA1UE
      AxMLZXRjZC1zaWduZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDM
      qN2MxX+ct316ZR7yiujlm3Geq2yHBaexfDkwFFV5jaD/UKG6x/oWy7oSOU3h2GQV
      EgrNUMab53XdjOFKCfDI2TOdaYxSKRtXN+9CW7P71EJ4/INXazLzSxR9YqH93ANH
      uHxbBndPKmjkcA5beU8ZbXuGpasb5QM0orIJQUBPJDGWxPFJu1WRhkebqLbOyRVL
      SiyfN5XgnM72KAQgeMbauoUfkJaVbNd9VMPxcBFf+WRoWi5ypvxZohUmiIshxHFo
      qBWRf0l8VgTEu3sf9DpDEkv1hhfIxhQRJiGkeCBB1oNwUvm90163HUcQRzOVSpbo
      uhV3dpt/5nhqiNB0zAipAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMB
      Af8EBTADAQH/MB0GA1UdDgQWBBRGHfEUBzZMHxIqd3UtuyqYBvr4KTANBgkqhkiG
      9w0BAQsFAAOCAQEAhndKtei2BpAWKsf4M/w2drHBFfEz1X1T8EiE0Chdyt+9Ko+l
      XiHLBEFxR+JJyaQcREjZLcVIqRYERX1iHaVEfiUWQgRImYR5XI25y9EQ/3CP+uFP
      wzVcERhkCIkXrvI6QT9e6nR7htMsKGtF7eiD8/RGcD2w8TrQ91kB7zSPODBgZwVp
      qWFWPR5BsnSZDdy3rcldCVlxnHOgCjLpyWbNQzW3G0j9xtTMfuS0BWNH2NcGTlBz
      qTU6hmnzR/CrHekxxrzkyrtlFOzL406/PXPDgEhbyKzgYUssAg5g0NgLJxz6rqs0
      ZAmADm4FqC1BV/afreI0oSjc2UH7Fg6FMQYulQ==
      -----END CERTIFICATE-----
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:39:11Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:ca-bundle.crt: {}
        f:metadata:
          f:ownerReferences:
            .: {}
            k:{"uid":"32f406cf-02cd-45a2-93cf-728006ee4ea6"}:
              .: {}
              f:apiVersion: {}
              f:kind: {}
              f:name: {}
              f:uid: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:39:11Z"
    name: etcd-serving-ca-2
    namespace: openshift-etcd
    ownerReferences:
    - apiVersion: v1
      kind: ConfigMap
      name: revision-status-2
      uid: 32f406cf-02cd-45a2-93cf-728006ee4ea6
    resourceVersion: "7891"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-serving-ca-2
    uid: e83db525-384f-4db6-8e15-79956fadabbf
- apiVersion: v1
  data:
    ca-bundle.crt: |
      -----BEGIN CERTIFICATE-----
      MIIDGDCCAgCgAwIBAgIIEOB7widDiQwwDQYJKoZIhvcNAQELBQAwKjESMBAGA1UE
      CxMJb3BlbnNoaWZ0MRQwEgYDVQQDEwtldGNkLXNpZ25lcjAeFw0yMjAzMDgxMDEw
      MjRaFw0zMjAzMDUxMDEwMjRaMCoxEjAQBgNVBAsTCW9wZW5zaGlmdDEUMBIGA1UE
      AxMLZXRjZC1zaWduZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDM
      qN2MxX+ct316ZR7yiujlm3Geq2yHBaexfDkwFFV5jaD/UKG6x/oWy7oSOU3h2GQV
      EgrNUMab53XdjOFKCfDI2TOdaYxSKRtXN+9CW7P71EJ4/INXazLzSxR9YqH93ANH
      uHxbBndPKmjkcA5beU8ZbXuGpasb5QM0orIJQUBPJDGWxPFJu1WRhkebqLbOyRVL
      SiyfN5XgnM72KAQgeMbauoUfkJaVbNd9VMPxcBFf+WRoWi5ypvxZohUmiIshxHFo
      qBWRf0l8VgTEu3sf9DpDEkv1hhfIxhQRJiGkeCBB1oNwUvm90163HUcQRzOVSpbo
      uhV3dpt/5nhqiNB0zAipAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMB
      Af8EBTADAQH/MB0GA1UdDgQWBBRGHfEUBzZMHxIqd3UtuyqYBvr4KTANBgkqhkiG
      9w0BAQsFAAOCAQEAhndKtei2BpAWKsf4M/w2drHBFfEz1X1T8EiE0Chdyt+9Ko+l
      XiHLBEFxR+JJyaQcREjZLcVIqRYERX1iHaVEfiUWQgRImYR5XI25y9EQ/3CP+uFP
      wzVcERhkCIkXrvI6QT9e6nR7htMsKGtF7eiD8/RGcD2w8TrQ91kB7zSPODBgZwVp
      qWFWPR5BsnSZDdy3rcldCVlxnHOgCjLpyWbNQzW3G0j9xtTMfuS0BWNH2NcGTlBz
      qTU6hmnzR/CrHekxxrzkyrtlFOzL406/PXPDgEhbyKzgYUssAg5g0NgLJxz6rqs0
      ZAmADm4FqC1BV/afreI0oSjc2UH7Fg6FMQYulQ==
      -----END CERTIFICATE-----
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:44:11Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:ca-bundle.crt: {}
        f:metadata:
          f:ownerReferences:
            .: {}
            k:{"uid":"4bb60619-7cc8-4ada-8e7f-2c93da64c7f8"}:
              .: {}
              f:apiVersion: {}
              f:kind: {}
              f:name: {}
              f:uid: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:44:11Z"
    name: etcd-serving-ca-3
    namespace: openshift-etcd
    ownerReferences:
    - apiVersion: v1
      kind: ConfigMap
      name: revision-status-3
      uid: 4bb60619-7cc8-4ada-8e7f-2c93da64c7f8
    resourceVersion: "16404"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/etcd-serving-ca-3
    uid: c8cd08f5-a38b-4d07-b87c-7f2702e4d823
- apiVersion: v1
  data:
    forceRedeploymentReason: ""
    pod.yaml: |+
      apiVersion: v1
      kind: Pod
      metadata:
        name: etcd
        namespace: openshift-etcd
        labels:
          app: etcd
          k8s-app: etcd
          etcd: "true"
          revision: "REVISION"
      spec:
        containers:
        - name: etcd
          image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb
          imagePullPolicy: IfNotPresent
          terminationMessagePolicy: FallbackToLogsOnError
          command:
            - /bin/sh
            - -c
            - |
              #!/bin/sh
              set -euo pipefail

              export ETCD_NAME=${NODE_NODE_ENVVAR_NAME_ETCD_NAME}
              export ETCD_INITIAL_CLUSTER="${ETCD_NAME}=https://${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}:2380"
              env | grep ETCD | grep -v NODE
              export ETCD_NODE_PEER_URL=https://${NODE_NODE_ENVVAR_NAME_ETCD_URL_HOST}:2380

              # checking if data directory is empty, if not etcdctl restore will fail
              if [ ! -z $(ls -A "/var/lib/etcd") ]; then
                echo "please delete the contents of data directory before restoring, running the restore script will do this for you"
                exit 1
              fi

              # check if we have backup file to be restored
              # if the file exist, check if it has not changed size in last 5 seconds
              if [ ! -f /var/lib/etcd-backup/snapshot.db ]; then
                echo "please make a copy of the snapshot db file, then move that copy to /var/lib/etcd-backup/snapshot.db"
                exit 1
              else
                filesize=$(stat --format=%s "/var/lib/etcd-backup/snapshot.db")
                sleep 5
                newfilesize=$(stat --format=%s "/var/lib/etcd-backup/snapshot.db")
                if [ "$filesize" != "$newfilesize" ]; then
                  echo "file size has changed since last 5 seconds, retry sometime after copying is complete"
                  exit 1
                fi
              fi

              UUID=$(uuidgen)
              echo "restoring to a single node cluster"
              ETCDCTL_API=3 /usr/bin/etcdctl snapshot restore /var/lib/etcd-backup/snapshot.db \
               --name  $ETCD_NAME \
               --initial-cluster=$ETCD_INITIAL_CLUSTER \
               --initial-cluster-token "openshift-etcd-${UUID}" \
               --initial-advertise-peer-urls $ETCD_NODE_PEER_URL \
               --data-dir="/var/lib/etcd/restore-${UUID}"

              mv /var/lib/etcd/restore-${UUID}/* /var/lib/etcd/

              rmdir /var/lib/etcd/restore-${UUID}
              rm /var/lib/etcd-backup/snapshot.db

              set -x
              exec etcd \
                --initial-advertise-peer-urls=https://${NODE_NODE_ENVVAR_NAME_IP}:2380 \
                --cert-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-NODE_NAME.crt \
                --key-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-serving/etcd-serving-NODE_NAME.key \
                --trusted-ca-file=/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt \
                --client-cert-auth=true \
                --peer-cert-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt \
                --peer-key-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key \
                --peer-trusted-ca-file=/etc/kubernetes/static-pod-certs/configmaps/etcd-peer-client-ca/ca-bundle.crt \
                --peer-client-cert-auth=true \
                --advertise-client-urls=https://${NODE_NODE_ENVVAR_NAME_IP}:2379 \
                --listen-client-urls=https://0.0.0.0:2379 \
                --listen-peer-urls=https://0.0.0.0:2380 \
                --listen-metrics-urls=https://0.0.0.0:9978 ||  mv /etc/kubernetes/etcd-backup-dir/etcd-member.yaml /etc/kubernetes/manifests
          env:
            - name: "ALL_ETCD_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_API"
              value: "3"
            - name: "ETCDCTL_CACERT"
              value: "/etc/kubernetes/static-pod-certs/configmaps/etcd-serving-ca/ca-bundle.crt"
            - name: "ETCDCTL_CERT"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.crt"
            - name: "ETCDCTL_ENDPOINTS"
              value: "https://10.0.94.219:2379,https://10.0.94.119:2379,https://10.0.95.76:2379"
            - name: "ETCDCTL_KEY"
              value: "/etc/kubernetes/static-pod-certs/secrets/etcd-all-peer/etcd-peer-NODE_NAME.key"
            - name: "ETCD_CIPHER_SUITES"
              value: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
            - name: "ETCD_DATA_DIR"
              value: "/var/lib/etcd"
            - name: "ETCD_ELECTION_TIMEOUT"
              value: "1000"
            - name: "ETCD_ENABLE_PPROF"
              value: "true"
            - name: "ETCD_HEARTBEAT_INTERVAL"
              value: "100"
            - name: "ETCD_IMAGE"
              value: "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff68bba6a0c20745df387a2000e21e46bbf21af46f995d0315039f0f069977fb"
            - name: "ETCD_INITIAL_CLUSTER_STATE"
              value: "existing"
            - name: "ETCD_QUOTA_BACKEND_BYTES"
              value: "7516192768"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-0.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.119"
            - name: "NODE_master_0_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.119"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-1.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.95.76"
            - name: "NODE_master_1_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.95.76"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_NAME"
              value: "master-2.case03116926.lab.upshift.rdu2.redhat.com"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_ETCD_URL_HOST"
              value: "10.0.94.219"
            - name: "NODE_master_2_case03116926_lab_upshift_rdu2_redhat_com_IP"
              value: "10.0.94.219"
          resources:
            requests:
              memory: 600Mi
              cpu: 300m
          readinessProbe:
            tcpSocket:
              port: 2380
            failureThreshold: 3
            initialDelaySeconds: 3
            periodSeconds: 5
            successThreshold: 1
            timeoutSeconds: 5
          securityContext:
            privileged: true
          volumeMounts:
            - mountPath: /etc/kubernetes/manifests
              name: static-pod-dir
            - mountPath: /etc/kubernetes/etcd-backup-dir
              name: etcd-backup-dir
            - mountPath: /etc/kubernetes/static-pod-certs
              name: cert-dir
            - mountPath: /var/lib/etcd/
              name: data-dir
            - mountPath: /var/lib/etcd-backup/
              name: backup-dir
        hostNetwork: true
        priorityClassName: system-node-critical
        tolerations:
        - operator: "Exists"
        volumes:
          - hostPath:
              path: /etc/kubernetes/manifests
            name: static-pod-dir
          - hostPath:
              path: /etc/kubernetes/static-pod-resources/etcd-member
            name: etcd-backup-dir
          - hostPath:
              path: /etc/kubernetes/static-pod-resources/etcd-certs
            name: cert-dir
          - hostPath:
              path: /var/lib/etcd
              type: ""
            name: data-dir
          - hostPath:
              path: /var/lib/etcd-backup
              type: ""
            name: backup-dir

    version: v0.0.0-alpha.0-603-g6a3f3b50
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:39:11Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:forceRedeploymentReason: {}
          f:pod.yaml: {}
          f:version: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:39:11Z"
    name: restore-etcd-pod
    namespace: openshift-etcd
    resourceVersion: "16287"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/restore-etcd-pod
    uid: 796e3619-5165-41b8-8786-728901b187d8
- apiVersion: v1
  data:
    revision: "1"
    status: Abandoned
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:38:46Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:revision: {}
          f:status: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:38:46Z"
    name: revision-status-1
    namespace: openshift-etcd
    resourceVersion: "6780"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/revision-status-1
    uid: c7d414d1-2698-409f-9722-c2a015cbd86e
- apiVersion: v1
  data:
    revision: "2"
    status: Succeeded
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:38:53Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:revision: {}
          f:status: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:38:53Z"
    name: revision-status-2
    namespace: openshift-etcd
    resourceVersion: "11507"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/revision-status-2
    uid: 32f406cf-02cd-45a2-93cf-728006ee4ea6
- apiVersion: v1
  data:
    revision: "3"
    status: Succeeded
  kind: ConfigMap
  metadata:
    creationTimestamp: "2022-03-08T10:44:08Z"
    managedFields:
    - apiVersion: v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:revision: {}
          f:status: {}
      manager: cluster-etcd-operator
      operation: Update
      time: "2022-03-08T10:44:08Z"
    name: revision-status-3
    namespace: openshift-etcd
    resourceVersion: "20774"
    selfLink: /api/v1/namespaces/openshift-etcd/configmaps/revision-status-3
    uid: 4bb60619-7cc8-4ada-8e7f-2c93da64c7f8
kind: ConfigMapList
metadata:
  resourceVersion: "83554"
  selfLink: /api/v1/namespaces/openshift-etcd/configmaps
