Documentation ¶
Index ¶
- func EmptyCiliumUnstructuredListPolicy() *unstructured.UnstructuredList
- func EmptyCiliumUnstructuredPolicy() *unstructured.Unstructured
- func GroupVersionCiliumNetworkPolicyKind() schema.GroupVersionKind
- func GroupVersionCiliumNetworkPolicyListKind() schema.GroupVersionKind
- type EgressRule
- type Entity
- type FQDNSelector
- type IngressRule
- type K8sServiceNamespace
- type K8sServiceSelectorNamespace
- type L7Rules
- type NetworkPolicy
- type NetworkPolicySpec
- type PortProtocol
- type PortRule
- type Protocol
- type Service
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 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 Service ¶
type Service struct { K8sServiceSelector *K8sServiceSelectorNamespace `json:"k8sServiceSelector,omitempty"` K8sService *K8sServiceNamespace `json:"k8sService,omitempty"` }
Service is a Cilium service selector