-
Notifications
You must be signed in to change notification settings - Fork 5
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: Configure namespace sync in helm chart #726
feat: Configure namespace sync in helm chart #726
Conversation
6050ddb
to
2e5a2b9
Compare
@dlipovetsky wdyt about adding helm configuration for enabling the sync controller (default enabled) with required sync source namespace flag? Don't start up if misconfigured. Also default sync source namespace to pod (helm release) namespace? |
Both ideas sound good. I'll leave the source namespace flag default value an empty string. I will start the controller only if both the source namespace and target namespace label key flags have values. |
fb68eb7
to
7e415b6
Compare
(Rebased on main) |
e2e tests failing, will rebase on main once #736 merges |
65a50b9
to
3f7ed43
Compare
The CAREN process fails to start. We don't get Pod logs for failing CI jobs, so I had to run the e2e test locally.
The Deployment looks correct: spec:
containers:
- args:
- --webhook-cert-dir=/runtimehooks-certs/
- --defaults-namespace=$(POD_NAMESPACE)
- --namespacesync-enabled=true
- --namespacesync-source-namespace=caren-system
- --namespacesync-target-namespace-label-key=caren.nutanix.com/namespace-sync Will find the bug. Update: Found it by stepping through startup sequence. I made a copy-paste typo and bound the flag to the wrong variable. Fixed! |
lint-test-helm fails:
I think this is because of https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pull/745/files#diff-42e26dc67aed8aa3edb2472b4403288c1699fb6dc47419b9a475f0f224fe4689R44-R46 |
Going to rebase on #746 |
Sets the default label key as an empty string. Labels cannot have an empty key, which means that, by default, no namespaces are target namespaces.
- Adds configuration fields and passes them to manager as flags. - Documents configuration fields and their default values.
dbfb881
to
3c5abeb
Compare
🤖 I have created a release *beep* *boop* --- ## 0.11.0 (2024-06-27) <!-- Release notes generated using configuration in .github/release.yaml at main --> ## What's Changed ### Exciting New Features 🎉 * feat: Configure namespace sync in helm chart by @dlipovetsky in #726 * feat: Support CRS for local-path provisioner and add CSI e2e by @jimmidyson in #737 * feat: Support HelmAddon strategy for AWS EBS by @jimmidyson in #732 * feat: Deploy snapshot-controller as separate addon by @jimmidyson in #734 * feat: Update AWS CCM versions and add HelmAddon strategy by @jimmidyson in #748 ### Fixes 🔧 * fix: Namespace Sync controller should list no resources when source namespace is empty string by @dlipovetsky in #725 * fix: Temporarily hard-code supported PC version for Nutanix CSI by @jimmidyson in #751 * fix: skip kubeadm CA file when Secret doesn't have a CA by @dkoshkin in #752 * fix: Correctly report failed deploy of ServiceLoadBalancer by @dlipovetsky in #759 ### Other Changes * build: Tidy up goreleaser config by @jimmidyson in #745 * ci: Fix up image loading for lint-test-helm by @jimmidyson in #746 * refactor: Tidy up Nutanix CSI with consistent apply strategy by @jimmidyson in #733 * test(e2e): Set empty env vars for Nutanix e2e vars by @jimmidyson in #749 * refactor: Use recommended "default" function syntax in helm templates by @dlipovetsky in #750 * refactor: Reusable HelmAddon strategy by @jimmidyson in #735 * test(e2e): Various e2e tests fixes by @jimmidyson in #754 * test(e2e): Correct default helm release names for AWS CCM and EBS CSI by @jimmidyson in #756 **Full Changelog**: v0.10.0...v0.11.0 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
What problem does this PR solve?:
caren.nutanix.com/namespace-sync
as the default target namespace label key.#725 fixes behavior when the source namespace and/or target namespace label key are empty strings.
Which issue(s) this PR fixes:
Fixes #
How Has This Been Tested?:
Special notes for your reviewer:
I think this behavior deserves to be documented, but right now the only place where we talk about configuration of CAREN itself is in the Chart README. Should I add something there, or under
docs/
?