Skip to content

Commit 4cfc593

Browse files
yuanchen8911claude
andcommitted
Make metrics-access network policy configurable
Add networkPolicy.enabled flag (default: true) to allow users to disable the metrics-access network policy when it conflicts with other services. The current network policy only allows ingress on ports 2112 (metrics) and 9216 (MongoDB metrics), which blocks other services like cert-manager webhook (port 443) when deployed in the same namespace. Users can now disable it by setting: networkPolicy: enabled: false Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5738cf3 commit 4cfc593

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

distros/kubernetes/nvsentinel/templates/networkpolicy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
{{- if .Values.networkPolicy.enabled }}
1516
apiVersion: networking.k8s.io/v1
1617
kind: NetworkPolicy
1718
metadata:
@@ -39,3 +40,4 @@ spec:
3940
- protocol: TCP
4041
port: {{ .Values.global.inclusterFileServer.cleanupMetricsPort }}
4142
{{- end }}
43+
{{- end }}

distros/kubernetes/nvsentinel/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ global:
9797
preflight:
9898
enabled: false
9999

100+
# Network policy configuration
101+
# The metrics-access network policy restricts ingress to metrics ports only.
102+
# This can block other services (e.g., cert-manager webhook) when deployed
103+
# in the same namespace. Set enabled=false to disable the network policy.
104+
networkPolicy:
105+
enabled: true
106+
100107
platformConnector:
101108
image:
102109
repository: ghcr.io/nvidia/nvsentinel/platform-connectors

0 commit comments

Comments
 (0)