-
Notifications
You must be signed in to change notification settings - Fork 18
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: provides a way to override ignored namespaces at deployment time #1617
Conversation
Signed-off-by: Case Wylie <[email protected]>
Signed-off-by: Case Wylie <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1617 +/- ##
==========================================
- Coverage 81.24% 79.98% -1.27%
==========================================
Files 42 43 +1
Lines 1962 2013 +51
Branches 432 419 -13
==========================================
+ Hits 1594 1610 +16
- Misses 340 401 +61
+ Partials 28 2 -26
|
Signed-off-by: Case Wylie <[email protected]>
|
covered in #1641 |
## Description This feature: - [x] Adds additionalIgnoredNamespaces to values.yaml - [x] Sets additionalIgnoredNamespaces in controller container envs as `PEPR_ADDITIONAL_IGNORED_NAMESPACES` - [x] reads `PEPR_ADDITIONAL_IGNORED_NAMESPACES` env and adds namespaces to ignoredNamespaces - [x] Does **not** document PEPR_ADDITIONAL_IGNORED_NAMESPACES as feature is meant to be set through helm chart and not by hand, By hand you should set them in `package.json` In action: `package.json` ```json "alwaysIgnore": { "namespaces": ["something"] }, ``` `values.yaml` ```yaml additionalIgnoredNamespaces: - 'kube-system' - 'kube-public' - 'kube-node-lease' - 'default' - 'pepr' - 'pepr-system' - 'pepr-test-module' ``` `> helm template .` `controllers` ```yaml - name: PEPR__ADDITIONAL_IGNORED_NAMESPACES value: "kube-system, kube-public, kube-node-lease, default, pepr, pepr-system, pepr-test-module" ``` `webhook configs` ```yaml namespaceSelector: matchExpressions: - key: kubernetes.io/metadata.name operator: NotIn values: - kube-system - pepr-system - kube-system - kube-public - kube-node-lease - default - pepr - pepr-system - pepr-test-module - something ``` ## Related Issue Fixes #1610 #1617 <!-- or --> Relates to # ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [x] Unit, [Journey](https://github.com/defenseunicorns/pepr/tree/main/journey), [E2E Tests](https://github.com/defenseunicorns/pepr-excellent-examples), [docs](https://github.com/defenseunicorns/pepr/tree/main/docs), [adr](https://github.com/defenseunicorns/pepr/tree/main/adr) added or updated as needed - [x] [Contributor Guide Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request) followed --------- Signed-off-by: Case Wylie <[email protected]>
…corns#1641) ## Description This feature: - [x] Adds additionalIgnoredNamespaces to values.yaml - [x] Sets additionalIgnoredNamespaces in controller container envs as `PEPR_ADDITIONAL_IGNORED_NAMESPACES` - [x] reads `PEPR_ADDITIONAL_IGNORED_NAMESPACES` env and adds namespaces to ignoredNamespaces - [x] Does **not** document PEPR_ADDITIONAL_IGNORED_NAMESPACES as feature is meant to be set through helm chart and not by hand, By hand you should set them in `package.json` In action: `package.json` ```json "alwaysIgnore": { "namespaces": ["something"] }, ``` `values.yaml` ```yaml additionalIgnoredNamespaces: - 'kube-system' - 'kube-public' - 'kube-node-lease' - 'default' - 'pepr' - 'pepr-system' - 'pepr-test-module' ``` `> helm template .` `controllers` ```yaml - name: PEPR__ADDITIONAL_IGNORED_NAMESPACES value: "kube-system, kube-public, kube-node-lease, default, pepr, pepr-system, pepr-test-module" ``` `webhook configs` ```yaml namespaceSelector: matchExpressions: - key: kubernetes.io/metadata.name operator: NotIn values: - kube-system - pepr-system - kube-system - kube-public - kube-node-lease - default - pepr - pepr-system - pepr-test-module - something ``` ## Related Issue Fixes defenseunicorns#1610 defenseunicorns#1617 <!-- or --> Relates to # ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [x] Unit, [Journey](https://github.com/defenseunicorns/pepr/tree/main/journey), [E2E Tests](https://github.com/defenseunicorns/pepr-excellent-examples), [docs](https://github.com/defenseunicorns/pepr/tree/main/docs), [adr](https://github.com/defenseunicorns/pepr/tree/main/adr) added or updated as needed - [x] [Contributor Guide Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request) followed --------- Signed-off-by: Case Wylie <[email protected]>
Description
In scenarios where build-time configuration is not feasible, you can set the namespaces to ignore at deploy time by using the
PEPR_IGNORED_NAMESPACES
environment variable in your deployments. However, this method bypasses the build-time safety checks and is not recommended except as a last resort.Needs: 1618
Related Issue
Fixes #1610
Relates to #1618
Type of change
Checklist before merging