Commit 0a36fa7
authored
fix: allow pre-upgrade job pods to honor global security context (#670)
* fix: allow pre-upgrade job pods to honor global security context
The pre-upgrade hook jobs (job-createSecret and job-patchWebhook) had hardcoded
pod-level security context values that did not use global settings, while the
main deployment already supports global pod/container security context.
This fix updates the job templates to use the same security context helper
as the deployment, enabling them to:
1. Honor global.podSecurityContext when provided (e.g., from nri-bundle)
2. Maintain backward compatibility with fallback values (runAsUser: 2000, runAsGroup: 2000)
Changes:
- Updated job-createSecret.yaml to use nri-metadata-injection.securityContext.pod helper
- Updated job-patchWebhook.yaml to use nri-metadata-injection.securityContext.pod helper
- Updated _helpers.tpl fallback values to maintain original behavior (runAsUser: 2000, runAsGroup: 2000)
This enables consistent security posture across all nri-metadata-injection components
and allows proper integration with nri-bundle's global security configuration.
* docs: add changelog entry for global security context support1 parent 31053d7 commit 0a36fa7
File tree
4 files changed
+12
-8
lines changed- charts/nri-metadata-injection/templates
- admission-webhooks/job-patch
4 files changed
+12
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | | - | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | | - | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
0 commit comments