Commit b7da0a8
Add securityContext for improved container security (#473)
* feat: add pod-level security contexts to all deployments
- Add runAsNonRoot, runAsUser (999), runAsGroup (999), fsGroup (999)
- Add seccompProfile with RuntimeDefault type
- Enforce security hardening across preview, production, and cronjob specs
* feat: implement Kubernetes security context hardening
- Add readOnlyRootFilesystem, runAsNonRoot, drop all capabilities
- Add volume mounts for writable directories (/tmp, /logs, config)
- Add USER environment variable for temporal user detection
- Add init container for temporal config copying
- Ensure all containers work with hardened security context
* fix: restore temporal config volumes under security hardening
* feat: sync temporal deployments with init containers and consistent volume mounts
- Add init container to production temporal deployment
- Add explanatory comment for init container purpose
- Standardize temporal-ui-config volume usage across environments
- Ensure consistent security contexts between preview and production
* fix: remove duplicate volumes in production temporal deployment
- Remove duplicate temporal-config and temporal-ui-config volume entries
- Remove unused temporal-var volume mount from temporal-server container
- Ensure production temporal deployment matches debugged preview configuration
---------
Co-authored-by: Better <[email protected]>
Co-authored-by: Joel Dsouza <[email protected]>1 parent f2c1524 commit b7da0a8
File tree
5 files changed
+274
-0
lines changed- lib/kube
- preview
- production
5 files changed
+274
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
| |||
43 | 52 | | |
44 | 53 | | |
45 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
46 | 63 | | |
47 | 64 | | |
48 | 65 | | |
| |||
56 | 73 | | |
57 | 74 | | |
58 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
59 | 84 | | |
60 | 85 | | |
61 | 86 | | |
| |||
72 | 97 | | |
73 | 98 | | |
74 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
26 | 35 | | |
27 | 36 | | |
28 | 37 | | |
| |||
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
37 | 64 | | |
38 | 65 | | |
39 | 66 | | |
40 | 67 | | |
41 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
42 | 77 | | |
43 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
44 | 83 | | |
45 | 84 | | |
46 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
47 | 91 | | |
48 | 92 | | |
49 | 93 | | |
| |||
52 | 96 | | |
53 | 97 | | |
54 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
55 | 107 | | |
56 | 108 | | |
57 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
58 | 113 | | |
59 | 114 | | |
60 | 115 | | |
| |||
66 | 121 | | |
67 | 122 | | |
68 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
69 | 132 | | |
70 | 133 | | |
71 | 134 | | |
72 | 135 | | |
73 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
74 | 142 | | |
75 | 143 | | |
76 | 144 | | |
| |||
93 | 161 | | |
94 | 162 | | |
95 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
96 | 172 | | |
97 | 173 | | |
98 | 174 | | |
99 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
100 | 182 | | |
101 | 183 | | |
102 | 184 | | |
103 | 185 | | |
104 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
| |||
33 | 42 | | |
34 | 43 | | |
35 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
36 | 53 | | |
37 | 54 | | |
38 | 55 | | |
| |||
46 | 63 | | |
47 | 64 | | |
48 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
49 | 74 | | |
50 | 75 | | |
51 | 76 | | |
| |||
62 | 87 | | |
63 | 88 | | |
64 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
0 commit comments