lib/gitlab/kubernetes/network_policy.rb
# podSelector selects pods that should be targeted by this
# policy. We can narrow selection by requiring this policy to
# match our custom labels. Since DISABLED_BY label will not be
# on any pod a policy will be effectively disabled.
podSelector selects pods that should be targeted by this
policy. We can narrow selection by requiring this policy to
match our custom labels. Since DISABLED_BY label will not be
on any pod a policy will be effectively disabled.
podSelector selects pods that should be targeted by this policy . We can narrow selection by requiring this policy to match our custom labels . Since DISABLED_BY label will not be on any pod a policy will be effectively disabled .
def enabled?
        return true unless pod_selector&.key?(:matchLabels)
        !pod_selector[:matchLabels]&.key?(DISABLED_BY_LABEL)
      end
def enabled? return true unless pod_selector &. key? ( :matchLabels ) ! pod_selector [ :matchLabels ] &. key? ( DISABLED_BY_LABEL ) end
podSelector selects pods that should be targeted by this
policy.
podSelector selects pods that should be targeted by this policy .