Uploaded image for project: 'OpenShift API for Data Protection'
  1. OpenShift API for Data Protection
  2. OADP-256

Deployment gcp-registry pointing to a wrong secret

XMLWordPrintable

    • False
    • False
    • ToDo
    • OADP Sprint 215, OADP Sprint 216, OADP Sprint 217, OADP Sprint 218
    • 4
    • 0
    • 0
    • 0
    • Untriaged

      https://coreos.slack.com/archives/C0144ECKUJ0/p1644827993943709

      Environment:
      OSD on GCP
      OADP v0.5.6

      Reproducer:

      1. Create a secret with user-defined name and key, which containing the GCP service account credentials.

      2. Create a DPA, specify the above secret name and key.

      apiVersion: oadp.openshift.io/v1alpha1
      kind: DataProtectionApplication
      metadata: 
        name: dpa-sample
        namespace: openshift-adp
      spec: 
        configuration: 
          velero: 
            defaultPlugins: 
            - openshift
            - gcp
          restic: 
            enable: false
        backupLocations: 
          - name: default
            velero: 
              provider: gcp
              default: true
              objectStorage: 
                bucket: siwu-test-gcp-oadp-test
                prefix: backup-prefix1
              credential: 
                name: cloud-credentials
                key: service_account.json
        volumeSnapshots: 
          - name: default
            velero: 
              provider: gcp
      

      3. Check the pod, and the gcp-registry fail to start due to it is pointing to a wrong secret.

      $ oc get pod -n openshift-adp
      NAME                                                READY   STATUS              RESTARTS   AGE
      oadp-dpa-sample-1-gcp-registry-944cb7d46-p6w6d      0/1     ContainerCreating   0          117m
      openshift-adp-controller-manager-7fcf9ff7b4-gccvn   1/1     Running             0          9h
      velero-5c9957555c-smf6n                             1/1     Running             0          117m
      
      $ oc describe pod oadp-dpa-sample-1-gcp-registry-944cb7d46-p6w6d -n openshift-adp
      
          Environment: 
            REGISTRY_STORAGE:              gcs
            REGISTRY_STORAGE_GCS_BUCKET:   siwu-test-gcp-oadp-test
            REGISTRY_STORAGE_GCS_KEYFILE:  /credentials-gcp/cloud
          Mounts: 
            /credentials-gcp from cloud-credentials-gcp (rw)
            /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-trmg8 (ro)
      
      Volumes: 
        cloud-credentials-gcp: 
          Type:        Secret (a volume populated by a Secret)
          SecretName:  cloud-credentials-gcp
          Optional:    false
      

      The velero pod is running correctly and backup can be made successfully.

      Expect result:
      gcp-registry runs correctly.

            spampatt@redhat.com Shubham Pampattiwar
            siwu.openshift Siu Wa Wu
            Maya Peretz Maya Peretz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: