v3

package
v1.19.4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindNetworkPolicy     = "NetworkPolicy"
	KindNetworkPolicyList = "NetworkPolicyList"
)
View Source
const (
	Allow Action = "Allow"
	Deny         = "Deny"
	Log          = "Log"
	Pass         = "Pass"
)
View Source
const GroupName = "projectcalico.org"

GroupName is the group name use in this package

Variables

View Source
var (
	SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v3"}
	SchemeBuilder      = runtime.NewSchemeBuilder(addKnownTypes)

	AddToScheme = localSchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Action

type Action string

type EntityRule

type EntityRule struct {
	Nets              []string `json:"nets,omitempty" validate:"omitempty,dive,net"`
	Selector          string   `json:"selector,omitempty" validate:"omitempty,selector"`
	NamespaceSelector string   `json:"namespaceSelector,omitempty" validate:"omitempty,selector"`
	Ports             []int32  `json:"ports,omitempty" validate:"omitempty,dive"`
}

func (*EntityRule) DeepCopy

func (in *EntityRule) DeepCopy() *EntityRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EntityRule.

func (*EntityRule) DeepCopyInto

func (in *EntityRule) DeepCopyInto(out *EntityRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkPolicy

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

NetworkPolicy is the Namespaced-equivalent of the GlobalNetworkPolicy.

func (*NetworkPolicy) DeepCopy

func (in *NetworkPolicy) DeepCopy() *NetworkPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicy.

func (*NetworkPolicy) DeepCopyInto

func (in *NetworkPolicy) DeepCopyInto(out *NetworkPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NetworkPolicy) DeepCopyObject

func (in *NetworkPolicy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NetworkPolicyList

type NetworkPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []NetworkPolicy `json:"items"`
}

NetworkPolicyList contains a list of NetworkPolicy resources.

func (*NetworkPolicyList) DeepCopy

func (in *NetworkPolicyList) DeepCopy() *NetworkPolicyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyList.

func (*NetworkPolicyList) DeepCopyInto

func (in *NetworkPolicyList) DeepCopyInto(out *NetworkPolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NetworkPolicyList) DeepCopyObject

func (in *NetworkPolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NetworkPolicySpec

type NetworkPolicySpec struct {
	Tier                   string       `json:"tier,omitempty" validate:"omitempty,name"`
	Order                  *float64     `json:"order,omitempty"`
	Ingress                []Rule       `json:"ingress,omitempty" validate:"omitempty,dive"`
	Egress                 []Rule       `json:"egress,omitempty" validate:"omitempty,dive"`
	Selector               string       `json:"selector,omitempty" validate:"selector"`
	Types                  []PolicyType `json:"types,omitempty" validate:"omitempty,dive,policyType"`
	ServiceAccountSelector string       `json:"serviceAccountSelector,omitempty" validate:"selector"`
}

func (*NetworkPolicySpec) DeepCopy

func (in *NetworkPolicySpec) DeepCopy() *NetworkPolicySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicySpec.

func (*NetworkPolicySpec) DeepCopyInto

func (in *NetworkPolicySpec) DeepCopyInto(out *NetworkPolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PolicyType

type PolicyType string

PolicyType enumerates the possible values of the PolicySpec Types field.

const (
	PolicyTypeIngress PolicyType = "Ingress"
	PolicyTypeEgress  PolicyType = "Egress"
)

type Rule

type Rule struct {
	Action      Action     `json:"action" validate:"action"`
	Protocol    string     `json:"protocol,omitempty" validate:"omitempty"`
	Source      EntityRule `json:"source,omitempty" validate:"omitempty"`
	Destination EntityRule `json:"destination,omitempty" validate:"omitempty"`
}

func (*Rule) DeepCopy

func (in *Rule) DeepCopy() *Rule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.

func (*Rule) DeepCopyInto

func (in *Rule) DeepCopyInto(out *Rule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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