v1alpha2

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: Apache-2.0 Imports: 4 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeBuilder collects functions that add things to a scheme. It's to allow
	// code to compile without explicitly referencing generated types. You should
	// declare one in each package that will have generated deep copy or conversion
	// functions.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme applies all the stored functions to the scheme. A non-nil error
	// indicates that one function failed and the attempt was abandoned.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{
	Group:   ts.GroupName,
	Version: "v1alpha2",
}

SchemeGroupVersion is the identifier for the API which includes the name of the group and the version of the API

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 IdentityBindingSubject

type IdentityBindingSubject struct {
	// Kind is the type of Subject to allow ingress (ServiceAccount | Group)
	Kind string `json:"kind"`

	// Name of the Subject, i.e. ServiceAccountName
	Name string `json:"name"`

	// Namespace where the Subject is deployed
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Port defines a TCP port to apply the TrafficTarget to
	// +optional
	Port *int `json:"port,omitempty"`
}

IdentityBindingSubject is a Kubernetes objects which should be allowed access to the TrafficTarget

func (*IdentityBindingSubject) DeepCopy

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

func (*IdentityBindingSubject) DeepCopyInto

func (in *IdentityBindingSubject) DeepCopyInto(out *IdentityBindingSubject)

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

type TrafficTarget

type TrafficTarget struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec TrafficTargetSpec `json:"spec"`
}

TrafficTarget associates a set of traffic definitions (rules) with a service identity which is allocated to a group of pods. Access is controlled via referenced TrafficSpecs and by a list of source service identities.

  • If a pod which holds the referenced service identity makes a call to the destination on one of the defined routes then access will be allowed
  • Any pod which attempts to connect and is not in the defined list of sources will be denied
  • Any pod which is in the defined list, but attempts to connect on a route which is not in the list of the TrafficSpecs will be denied

func (*TrafficTarget) DeepCopy

func (in *TrafficTarget) DeepCopy() *TrafficTarget

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

func (*TrafficTarget) DeepCopyInto

func (in *TrafficTarget) DeepCopyInto(out *TrafficTarget)

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

func (*TrafficTarget) DeepCopyObject

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

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

type TrafficTargetList

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

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

TrafficTargetList satisfy K8s code gen requirements

func (*TrafficTargetList) DeepCopy

func (in *TrafficTargetList) DeepCopy() *TrafficTargetList

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

func (*TrafficTargetList) DeepCopyInto

func (in *TrafficTargetList) DeepCopyInto(out *TrafficTargetList)

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

func (*TrafficTargetList) DeepCopyObject

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

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

type TrafficTargetRule

type TrafficTargetRule struct {
	// Kind is the kind of TrafficSpec to allow
	Kind string `json:"kind"`

	// Name of the TrafficSpec to use
	Name string `json:"name"`

	// Matches is a list of TrafficSpec routes to allow traffic for
	// +optional
	Matches []string `json:"matches,omitempty"`
}

TrafficTargetRule is the TrafficSpec to allow for a TrafficTarget

func (*TrafficTargetRule) DeepCopy

func (in *TrafficTargetRule) DeepCopy() *TrafficTargetRule

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

func (*TrafficTargetRule) DeepCopyInto

func (in *TrafficTargetRule) DeepCopyInto(out *TrafficTargetRule)

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

type TrafficTargetSpec

type TrafficTargetSpec struct {
	// Selector is the pod or group of pods to allow ingress traffic
	Destination IdentityBindingSubject `json:"destination"`

	// Sources are the pod or group of pods to allow ingress traffic
	// +optional
	Sources []IdentityBindingSubject `json:"sources,omitempty"`

	// Rules are the traffic rules to allow (HTTPRoutes | TCPRoute)
	// +optional
	Rules []TrafficTargetRule `json:"rules,omitempty"`
}

TrafficTargetSpec is the specification of a TrafficTarget

func (*TrafficTargetSpec) DeepCopy

func (in *TrafficTargetSpec) DeepCopy() *TrafficTargetSpec

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

func (*TrafficTargetSpec) DeepCopyInto

func (in *TrafficTargetSpec) DeepCopyInto(out *TrafficTargetSpec)

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