cilium

package
v1.5.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmptyCiliumUnstructuredListPolicy added in v1.0.0

func EmptyCiliumUnstructuredListPolicy() *unstructured.UnstructuredList

EmptyCiliumUnstructuredListPolicy return a new unstructured.UnstructuredList for CiliumNetworkPolicy

func EmptyCiliumUnstructuredPolicy added in v1.0.0

func EmptyCiliumUnstructuredPolicy() *unstructured.Unstructured

EmptyCiliumUnstructuredPolicy return a new unstructured.Unstructured for CiliumNetworkPolicy

func GroupVersionCiliumNetworkPolicyKind added in v1.0.0

func GroupVersionCiliumNetworkPolicyKind() schema.GroupVersionKind

GroupVersionCiliumNetworkPolicyKind return the schema.GroupVersionKind for CiliumNetworkPolicy

func GroupVersionCiliumNetworkPolicyListKind added in v1.0.0

func GroupVersionCiliumNetworkPolicyListKind() schema.GroupVersionKind

GroupVersionCiliumNetworkPolicyListKind return the schema.GroupVersionKind for CiliumNetworkPolicyList

Types

type EgressRule

type EgressRule struct {
	ToCIDR      []string               `json:"toCIDR,omitempty"`
	ToPorts     []PortRule             `json:"toPorts,omitempty"`
	ToEndpoints []metav1.LabelSelector `json:"toEndpoints,omitempty"`
	ToFQDNs     []FQDNSelector         `json:"toFQDNs,omitempty"`
	ToEntities  []Entity               `json:"toEntities,omitempty"`
	ToServices  []Service              `json:"toServices,omitempty"`
}

EgressRule is a Cilium egress rule

type Entity

type Entity string

Entity is a Cilium rule entity

const (
	// EntityHost is a host entity
	EntityHost Entity = "host"
	// EntityRemoteNode is a remote-node entity
	EntityRemoteNode Entity = "remote-node"
	// EntityWorld is a world entity
	EntityWorld Entity = "world"
)

type FQDNSelector

type FQDNSelector struct {
	MatchName    string `json:"matchName,omitempty"`
	MatchPattern string `json:"matchPattern,omitempty"`
}

FQDNSelector is a Cilium FQDN selector

type IngressRule

type IngressRule struct {
	FromEndpoints []metav1.LabelSelector `json:"fromEndpoints,omitempty"`
	FromEntities  []Entity               `json:"fromEntities,omitempty"`
	ToPorts       []PortRule             `json:"toPorts,omitempty"`
}

IngressRule is a Cilium ingress rule

type K8sServiceNamespace

type K8sServiceNamespace struct {
	ServiceName string `json:"serviceName,omitempty"`
	Namespace   string `json:"namespace,omitempty"`
}

K8sServiceNamespace is a Cilium service + namespace

type K8sServiceSelectorNamespace

type K8sServiceSelectorNamespace struct {
	Selector  metav1.LabelSelector `json:"selector"`
	Namespace string               `json:"namespace,omitempty"`
}

K8sServiceSelectorNamespace is a Cilium service selector + namespace

type L7Rules

type L7Rules struct {
	DNS []FQDNSelector `json:"dns,omitempty"`
}

L7Rules is a Cilium L7 port rule

type NetworkPolicy

type NetworkPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Specs []NetworkPolicySpec `json:"specs,omitempty"`
}

NetworkPolicy is a Cilium network policy

type NetworkPolicySpec

type NetworkPolicySpec struct {
	Description      string               `json:"description,omitempty"`
	EndpointSelector metav1.LabelSelector `json:"endpointSelector,omitempty"`
	Ingress          []IngressRule        `json:"ingress,omitempty"`
	Egress           []EgressRule         `json:"egress,omitempty"`
}

NetworkPolicySpec is a Cilium network policy spec

type PortProtocol

type PortProtocol struct {
	Port     string   `json:"port,omitempty"`
	Protocol Protocol `json:"protocol,omitempty"`
}

PortProtocol is a Cilium port protocol

type PortRule

type PortRule struct {
	Ports []PortProtocol `json:"ports,omitempty"`
	Rules *L7Rules       `json:"rules,omitempty"`
}

PortRule is a Cilium port rule

type Protocol

type Protocol string

Protocol is a Cilium network protocol

const (
	// ProtocolTCP refers to the TCP network protocol
	ProtocolTCP Protocol = "TCP"
	// ProtocolUDP refers to the UDP network protocol
	ProtocolUDP Protocol = "UDP"
	// ProtocolAny refers to any network protocol
	ProtocolAny Protocol = "ANY"
)

type Service

type Service struct {
	K8sServiceSelector *K8sServiceSelectorNamespace `json:"k8sServiceSelector,omitempty"`
	K8sService         *K8sServiceNamespace         `json:"k8sService,omitempty"`
}

Service is a Cilium service selector

Jump to

Keyboard shortcuts

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