Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-5350

[Doc] It's better to add a instruction about how to configure CORS against GCP Object storage to make build image upload function work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • quay-v3.7.0, quay-v3.8.5, quay-v3.9.0
    • documentation, quay-builder

      Description of problem:

      Now, quay official document has 16.3.2.4. Modifying your AWS S3 storage bucket  section to describe how to configure CORS against AWS S3 storage  to make build image upload function work as expected, but without such instruction for GCP Object storage.  In fact, without CORS configuration, upload build docker file will hit problem.

      p1

      After doing research, found out that configuring CORS against GCP Object storage like below,  upload build docker file will be successfully. 

      $ cat gcp_cors.json 
      [
          {
            "origin": ["*"],
            "method": ["GET"],
            "responseHeader": ["Authorization"],
            "maxAgeSeconds": 3600
          },
          {
            "origin": ["*"],
            "method": ["PUT"],
            "responseHeader": [              
                    "Content-Type",
                    "x-amz-acl",
                    "origin"],
            "maxAgeSeconds": 3600
          }
      ]
      
      
      $ gcloud storage buckets update gs://whugcpbucket --cors-file=./gcp_cors.json
      Updating gs://whugcpbucket/...                                                                                                         
        Completed 1                                                                                                                          
      $ gcloud storage buckets describe gs://whugcpbucket --format="default(cors)"
      cors:
      - maxAgeSeconds: 3600
        method:
        - GET
        origin:
        - '*'
        responseHeader:
        - Authorization
      - maxAgeSeconds: 3600
        method:
        - PUT
        origin:
        - '*'
        responseHeader:
        - Content-Type
        - x-amz-acl
        - origin
      

      Maybe the details of  "gcp_cors.json" need to be refined, but the setting method works.  

      So need to add a instruction about GCP object storage CORS setting in quay official document. 

              rhn-support-stevsmit Steven Smith
              rhwhu Weihua Hu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: