network

package
v0.0.0-...-fb5a1ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInputPorts

func GetInputPorts(inputs []obs.InputSpec) []int32

GetInputPorts extracts all unique ports from the given input receiver specs. It returns the ports that input receivers are configured to listen on.

func GetOutputPortsWithProtocols

func GetOutputPortsWithProtocols(outputs []obs.OutputSpec, portProtocolMap map[factory.PortProtocol]bool)

GetOutputPortsWithProtocols extracts all unique ports with their protocols from the given outputs. It parses URLs to extract ports and protocols, or uses default values based on the output type.

func GetProxyPorts

func GetProxyPorts(portProtocolMap map[factory.PortProtocol]bool)

GetProxyPorts extracts unique ports from cluster-wide proxy environment variables. It parses HTTP_PROXY and HTTPS_PROXY URLs to determine explicit proxy ports, or adds default ports (80 for HTTP, 443 for HTTPS) when no port is specified.

func ReconcileClusterLogForwarderNetworkPolicy

func ReconcileClusterLogForwarderNetworkPolicy(k8Client client.Client, namespace, policyName, instanceName, component string, policyRuleSet obsv1.NetworkPolicyRuleSetType, outputs []obsv1.OutputSpec, inputs []obsv1.InputSpec, ownerRef metav1.OwnerReference, visitor func(o runtime.Object)) error

ReconcileClusterLogForwarderNetworkPolicy reconciles the NetworkPolicy for the clusterlogforwarder It handles both AllowAllIngressEgress and RestrictIngressEgress rule sets, parsing ports from outputs and inputs when needed.

func ReconcileInputService

func ReconcileInputService(k8sClient client.Client, namespace, name, instance, certSecretName string, port, targetPort int32, receiverType obs.ReceiverType, owner metav1.OwnerReference, visitors func(o runtime.Object)) error

func ReconcileLogFileMetricsExporterNetworkPolicy

func ReconcileLogFileMetricsExporterNetworkPolicy(k8Client client.Client, namespace, policyName, instanceName, component string, policyRuleSet loggingv1alpha1.NetworkPolicyRuleSetType, ownerRef metav1.OwnerReference, visitor func(o runtime.Object)) error

ReconcileLogFileMetricsExporterNetworkPolicy reconciles the NetworkPolicy for the logfilemetricexporter

func ReconcileService

func ReconcileService(k8sClient client.Client, namespace, name, instanceName, component, portName, certSecretName string, portNum int32, owner metav1.OwnerReference, visitors func(o runtime.Object)) error

ReconcileService reconciles the service that exposes metrics

func RemoveNetworkPolicy

func RemoveNetworkPolicy(k8Client client.Client, namespace, name string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL