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

fix(k8s): no implicit own-namespace watching #1374

Merged
merged 3 commits into from
Feb 23, 2023

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Feb 20, 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 the last commit: git commit --amend --signoff

Fixes: #1365

Description of the change:

This removes the own-namespace from being implicitly included in the list of watched namespaces in k8s environments.

Motivation for the change:

The end user, or managing Cryostat Operator, should explicitly list any and all namespaces that they want the Cryostat instance to watch. The implicit inclusion of Cryostat's own namespace restricted users' choices since it was not previously possible to have Cryostat not watch that namespace and discover itself.

How to manually test:

  1. Deploy test image in k8s environment
  2. Set CRYOSTAT_K8S_NAMESPACES environment variable to ex. CRYOSTAT_K8S_NAMESPACES=myns1,myns2.
  3. Using the HTTP API or web-client, check if Cryostat discovers itself. Repeat steps 2 and 3 including (or not) the Cryostat deployment namespace in the list.

@andrewazores andrewazores force-pushed the no-implicit-own-namespace branch from b21cab0 to db83791 Compare February 20, 2023 19:54
@mergify mergify bot added the safe-to-test label Feb 20, 2023
@github-actions
Copy link
Contributor

Test image available:

$ CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1374-db837919d3fa1349d9b7f4203744e6d40a48e7d5 sh smoketest.sh

@andrewazores andrewazores force-pushed the no-implicit-own-namespace branch 2 times, most recently from 874d443 to 88e30e2 Compare February 22, 2023 17:13
@github-actions
Copy link
Contributor

Test image available:

$ CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1374-88e30e22a50d0cae9c9c7f23899237f334ba9879 sh smoketest.sh

@andrewazores andrewazores force-pushed the no-implicit-own-namespace branch 2 times, most recently from fc7c3c6 to 68fc2df Compare February 22, 2023 20:40
@github-actions
Copy link
Contributor

Test image available:

$ CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1374-68fc2dfd86b28860beadadfe55bfd5b1ce74d20e sh smoketest.sh

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 good!

avoid eager creation of resources that may not be used by non-selected runtime platform mechanisms

Signed-off-by: Andrew Azores <aazores@redhat.com>
Signed-off-by: Andrew Azores <aazores@redhat.com>
@andrewazores andrewazores force-pushed the no-implicit-own-namespace branch from 68fc2df to 826e426 Compare February 23, 2023 20:18
@github-actions
Copy link
Contributor

Test image available:

$ CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1374-826e426e486bd138716b2ef3a0cc361b30f2a182 sh smoketest.sh

@andrewazores andrewazores merged commit 976d2b0 into cryostatio:main Feb 23, 2023
@andrewazores andrewazores deleted the no-implicit-own-namespace branch February 23, 2023 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Task] Consider implicit inclusion of own namespace
2 participants