Skip to content

Commit c9d028b

Browse files
committed
add rule for metrics project
Signed-off-by: Kevin <[email protected]>
1 parent fc84c9c commit c9d028b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pkg/controllers/raycluster_controller.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,17 @@ func desiredNetworkPolicy(cluster *rayv1.RayCluster, kubeRayNamespaces []string)
389389
networkingapply.NetworkPolicyPort().WithProtocol(corev1.ProtocolTCP).WithPort(intstr.FromInt(8265)),
390390
networkingapply.NetworkPolicyPort().WithProtocol(corev1.ProtocolTCP).WithPort(intstr.FromInt(10001)),
391391
),
392+
networkingapply.NetworkPolicyIngressRule().
393+
WithPorts(
394+
networkingapply.NetworkPolicyPort().WithProtocol(corev1.ProtocolTCP).WithPort(intstr.FromInt(8080)),
395+
).
396+
WithFrom(
397+
networkingapply.NetworkPolicyPeer().WithNamespaceSelector(metav1apply.LabelSelector().
398+
WithMatchExpressions(metav1apply.LabelSelectorRequirement().
399+
WithKey(corev1.LabelMetadataName).
400+
WithOperator(metav1.LabelSelectorOpIn).
401+
WithValues("openshift-monitoring"))),
402+
),
392403
networkingapply.NetworkPolicyIngressRule().
393404
WithPorts(
394405
networkingapply.NetworkPolicyPort().WithProtocol(corev1.ProtocolTCP).WithPort(intstr.FromInt(8443)),

0 commit comments

Comments
 (0)