Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPQE-28542: Support deploy Quay with unmanaged GCP PostgreSQL Database with Client Key/Certs #61753

Merged
merged 71 commits into from
Feb 25, 2025

Conversation

SeanZhao-redhat
Copy link
Contributor

@SeanZhao-redhat SeanZhao-redhat commented Feb 18, 2025

This PR add support for Google Cloud SQL Postgres instance support, including a step to provision/deprovision GCP Cloud SQL and Quay registry deploy with the Unmanaged GCP SQL with Client Key/Certs.

1, New steps added

1, Provision Google Cloud SQL Postgres instance

Usage :

env:    
  DB_VERSION: POSTGRES_17
 test:
 - ref: quay-tests-resource-provisioning-gcp-sql

Database instance "SSL mode" is Managed as: Require trusted client certificates
Output: $SHARED_DIR folder client-cert.pem, client-key.pem, server-ca.pem, gsql_db_public_ip,QUAY_GCP_SQL_TERRAFORM_PACKAGE.tgz for secret bundle and deprovision

2, Deploy Quay registry with Google Cloud SQL PostgreSQL with Client certs

Usage:

 env:    
   QUAYREGISTRY: quay
   QUAYNAMESPACE: quay-enterprise
 test:
 - ref: quay-tests-quay-deploy-registry-gsql

All the 2 env variables can keep default value, the secret bundle must be named postgresql-client-certs which include previous generated client-cert.pem, client-key.pem, server-ca.pem

3, Deprovision GCP SQL Postgres instance

Usage :

 test:
 - ref: quay-tests-resource-deprovisioning-gcp-sql

NOTE: Deprovision GCP SQL Database with Terraform has Known intermittent issue Failed to delete user, Error delete database. the tricky is, this seldom happen in my local terraform test, but very easy happen in Prow, error log1, error log2. The workaround to remove google_sql_user.users/google_sql_database.database state from terraform before destroy, this works passed log.

2, Job reference to several single responsibility steps

Job: quay-e2e-tests-quay313-gcp-sql

    test:
    - ref: quay-tests-enable-quay-catalogsource
    - ref: quay-tests-resource-provisioning-gcp-sql     #Provision DB
    - ref: quay-tests-resource-provisioning-storage-odf
    - ref: quay-tests-quay-deploy-operator
    - ref: quay-tests-quay-deploy-registry-gsql  
    - ref: quay-tests-test-quay-api
    - ref: quay-tests-resource-deprovisioning-gcp-sql

3, Job result

Quay api test passed, Provision/Deprovision GSQL Successful Test Result

4, Miscellaneous

A few polish for previous jobs

@SeanZhao-redhat
Copy link
Contributor Author

/pj-rehearse periodic-ci-quay-quay-tests-master-ocp-418-quay-quay-e2e-tests-quay313-gcp-sql

@openshift-ci-robot
Copy link
Contributor

@SeanZhao-redhat: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@SeanZhao-redhat
Copy link
Contributor Author

/pj-rehearse periodic-ci-quay-quay-tests-master-quay-operator-test-quay313-ocp417-operator-test-singlens

@openshift-ci-robot
Copy link
Contributor

@SeanZhao-redhat: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@SeanZhao-redhat
Copy link
Contributor Author

/pj-rehearse periodic-ci-quay-quay-tests-master-ocp-417-quay-quay-e2e-tests-quay313-ocp417-aws-sts

@openshift-ci-robot
Copy link
Contributor

@SeanZhao-redhat: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@SeanZhao-redhat
Copy link
Contributor Author

/pj-rehearse periodic-ci-quay-quay-tests-master-ocp-417-quay-quay-e2e-tests-quay313-ocp417-virtual-builder

@openshift-ci-robot
Copy link
Contributor

@SeanZhao-redhat: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@SeanZhao-redhat
Copy link
Contributor Author

/pj-rehearse periodic-ci-quay-quay-tests-master-ocp-417-quay-quay-acs-violations-check-quay313

@openshift-ci-robot
Copy link
Contributor

@SeanZhao-redhat: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@SeanZhao-redhat
Copy link
Contributor Author

/pj-rehearse ack

@openshift-ci-robot
Copy link
Contributor

@SeanZhao-redhat: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci-robot openshift-ci-robot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Feb 24, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 24, 2025

@SeanZhao-redhat: This pull request references OCPQE-28542 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.19.0" version, but no target version was set.

In response to this:

This PR add support for Google Cloud SQL Postgres instance support, including a step to provision/deprovision GCP Cloud SQL and Quay registry deploy with the Unmanaged GCP SQL with Client Key/Certs.

1, New steps added

1, Provision Google Cloud SQL Postgres instance

Usage :

env:    
  DB_VERSION: POSTGRES_17
 test:
 - ref: quay-tests-resource-provisioning-gcp-sql

Database instance "SSL mode" is Managed as: Require trusted client certificates
Output: $SHARED_DIR folder client-cert.pem, client-key.pem, server-ca.pem, gsql_db_public_ip,QUAY_GCP_SQL_TERRAFORM_PACKAGE.tgz for secret bundle and deprovision

2, Deploy Quay registry with Google Cloud SQL PostgreSQL with Client certs

Usage:

env:    
  QUAYREGISTRY: quay
  QUAYNAMESPACE: quay-enterprise
test:
- ref: quay-tests-quay-deploy-registry-gsql

All the 2 env variables can keep default value, the secret bundle must be named postgresql-client-certs which include previous generated client-cert.pem, client-key.pem, server-ca.pem

3, Deprovision GCP SQL Postgres instance

Usage :

 test:
 - ref: quay-tests-resource-deprovisioning-gcp-sql

NOTE: Deprovision GCP SQL Database with Terraform has Known intermittent issue Failed to delete user, Error delete database. the tricky is, this seldom happen in my local terraform test, but very easy happen in Prow, error log1, error log2. The workaround to remove google_sql_user.users/google_sql_database.database state from terraform before destroy, this works passed log.

2, Job reference to several single responsibility steps

Job: quay-e2e-tests-quay313-gcp-sql

   test:
   - ref: quay-tests-enable-quay-catalogsource
   - ref: quay-tests-resource-provisioning-gcp-sql     #Provision DB
   - ref: quay-tests-resource-provisioning-storage-odf
   - ref: quay-tests-quay-deploy-operator
   - ref: quay-tests-quay-deploy-registry-gsql  
   - ref: quay-tests-test-quay-api
   - ref: quay-tests-resource-deprovisioning-gcp-sql

3, Job result

Quay api test passed, Provision/Deprovision GSQL Successful Test Result

4, Miscellaneous

A few polish for previous jobs

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot removed the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Feb 25, 2025
@openshift-ci-robot
Copy link
Contributor

[REHEARSALNOTIFIER]
@SeanZhao-redhat: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
periodic-ci-quay-quay-tests-master-ocp-417-quay-quay-acs-violations-check-quay313 N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-418-quay-quay-e2e-tests-quay313-gcp-sql N/A periodic Periodic changed
periodic-ci-quay-quay-tests-master-quay-upgrade-quay313-ocp417-upgrade N/A periodic Ci-operator config changed
periodic-ci-quay-quay-tests-master-quay-operator-test-quay313-ocp417-operator-test-singlens N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-417-quay-quay-e2e-tests-quay313-ocp417-aws-sts N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-417-quay-quay-e2e-tests-quay313-ocp417-virtual-builder N/A periodic Registry content changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@SeanZhao-redhat
Copy link
Contributor Author

/pj-rehearse ack

@openshift-ci-robot
Copy link
Contributor

@SeanZhao-redhat: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci-robot openshift-ci-robot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Feb 25, 2025
@SeanZhao-redhat
Copy link
Contributor Author

/pj-rehearse periodic-ci-quay-quay-tests-master-ocp-418-quay-quay-e2e-tests-quay313-gcp-sql

@openshift-ci-robot
Copy link
Contributor

@SeanZhao-redhat: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@LiZhang19817
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2025
Copy link
Contributor

openshift-ci bot commented Feb 25, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LiZhang19817, SeanZhao-redhat

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 25, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit b4c8fe8 into openshift:master Feb 25, 2025
18 checks passed
phani2898 pushed a commit to phani2898/release that referenced this pull request Feb 26, 2025
…se with Client Key/Certs (openshift#61753)

* provisioning rosa env for quay

* Update rosa-sts-oidc-config-delete-ref.yaml

* Update rosa-sts-oidc-config-delete-commands.sh

* fix conflict

* initialize step enable-quay-catalogsource

* rollback

* remove useless file

* init google cloud sql

* checkin cmd

* fix missing variable

* fix extension

* add registry

* add registry

* fix secret bundle

* update tf file

* update deprovision

* update destory script

* update destroy

* update instance with RANDOM

* change back deprovision seq

* change back deprovision seq

* delete res before destroy instance

* update tf files

* update comments

* update copycert

* update cron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants