common

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 3 Imported by: 10

Documentation

Overview

Package common contains types required for both v1alpha2 and v1beta1 +kubebuilder:object:generate=true

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppStatus

type AppStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	v1alpha1.RolloutStatus `json:",inline"`

	Phase ApplicationPhase `json:"status,omitempty"`

	// Components record the related Components created by Application Controller
	Components []v1alpha12.TypedReference `json:"components,omitempty"`

	// Services record the status of the application services
	Services []ApplicationComponentStatus `json:"services,omitempty"`

	// LatestRevision of the application configuration it generates
	// +optional
	LatestRevision *Revision `json:"latestRevision,omitempty"`
}

AppStatus defines the observed state of Application

func (*AppStatus) DeepCopy

func (in *AppStatus) DeepCopy() *AppStatus

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

func (*AppStatus) DeepCopyInto

func (in *AppStatus) DeepCopyInto(out *AppStatus)

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

type ApplicationComponentStatus

type ApplicationComponentStatus struct {
	Name    string                   `json:"name"`
	Healthy bool                     `json:"healthy"`
	Message string                   `json:"message,omitempty"`
	Traits  []ApplicationTraitStatus `json:"traits,omitempty"`
}

ApplicationComponentStatus record the health status of App component

func (*ApplicationComponentStatus) DeepCopy

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

func (*ApplicationComponentStatus) DeepCopyInto

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

type ApplicationPhase

type ApplicationPhase string

ApplicationPhase is a label for the condition of a application at the current time

const (
	// ApplicationRollingOut means the app is in the middle of rolling out
	ApplicationRollingOut ApplicationPhase = "rollingOut"
	// ApplicationRendering means the app is rendering
	ApplicationRendering ApplicationPhase = "rendering"
	// ApplicationRunning means the app finished rendering and applied result to the cluster
	ApplicationRunning ApplicationPhase = "running"
	// ApplicationHealthChecking means the app finished rendering and applied result to the cluster, but still unhealthy
	ApplicationHealthChecking ApplicationPhase = "healthChecking"
)

type ApplicationTraitStatus

type ApplicationTraitStatus struct {
	Type    string `json:"type"`
	Healthy bool   `json:"healthy"`
	Message string `json:"message,omitempty"`
}

ApplicationTraitStatus records the trait health status

func (*ApplicationTraitStatus) DeepCopy

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

func (*ApplicationTraitStatus) DeepCopyInto

func (in *ApplicationTraitStatus) DeepCopyInto(out *ApplicationTraitStatus)

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

type CUE

type CUE struct {
	// Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field.
	// Template is a required field if CUE is defined in Capability Definition.
	Template string `json:"template"`
}

CUE defines the encapsulation in CUE format

func (*CUE) DeepCopy

func (in *CUE) DeepCopy() *CUE

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

func (*CUE) DeepCopyInto

func (in *CUE) DeepCopyInto(out *CUE)

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

type ChildResourceKind

type ChildResourceKind struct {
	// APIVersion of the child resource
	APIVersion string `json:"apiVersion"`

	// Kind of the child resource
	Kind string `json:"kind"`

	// Selector to select the child resources that the workload wants to expose to traits
	Selector map[string]string `json:"selector,omitempty"`
}

A ChildResourceKind defines a child Kubernetes resource kind with a selector

func (*ChildResourceKind) DeepCopy

func (in *ChildResourceKind) DeepCopy() *ChildResourceKind

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

func (*ChildResourceKind) DeepCopyInto

func (in *ChildResourceKind) DeepCopyInto(out *ChildResourceKind)

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

type DefinitionReference

type DefinitionReference struct {
	// Name of the referenced CustomResourceDefinition.
	Name string `json:"name"`

	// Version indicate which version should be used if CRD has multiple versions
	// by default it will use the first one if not specified
	Version string `json:"version,omitempty"`
}

A DefinitionReference refers to a CustomResourceDefinition by name.

func (*DefinitionReference) DeepCopy

func (in *DefinitionReference) DeepCopy() *DefinitionReference

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

func (*DefinitionReference) DeepCopyInto

func (in *DefinitionReference) DeepCopyInto(out *DefinitionReference)

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

type Helm

type Helm struct {
	// Release records a Helm release used by a Helm module workload.
	// +kubebuilder:pruning:PreserveUnknownFields
	Release runtime.RawExtension `json:"release"`

	// HelmRelease records a Helm repository used by a Helm module workload.
	// +kubebuilder:pruning:PreserveUnknownFields
	Repository runtime.RawExtension `json:"repository"`
}

A Helm represents resources used by a Helm module

func (*Helm) DeepCopy

func (in *Helm) DeepCopy() *Helm

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

func (*Helm) DeepCopyInto

func (in *Helm) DeepCopyInto(out *Helm)

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

type RawComponent

type RawComponent struct {
	// +kubebuilder:validation:EmbeddedResource
	// +kubebuilder:pruning:PreserveUnknownFields
	Raw runtime.RawExtension `json:"raw"`
}

RawComponent record raw component

func (*RawComponent) DeepCopy

func (in *RawComponent) DeepCopy() *RawComponent

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

func (*RawComponent) DeepCopyInto

func (in *RawComponent) DeepCopyInto(out *RawComponent)

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

type Revision

type Revision struct {
	Name     string `json:"name"`
	Revision int64  `json:"revision"`

	// RevisionHash record the hash value of the spec of ApplicationRevision object.
	RevisionHash string `json:"revisionHash,omitempty"`
}

Revision has name and revision number

func (*Revision) DeepCopy

func (in *Revision) DeepCopy() *Revision

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

func (*Revision) DeepCopyInto

func (in *Revision) DeepCopyInto(out *Revision)

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

type Schematic

type Schematic struct {
	CUE *CUE `json:"cue,omitempty"`

	HELM *Helm `json:"helm,omitempty"`
}

Schematic defines the encapsulation of this capability(workload/trait/scope), the encapsulation can be defined in different ways, e.g. CUE/HCL(terraform)/KUBE(K8s Object)/HELM, etc...

func (*Schematic) DeepCopy

func (in *Schematic) DeepCopy() *Schematic

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

func (*Schematic) DeepCopyInto

func (in *Schematic) DeepCopyInto(out *Schematic)

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

type Status

type Status struct {
	// CustomStatus defines the custom status message that could display to user
	// +optional
	CustomStatus string `json:"customStatus,omitempty"`
	// HealthPolicy defines the health check policy for the abstraction
	// +optional
	HealthPolicy string `json:"healthPolicy,omitempty"`
}

Status defines the loop back status of the abstraction by using CUE template

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

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

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

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

type WorkloadGVK

type WorkloadGVK struct {
	APIVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
}

WorkloadGVK refer to a Workload Type

func (*WorkloadGVK) DeepCopy

func (in *WorkloadGVK) DeepCopy() *WorkloadGVK

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

func (*WorkloadGVK) DeepCopyInto

func (in *WorkloadGVK) DeepCopyInto(out *WorkloadGVK)

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

type WorkloadTypeDescriptor

type WorkloadTypeDescriptor struct {
	// Type ref to a WorkloadDefinition via name
	Type string `json:"type,omitempty"`
	// Definition mutually exclusive to workload.type, a embedded WorkloadDefinition
	Definition WorkloadGVK `json:"definition,omitempty"`
}

A WorkloadTypeDescriptor refer to a Workload Type

func (*WorkloadTypeDescriptor) DeepCopy

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

func (*WorkloadTypeDescriptor) DeepCopyInto

func (in *WorkloadTypeDescriptor) DeepCopyInto(out *WorkloadTypeDescriptor)

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