v1alpha2

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1alpha2 contains API Schema definitions for the servicemesh v1alpha2 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/fearlesschenc/kubesphere/pkg/apis/servicemesh +k8s:defaulter-gen=TypeMeta +groupName=servicemesh.kubesphere.io

Package v1alpha2 contains API Schema definitions for the servicemesh v1alpha2 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/fearlesschenc/kubesphere/pkg/apis/servicemesh +k8s:defaulter-gen=TypeMeta +groupName=servicemesh.kubesphere.io

Index

Constants

View Source
const (
	ResourceKindServicePolicy     = "ServicePolicy"
	ResourceSingularServicePolicy = "servicepolicy"
	ResourcePluralServicePolicy   = "servicepolicies"
)
View Source
const (
	ResourceKindStrategy     = "Strategy"
	ResourceSingularStrategy = "strategy"
	ResourcePluralStrategy   = "strategies"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "servicemesh.kubesphere.io", Version: "v1alpha2"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme is required by pkg/client/...
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource is required by pkg/client/listers/...

Types

type DestinationRuleSpecTemplate

type DestinationRuleSpecTemplate struct {

	// Metadata of the virtual services created from this template
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec indicates the behavior of a destination rule.
	// +optional
	Spec v1alpha3.DestinationRule `json:"spec,omitempty"`
}

func (*DestinationRuleSpecTemplate) DeepCopy

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

func (*DestinationRuleSpecTemplate) DeepCopyInto

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

type ServicePolicy

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

	Spec   ServicePolicySpec   `json:"spec,omitempty"`
	Status ServicePolicyStatus `json:"status,omitempty"`
}

ServicePolicy is the Schema for the servicepolicies API +k8s:openapi-gen=true

func (*ServicePolicy) DeepCopy

func (in *ServicePolicy) DeepCopy() *ServicePolicy

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

func (*ServicePolicy) DeepCopyInto

func (in *ServicePolicy) DeepCopyInto(out *ServicePolicy)

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

func (*ServicePolicy) DeepCopyObject

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

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

type ServicePolicyCondition

type ServicePolicyCondition struct {
	// Type of strategy condition, Complete or Failed.
	Type ServicePolicyConditionType `json:"type,omitempty"`

	// Status of the condition, one of True, False, Unknown
	Status apiextensions.ConditionStatus `json:"status,omitempty"`

	// Last time the condition was checked.
	// +optional
	LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`

	// Last time the condition transit from one status to another
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// reason for the condition's last transition
	Reason string `json:"reason,omitempty"`

	// Human readable message indicating details about last transition.
	// +optinal
	Message string `json:"message,omitempty"`
}

StrategyCondition describes current state of a strategy.

func (*ServicePolicyCondition) DeepCopy

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

func (*ServicePolicyCondition) DeepCopyInto

func (in *ServicePolicyCondition) DeepCopyInto(out *ServicePolicyCondition)

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

type ServicePolicyConditionType

type ServicePolicyConditionType string
const (
	// StrategyComplete means the strategy has been delivered to istio.
	ServicePolicyComplete ServicePolicyConditionType = "Complete"

	// StrategyFailed means the strategy has failed its delivery to istio.
	ServicePolicyFailed ServicePolicyConditionType = "Failed"
)

These are valid conditions of a strategy.

type ServicePolicyList

type ServicePolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ServicePolicy `json:"items"`
}

ServicePolicyList contains a list of ServicePolicy

func (*ServicePolicyList) DeepCopy

func (in *ServicePolicyList) DeepCopy() *ServicePolicyList

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

func (*ServicePolicyList) DeepCopyInto

func (in *ServicePolicyList) DeepCopyInto(out *ServicePolicyList)

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

func (*ServicePolicyList) DeepCopyObject

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

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

type ServicePolicySpec

type ServicePolicySpec struct {

	// Label selector for destination rules.
	// +optional
	Selector *metav1.LabelSelector `json:"selector,omitempty"`

	// Template used to create a destination rule
	// +optional
	Template DestinationRuleSpecTemplate `json:"template,omitempty"`
}

ServicePolicySpec defines the desired state of ServicePolicy

func (*ServicePolicySpec) DeepCopy

func (in *ServicePolicySpec) DeepCopy() *ServicePolicySpec

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

func (*ServicePolicySpec) DeepCopyInto

func (in *ServicePolicySpec) DeepCopyInto(out *ServicePolicySpec)

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

type ServicePolicyStatus

type ServicePolicyStatus struct {
	// The latest available observations of an object's current state.
	// +optional
	Conditions []ServicePolicyCondition `json:"conditions,omitempty"`

	// Represents time when the strategy was acknowledged by the controller.
	// It is represented in RFC3339 form and is in UTC.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// Represents time when the strategy was completed.
	// It is represented in RFC3339 form and is in UTC.
	// +optional
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`
}

ServicePolicyStatus defines the observed state of ServicePolicy

func (*ServicePolicyStatus) DeepCopy

func (in *ServicePolicyStatus) DeepCopy() *ServicePolicyStatus

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

func (*ServicePolicyStatus) DeepCopyInto

func (in *ServicePolicyStatus) DeepCopyInto(out *ServicePolicyStatus)

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

type Strategy

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

	Spec   StrategySpec   `json:"spec,omitempty"`
	Status StrategyStatus `json:"status,omitempty"`
}

Strategy is the Schema for the strategies API +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type",description="type of strategy" +kubebuilder:printcolumn:name="Hosts",type="string",JSONPath=".spec.template.spec.hosts",description="destination hosts" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata" +k8s:openapi-gen=true

func (*Strategy) DeepCopy

func (in *Strategy) DeepCopy() *Strategy

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

func (*Strategy) DeepCopyInto

func (in *Strategy) DeepCopyInto(out *Strategy)

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

func (*Strategy) DeepCopyObject

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

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

type StrategyCondition

type StrategyCondition struct {
	// Type of strategy condition, Complete or Failed.
	Type StrategyConditionType `json:"type,omitempty"`

	// Status of the condition, one of True, False, Unknown
	Status apiextensions.ConditionStatus `json:"status,omitempty"`

	// Last time the condition was checked.
	// +optional
	LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`

	// Last time the condition transit from one status to another
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// reason for the condition's last transition
	Reason string `json:"reason,omitempty"`

	// Human readable message indicating details about last transition.
	// +optinal
	Message string `json:"message,omitempty"`
}

StrategyCondition describes current state of a strategy.

func (*StrategyCondition) DeepCopy

func (in *StrategyCondition) DeepCopy() *StrategyCondition

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

func (*StrategyCondition) DeepCopyInto

func (in *StrategyCondition) DeepCopyInto(out *StrategyCondition)

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

type StrategyConditionType

type StrategyConditionType string
const (
	// StrategyComplete means the strategy has been delivered to istio.
	StrategyComplete StrategyConditionType = "Complete"

	// StrategyFailed means the strategy has failed its delivery to istio.
	StrategyFailed StrategyConditionType = "Failed"
)

These are valid conditions of a strategy.

type StrategyList

type StrategyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Strategy `json:"items"`
}

StrategyList contains a list of Strategy

func (*StrategyList) DeepCopy

func (in *StrategyList) DeepCopy() *StrategyList

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

func (*StrategyList) DeepCopyInto

func (in *StrategyList) DeepCopyInto(out *StrategyList)

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

func (*StrategyList) DeepCopyObject

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

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

type StrategyPolicy

type StrategyPolicy string
const (
	// apply strategy only until workload is ready
	PolicyWaitForWorkloadReady StrategyPolicy = "WaitForWorkloadReady"

	// apply strategy immediately no matter workload status is
	PolicyImmediately StrategyPolicy = "Immediately"

	// pause strategy
	PolicyPause StrategyPolicy = "Paused"
)

type StrategySpec

type StrategySpec struct {
	// Strategy type
	Type StrategyType `json:"type,omitempty"`

	// Principal version, the one as reference version
	// label version value
	// +optional
	PrincipalVersion string `json:"principal,omitempty"`

	// Governor version, the version takes control of all incoming traffic
	// label version value
	// +optional
	GovernorVersion string `json:"governor,omitempty"`

	// Label selector for virtual services.
	// +optional
	Selector *metav1.LabelSelector `json:"selector,omitempty"`

	// Template describes the virtual service that will be created.
	Template VirtualServiceTemplateSpec `json:"template,omitempty"`

	// strategy policy, how the strategy will be applied
	// by the strategy controller
	StrategyPolicy StrategyPolicy `json:"strategyPolicy,omitempty"`
}

StrategySpec defines the desired state of Strategy

func (*StrategySpec) DeepCopy

func (in *StrategySpec) DeepCopy() *StrategySpec

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

func (*StrategySpec) DeepCopyInto

func (in *StrategySpec) DeepCopyInto(out *StrategySpec)

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

type StrategyStatus

type StrategyStatus struct {

	// The latest available observations of an object's current state.
	// +optional
	Conditions []StrategyCondition `json:"conditions,omitempty"`

	// Represents time when the strategy was acknowledged by the controller.
	// It is represented in RFC3339 form and is in UTC.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// Represents time when the strategy was completed.
	// It is represented in RFC3339 form and is in UTC.
	// +optional
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`
}

StrategyStatus defines the observed state of Strategy

func (*StrategyStatus) DeepCopy

func (in *StrategyStatus) DeepCopy() *StrategyStatus

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

func (*StrategyStatus) DeepCopyInto

func (in *StrategyStatus) DeepCopyInto(out *StrategyStatus)

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

type StrategyType

type StrategyType string
const (
	// Canary strategy type
	CanaryType StrategyType = "Canary"

	// BlueGreen strategy type
	BlueGreenType StrategyType = "BlueGreen"

	// Mirror strategy type
	Mirror StrategyType = "Mirror"
)

type VirtualServiceTemplateSpec

type VirtualServiceTemplateSpec struct {

	// Metadata of the virtual services created from this template
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec indicates the behavior of a virtual service.
	// +optional
	Spec v1alpha3.VirtualService `json:"spec,omitempty"`
}

VirtualServiceTemplateSpec

func (*VirtualServiceTemplateSpec) DeepCopy

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

func (*VirtualServiceTemplateSpec) DeepCopyInto

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