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: support running in non-default namespace #20

Merged
merged 1 commit into from Feb 2, 2024

Conversation

erikgb
Copy link
Contributor

@erikgb erikgb commented Feb 2, 2024

I initially tried to run the operator in another namespace than kube-startup-cpu-boost-system, but this failed because the namespace is hardcoded when supplied to the cert-rotator.

This PR suggests to use the downwardAPI to inject the current namespace as an environment variable to the workload. I have kept the hardcoded namespace name as a default for now.

@mikouaj mikouaj self-assigned this Feb 2, 2024
Copy link
Member

@mikouaj mikouaj left a comment

Choose a reason for hiding this comment

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

Thank you @erikgb for spotting this out, very good point.
The general plan was to introduce configuration object (#2) to get rid of any hardcodes like this. While this is still ongoing, your approach works for now!

@mikouaj mikouaj merged commit f3cdc46 into google:main Feb 2, 2024
3 checks passed
@erikgb
Copy link
Contributor Author

erikgb commented Feb 2, 2024

@mikouaj, we would prefer if a structured file format for configuring the controller is avoided, as it is impossible to patch with kustomize. The controller config is also deprecated (or about to be) in upstream controller-runtime, ref. kubernetes-sigs/controller-runtime#895. I down-voted #2 just now for this reason.

This was referenced Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants