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(openshift): custom extra labels/annotations on deployments/pods #632

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

OpenGuidou
Copy link
Contributor

@OpenGuidou OpenGuidou commented Sep 21, 2023

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"

Fixes: #630

Description of the change:

This change adds allows the users to provide additional labels and annotations to be used in the cryostat deployment and pod.

Motivation for the change:

This change is helpful because some environment have a strong labeling policy for all resources.

@andrewazores andrewazores changed the title feat(openshift): Support extra labels/annotations for deployments and… feat(openshift): custom extra labels/annotations on deployments/pods Sep 21, 2023
@andrewazores andrewazores added the feat New feature or request label Sep 21, 2023
@andrewazores andrewazores requested a review from a team September 21, 2023 14:41
@andrewazores
Copy link
Member

/build_test

@andrewazores
Copy link
Member

@andrewazores
Copy link
Member

Ah right, that CI command is currently not working: #619 (comment)

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.

Hi @OpenGuidou, thank you for your contribution! Excellent work as well. I have some comments below, but more generally, do you think it makes sense to have a separate set of labels and annotations for the reports deployment (if enabled)? Typically, we'd put any properties that affect the reports deployment under the ReportOptions property.

api/v1beta1/cryostat_types.go Outdated Show resolved Hide resolved
internal/test/resources.go Outdated Show resolved Hide resolved
internal/test/resources.go Outdated Show resolved Hide resolved
andrewazores
andrewazores previously approved these changes Sep 25, 2023
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.

I think this looks good. @ebaron would you want the ingresses/services/routes to also have customizable labels/annotations like this or are you OK with it just going as far as pod/deployment for now?

@OpenGuidou
Copy link
Contributor Author

I think this looks good. @ebaron would you want the ingresses/services/routes to also have customizable labels/annotations like this or are you OK with it just going as far as pod/deployment for now?

For that one, it's already possible via https://github.com/cryostatio/cryostat-operator/blob/main/api/v1beta1/cryostat_types.go#L226 and https://github.com/cryostatio/cryostat-operator/blob/main/api/v1beta1/cryostat_types.go#L292

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.

@OpenGuidou looks good! Just noticed one more thing. Could you run make bundle to regenerate the CSV to include these new properties? We recently upgraded to Operator SDK 1.31.0, so if you have another version installed locally you'll need to upgrade.

@OpenGuidou
Copy link
Contributor Author

@OpenGuidou looks good! Just noticed one more thing. Could you run make bundle to regenerate the CSV to include these new properties? We recently upgraded to Operator SDK 1.31.0, so if you have another version installed locally you'll need to upgrade.

Ha I missed that, it's now done

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.

Excellent work @OpenGuidou! Thank you very much for the contribution!

@ebaron
Copy link
Member

ebaron commented Sep 28, 2023

@OpenGuidou Sorry one more thing. We require that all commits be signed in order for me to merge this PR:
https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification

@OpenGuidou
Copy link
Contributor Author

@OpenGuidou Sorry one more thing. We require that all commits be signed in order for me to merge this PR: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification

Done !

@ebaron ebaron merged commit 5373bbc into cryostatio:main Sep 28, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request safe-to-test
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Request] Support custom labels in deployments and pods
3 participants