v1alpha1

package
v0.9.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Package v1alpha1 contains API Schema definitions for the policy.openservicemesh.io v1alpha1 API group

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register Egresss
	SchemeGroupVersion = schema.GroupVersion{
		Group:   "policy.openservicemesh.io",
		Version: "v1alpha1",
	}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme adds all Resources to the Scheme
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Egress

type Egress struct {
	// Object's type metadata
	metav1.TypeMeta `json:",inline"`

	// Object's metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the Egress policy specification
	// +optional
	Spec EgressSpec `json:"spec,omitempty"`
}

Egress is the type used to represent an Egress traffic policy. An Egress policy allows applications to access endpoints external to the service mesh or cluster based on the specified rules in the policy. +genclient +genclient:noStatus +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*Egress) DeepCopy

func (in *Egress) DeepCopy() *Egress

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

func (*Egress) DeepCopyInto

func (in *Egress) DeepCopyInto(out *Egress)

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

func (*Egress) DeepCopyObject

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

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

type EgressList

type EgressList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Egress `json:"items"`
}

EgressList defines the list of Egress objects. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*EgressList) DeepCopy

func (in *EgressList) DeepCopy() *EgressList

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

func (*EgressList) DeepCopyInto

func (in *EgressList) DeepCopyInto(out *EgressList)

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

func (*EgressList) DeepCopyObject

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

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

type EgressSpec

type EgressSpec struct {
	// Sources defines the list of sources the Egress policy applies to.
	Sources []SourceSpec `json:"sources"`

	// Hosts defines the list of external hosts the Egress policy will allow
	// access to.
	//
	// - For HTTP traffic, the HTTP Host/Authority header is matched against the
	// list of Hosts specified.
	//
	// - For HTTPS traffic, the Server Name Indication (SNI) indicated by the client
	// in the TLS handshake is matched against the list of Hosts specified.
	//
	// - For non-HTTP(s) based protocols, the Hosts field is ignored.
	// +optional
	Hosts []string `json:"hosts,omitempty"`

	// IPAddresses defines the list of external IP address ranges the Egress policy
	// applies to. The destination IP address of the traffic is matched against the
	// list of IPAddresses specified as a CIDR range.
	// +optional
	IPAddresses []string `json:"ipAddresses,omitempty"`

	// Ports defines the list of ports the Egress policy is applies to.
	// The destination port of the traffic is matched against the list of Ports specified.
	Ports []PortSpec `json:"ports"`

	// Matches defines the list of object references the Egress policy should match on.
	// +optional
	Matches []corev1.TypedLocalObjectReference `json:"matches,omitempty"`
}

EgressSpec is the type used to represent the Egress policy specification.

func (*EgressSpec) DeepCopy

func (in *EgressSpec) DeepCopy() *EgressSpec

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

func (*EgressSpec) DeepCopyInto

func (in *EgressSpec) DeepCopyInto(out *EgressSpec)

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

type PortSpec

type PortSpec struct {
	// Number defines the port number.
	Number int `json:"number"`

	// Protocol defines the protocol served by the port.
	Protocol string `json:"protocol"`
}

PortSpec is the type used to represent the Port in the list of Ports specified in an Egress policy specification.

func (*PortSpec) DeepCopy

func (in *PortSpec) DeepCopy() *PortSpec

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

func (*PortSpec) DeepCopyInto

func (in *PortSpec) DeepCopyInto(out *PortSpec)

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

type SourceSpec

type SourceSpec struct {
	// Kind defines the kind for the source in the Egress policy, ex. ServiceAccount.
	Kind string `json:"kind"`

	// Name defines the name of the source for the given Kind.
	Name string `json:"name"`

	// Namespace defines the namespace for the given source.
	Namespace string `json:"namespace"`
}

SourceSpec is the type used to represent the Source in the list of Sources specified in an Egress policy specification.

func (*SourceSpec) DeepCopy

func (in *SourceSpec) DeepCopy() *SourceSpec

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

func (*SourceSpec) DeepCopyInto

func (in *SourceSpec) DeepCopyInto(out *SourceSpec)

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