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

feat(status): CR status for database and storage secrets #825

Merged
merged 1 commit into from
May 21, 2024

Conversation

tthvo
Copy link
Member

@tthvo tthvo commented May 20, 2024

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits: git commit -S -m "YOUR_COMMIT_MESSAGE"

Related to #710

Description of the change:

  • Moved/Added new status fields for secrets to v1beta2 since they are only applicable in Cryostat 3.0.
  • Updated the controller to set missing status fields for database and storage secrets.
  • Added kubebuilder/operator-sdk markers for status fields such that:
    • Database and Storage secrets' names are also showed when kubectl get cryostat (default output).
      NAME              APPLICATION URL                                 TARGET NAMESPACES   STORAGE SECRET                       DATABASE SECRET
      cryostat-sample   https://cryostat-sample-myns.apps-crc.testing   ["myns"]            cryostat-sample-storage-secret-key   cryostat-sample-db
    • xDescriptors={"urn:alm:descriptor:io.kubernetes:Secret"} for Secrets. On OpenShift, this should render the status fields as clickable links to view the corresponding secrets.
  • Added more tests to validate status fields.

Motivation for the change:

Status fields for database and storage secrets are missing in the Cryostat CR. These fields would also be useful for tackling #475.

How to manually test:

export IMAGE_NAMESPACE=quay.io/some-user
export IMAGE_VERSION=test-version
make oci-build bundle bundle-build
podman push $IMAGE_NAMESPACE/cryostat-operator:$IMAGE_VERSION
podman push $IMAGE_NAMESPACE/cryostat-operator-bundle:$IMAGE_VERSION
make deploy_bundle
make create_cryostat_cr

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
@tthvo tthvo added fix chore Refactor, rename, cleanup, etc. safe-to-test labels May 20, 2024
@tthvo tthvo requested a review from a team May 20, 2024 06:59
@tthvo
Copy link
Member Author

tthvo commented May 20, 2024

/build_test

@tthvo tthvo changed the title fix(status): controller should set approriate status in CR feat(status): controller should set approriate status in CR May 20, 2024
@tthvo tthvo added feat New feature or request and removed fix labels May 20, 2024
Copy link

/build_test completed successfully ✅.
View Actions Run.

@tthvo tthvo changed the title feat(status): controller should set approriate status in CR feat(status): CR status for database and storage secrets May 20, 2024
Copy link
Member

@andrewazores andrewazores left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I defer to @ebaron about the v1beta2 changes.

Copy link
Member

@ebaron ebaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @tthvo!

@ebaron ebaron merged commit 13e6a20 into cryostatio:cryostat3 May 21, 2024
11 checks passed
@tthvo tthvo deleted the cr-status branch May 21, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Refactor, rename, cleanup, etc. feat New feature or request safe-to-test
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants