You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: charts/sourcegraph/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,7 +192,7 @@ In addition to the documented values, all services also support the following va
192
192
| nodeExporter.podSecurityContext | object |`{"fsGroup":65534,"runAsGroup":65534,"runAsNonRoot":true,"runAsUser":65534}`| Security context for the `node-exporter` pod, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod)|
| nodeExporter.resources | object |`{"limits":{"cpu":"1","memory":"1Gi"},"requests":{"cpu":".2","memory":"100Mi"}}`| Resource requests & limits for the `node-exporter` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)|
195
-
| nodeExporter.serviceAccount.create | bool |`true`| Enable creation of ServiceAccount for `node-exporter`|
195
+
| nodeExporter.serviceAccount.create | bool |`false`| Enable creation of ServiceAccount for `node-exporter`|
196
196
| nodeExporter.serviceAccount.name | string |`"node-exporter"`| Name of the ServiceAccount to be created or an existing ServiceAccount |
197
197
| openTelemetry.agent.name | string |`"otel-agent"`| Name used by resources. Does not affect service names or PVCs. |
198
198
| openTelemetry.agent.resources | object |`{"limits":{"cpu":"500m","memory":"500Mi"},"requests":{"cpu":"100m","memory":"100Mi"}}`| Resource requests & limits for the `otel-agent` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)|
Copy file name to clipboardExpand all lines: charts/sourcegraph/templates/node-exporter/node-exporter.PodSecurityPolicy.yaml
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,9 @@
1
1
{{- if and .Values.nodeExporter.enabled .Values.nodeExporter.podSecurityPolicy.enabled -}}
2
+
3
+
{{- if not .Values.nodeExporter.serviceAccount.create -}}
4
+
{{ fail "Node Exporter's service account must be enabled in order to use its pod security policy (set 'nodeExporter.ServiceAccount.create' to true)" }}
- it: should fail to render if the PodSecurityPolicy is enabled, but the ServiceAccount isn't
110
+
set:
111
+
nodeExporter:
112
+
serviceAccount:
113
+
create: false
114
+
podSecurityPolicy:
115
+
enabled: true
116
+
asserts:
117
+
- failedTemplate:
118
+
errorMessage: "Node Exporter's service account must be enabled in order to use its pod security policy (set 'nodeExporter.ServiceAccount.create' to true)"
- it: should not render the podSecurityPolicy if disabled
65
122
set:
@@ -74,6 +131,12 @@ tests:
74
131
- it: should ensure that the namespace is properly propagated to the cluster role binding
75
132
release:
76
133
namespace: "my-test-namespace"
134
+
set:
135
+
nodeExporter:
136
+
serviceAccount:
137
+
create: true
138
+
podSecurityPolicy:
139
+
enabled: true
77
140
asserts:
78
141
- equal:
79
142
path: subjects[0].namespace
@@ -83,7 +146,10 @@ tests:
83
146
- it: should have host Network and PID enabled by default
84
147
set:
85
148
nodeExporter:
86
-
podSecurityPolicy: # (unrelated to host network/pid defaults, just for ensuring that PodSecurityPolicy gets rendered so that we can check them in same test)
149
+
# (these settings are unrelated to host network/pid defaults, they're just for ensuring that PodSecurityPolicy gets rendered so that we can check them in same test)
150
+
serviceAccount:
151
+
create: true
152
+
podSecurityPolicy:
87
153
enabled: true
88
154
asserts:
89
155
- equal:
@@ -108,7 +174,10 @@ tests:
108
174
nodeExporter:
109
175
hostNetwork: false
110
176
hostPID: false
111
-
podSecurityPolicy: # (unrelated to host network/pid settings, just for ensuring that PodSecurityPolicy gets rendered so that we can check them in same test)
177
+
# (these settings are unrelated to host network/pid defaults, they're just for ensuring that PodSecurityPolicy gets rendered so that we can check them in same test)
0 commit comments