v1alpha1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1alpha1 contains resources relating to Crossplane Stacks. +kubebuilder:object:generate=true +groupName=stacks.crossplane.io +versionName=v1alpha1

Index

Constants

View Source
const (
	Group   = "stacks.crossplane.io"
	Version = "v1alpha1"
)

Package type metadata.

Variables

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

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)
View Source
var (
	StackInstallKind             = reflect.TypeOf(StackInstall{}).Name()
	StackInstallKindAPIVersion   = StackInstallKind + "." + SchemeGroupVersion.String()
	StackInstallGroupVersionKind = SchemeGroupVersion.WithKind(StackInstallKind)
)

StackInstall type metadata.

View Source
var (
	ClusterStackInstallKind             = reflect.TypeOf(ClusterStackInstall{}).Name()
	ClusterStackInstallKindAPIVersion   = ClusterStackInstallKind + "." + SchemeGroupVersion.String()
	ClusterStackInstallGroupVersionKind = SchemeGroupVersion.WithKind(ClusterStackInstallKind)
)

ClusterStackInstall type metadata.

View Source
var (
	StackKind             = reflect.TypeOf(Stack{}).Name()
	StackKindAPIVersion   = StackKind + "." + SchemeGroupVersion.String()
	StackGroupVersionKind = SchemeGroupVersion.WithKind(StackKind)
)

Stack type metadata.

Functions

This section is empty.

Types

type AppMetadataSpec

type AppMetadataSpec struct {
	Title         string            `json:"title,omitempty"`
	OverviewShort string            `json:"overviewShort,omitempty"`
	Overview      string            `json:"overview,omitempty"`
	Readme        string            `json:"readme,omitempty"`
	Version       string            `json:"version,omitempty"`
	Icons         []IconSpec        `json:"icons,omitempty"`
	Maintainers   []ContributorSpec `json:"maintainers,omitempty"`
	Owners        []ContributorSpec `json:"owners,omitempty"`
	Company       string            `json:"company,omitempty"`
	Category      string            `json:"category,omitempty"`
	Keywords      []string          `json:"keywords,omitempty"`
	Website       string            `json:"website,omitempty"`
	Source        string            `json:"source,omitempty"`
	License       string            `json:"license,omitempty"`

	// DependsOn is the list of CRDs that this stack depends on. This data drives the
	// dependency resolution process.
	DependsOn []StackInstallSpec `json:"dependsOn,omitempty"`

	// +kubebuilder:validation:Enum=Cluster;Namespaced
	PermissionScope string `json:"permissionScope,omitempty"`
}

AppMetadataSpec defines metadata about the stack application

func (*AppMetadataSpec) DeepCopy

func (in *AppMetadataSpec) DeepCopy() *AppMetadataSpec

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

func (*AppMetadataSpec) DeepCopyInto

func (in *AppMetadataSpec) DeepCopyInto(out *AppMetadataSpec)

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

type CRDList

type CRDList []metav1.TypeMeta

CRDList is the full list of CRDs that this stack owns and depends on

func NewCRDList

func NewCRDList() CRDList

NewCRDList creates a new CRDList with its members initialized.

func (CRDList) DeepCopy

func (in CRDList) DeepCopy() CRDList

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

func (CRDList) DeepCopyInto

func (in CRDList) DeepCopyInto(out *CRDList)

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

type ClusterStackInstall

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

	Spec   StackInstallSpec   `json:"spec,omitempty"`
	Status StackInstallStatus `json:"status,omitempty"`
}

ClusterStackInstall is the CRD type for a request to add a stack to Crossplane. +kubebuilder:subresource:status +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditionedStatus.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="SOURCE",type="string",JSONPath=".spec.source" +kubebuilder:printcolumn:name="PACKAGE",type="string",JSONPath=".spec.package" +kubebuilder:printcolumn:name="CRD",type="string",JSONPath=".spec.crd" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

func (*ClusterStackInstall) DeepCopy

func (in *ClusterStackInstall) DeepCopy() *ClusterStackInstall

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

func (*ClusterStackInstall) DeepCopyInto

func (in *ClusterStackInstall) DeepCopyInto(out *ClusterStackInstall)

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

func (*ClusterStackInstall) DeepCopyObject

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

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

func (*ClusterStackInstall) GroupVersionKind

func (si *ClusterStackInstall) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind gets the GroupVersionKind of the ClusterStackInstall

func (*ClusterStackInstall) Image

func (si *ClusterStackInstall) Image() string

Image gets the Spec.Image of the ClusterStackInstall

func (*ClusterStackInstall) InstallJob

func (si *ClusterStackInstall) InstallJob() *corev1.ObjectReference

InstallJob gets the ClusterStackInstall's Status InstallJob

func (*ClusterStackInstall) PermissionScope

func (si *ClusterStackInstall) PermissionScope() string

PermissionScope gets the required app.yaml permissionScope value ("Cluster") for ClusterStackInstall

func (*ClusterStackInstall) SetConditions

func (si *ClusterStackInstall) SetConditions(c ...runtimev1alpha1.Condition)

SetConditions sets the ClusterStackInstall's Status conditions

func (*ClusterStackInstall) SetInstallJob

func (si *ClusterStackInstall) SetInstallJob(job *corev1.ObjectReference)

SetInstallJob sets the ClusterStackInstall's Status InstallJob

func (*ClusterStackInstall) SetStackRecord

func (si *ClusterStackInstall) SetStackRecord(job *corev1.ObjectReference)

SetStackRecord sets the ClusterStackInstall's Status StackRecord

func (*ClusterStackInstall) StackRecord

func (si *ClusterStackInstall) StackRecord() *corev1.ObjectReference

StackRecord gets the ClusterStackInstall's Status StackRecord

type ClusterStackInstallList

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

ClusterStackInstallList contains a list of StackInstall

func (*ClusterStackInstallList) DeepCopy

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

func (*ClusterStackInstallList) DeepCopyInto

func (in *ClusterStackInstallList) DeepCopyInto(out *ClusterStackInstallList)

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

func (*ClusterStackInstallList) DeepCopyObject

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

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

type ContributorSpec

type ContributorSpec struct {
	Name  string `json:"name,omitempty"`
	Email string `json:"email,omitempty"`
}

ContributorSpec defines a contributor for a stack (e.g., maintainer, owner, etc.)

func (*ContributorSpec) DeepCopy

func (in *ContributorSpec) DeepCopy() *ContributorSpec

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

func (*ContributorSpec) DeepCopyInto

func (in *ContributorSpec) DeepCopyInto(out *ContributorSpec)

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

type ControllerDeployment

type ControllerDeployment struct {
	Name string              `json:"name"`
	Spec apps.DeploymentSpec `json:"spec"`
}

ControllerDeployment defines a controller for a stack that is managed by a Deployment.

func (*ControllerDeployment) DeepCopy

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

func (*ControllerDeployment) DeepCopyInto

func (in *ControllerDeployment) DeepCopyInto(out *ControllerDeployment)

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

type ControllerJob

type ControllerJob struct {
	Name string        `json:"name"`
	Spec batch.JobSpec `json:"spec"`
}

ControllerJob defines a controller for a stack that is installed by a Job.

func (*ControllerJob) DeepCopy

func (in *ControllerJob) DeepCopy() *ControllerJob

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

func (*ControllerJob) DeepCopyInto

func (in *ControllerJob) DeepCopyInto(out *ControllerJob)

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

type ControllerSpec

type ControllerSpec struct {
	Deployment *ControllerDeployment `json:"deployment,omitempty"`
	Job        *ControllerJob        `json:"job,omitempty"`
}

ControllerSpec defines the controller that implements the logic for a stack, which can come in different flavors. A golang code (controller-runtime) controller with a managing Deployment is all that is supported currently, but more types will come in the future (e.g., templates, functions/hooks, templates, a new DSL, etc.

func (*ControllerSpec) DeepCopy

func (in *ControllerSpec) DeepCopy() *ControllerSpec

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

func (*ControllerSpec) DeepCopyInto

func (in *ControllerSpec) DeepCopyInto(out *ControllerSpec)

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

type IconSpec

type IconSpec struct {
	Base64IconData string `json:"base64Data"`
	MediaType      string `json:"mediatype"`
}

IconSpec defines the icon for a stack

func (*IconSpec) DeepCopy

func (in *IconSpec) DeepCopy() *IconSpec

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

func (*IconSpec) DeepCopyInto

func (in *IconSpec) DeepCopyInto(out *IconSpec)

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

type PermissionsSpec

type PermissionsSpec struct {
	Rules []rbac.PolicyRule `json:"rules,omitempty"`
}

PermissionsSpec defines the permissions that a stack will require to operate.

func (*PermissionsSpec) DeepCopy

func (in *PermissionsSpec) DeepCopy() *PermissionsSpec

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

func (*PermissionsSpec) DeepCopyInto

func (in *PermissionsSpec) DeepCopyInto(out *PermissionsSpec)

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

type Stack

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

	Spec   StackSpec   `json:"spec,omitempty"`
	Status StackStatus `json:"status,omitempty"`
}

A Stack that has been added to Crossplane. +kubebuilder:subresource:status +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditionedStatus.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="VERSION",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

func (*Stack) DeepCopy

func (in *Stack) DeepCopy() *Stack

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

func (*Stack) DeepCopyInto

func (in *Stack) DeepCopyInto(out *Stack)

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

func (*Stack) DeepCopyObject

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

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

type StackInstall

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

	Spec   StackInstallSpec   `json:"spec,omitempty"`
	Status StackInstallStatus `json:"status,omitempty"`
}

A StackInstall requests a stack be installed to Crossplane. +kubebuilder:subresource:status +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditionedStatus.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="SOURCE",type="string",JSONPath=".spec.source" +kubebuilder:printcolumn:name="PACKAGE",type="string",JSONPath=".spec.package" +kubebuilder:printcolumn:name="CRD",type="string",JSONPath=".spec.crd" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

func (*StackInstall) DeepCopy

func (in *StackInstall) DeepCopy() *StackInstall

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

func (*StackInstall) DeepCopyInto

func (in *StackInstall) DeepCopyInto(out *StackInstall)

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

func (*StackInstall) DeepCopyObject

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

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

func (*StackInstall) GroupVersionKind

func (si *StackInstall) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind gets the GroupVersionKind of the StackInstall

func (*StackInstall) Image

func (si *StackInstall) Image() string

Image gets the Spec.Image of the StackInstall

func (*StackInstall) InstallJob

func (si *StackInstall) InstallJob() *corev1.ObjectReference

InstallJob gets the StackInstall's Status InstallJob

func (*StackInstall) PermissionScope

func (si *StackInstall) PermissionScope() string

PermissionScope gets the required app.yaml permissionScope value ("Namespaced") for StackInstall

func (*StackInstall) SetConditions

func (si *StackInstall) SetConditions(c ...runtimev1alpha1.Condition)

SetConditions sets the StackInstall's Status conditions

func (*StackInstall) SetInstallJob

func (si *StackInstall) SetInstallJob(job *corev1.ObjectReference)

SetInstallJob sets the StackInstall's Status InstallJob

func (*StackInstall) SetStackRecord

func (si *StackInstall) SetStackRecord(job *corev1.ObjectReference)

SetStackRecord sets the StackInstall's Status StackRecord

func (*StackInstall) StackRecord

func (si *StackInstall) StackRecord() *corev1.ObjectReference

StackRecord gets the StackInstall's Status StackRecord

type StackInstallList

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

StackInstallList contains a list of StackInstall.

func (*StackInstallList) DeepCopy

func (in *StackInstallList) DeepCopy() *StackInstallList

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

func (*StackInstallList) DeepCopyInto

func (in *StackInstallList) DeepCopyInto(out *StackInstallList)

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

func (*StackInstallList) DeepCopyObject

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

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

type StackInstallSpec

type StackInstallSpec struct {
	// Source is the domain name for the stack registry hosting the stack being requested,
	// e.g., registry.crossplane.io
	Source string `json:"source,omitempty"`

	// Package is the name of the stack package that is being requested, e.g., myapp.
	// Either Package or CustomResourceDefinition can be specified.
	Package string `json:"package,omitempty"`

	// CustomResourceDefinition is the full name of a CRD that is owned by the stack being
	// requested. This can be a convenient way of installing a stack when the desired
	// CRD is known, but the package name that contains it is not known.
	// Either Package or CustomResourceDefinition can be specified.
	CustomResourceDefinition string `json:"crd,omitempty"`
}

StackInstallSpec specifies details about a request to install a stack to Crossplane.

func (*StackInstallSpec) DeepCopy

func (in *StackInstallSpec) DeepCopy() *StackInstallSpec

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

func (*StackInstallSpec) DeepCopyInto

func (in *StackInstallSpec) DeepCopyInto(out *StackInstallSpec)

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

func (StackInstallSpec) Image

func (spec StackInstallSpec) Image() string

Image returns the fully qualified image name for the StackInstallSpec. based on the fully qualified image name format of hostname[:port]/username/reponame[:tag]

type StackInstallStatus

type StackInstallStatus struct {
	runtimev1alpha1.ConditionedStatus `json:"conditionedStatus,omitempty"`

	InstallJob  *corev1.ObjectReference `json:"installJob,omitempty"`
	StackRecord *corev1.ObjectReference `json:"stackRecord,omitempty"`
}

StackInstallStatus represents the observed state of a StackInstall.

func (*StackInstallStatus) DeepCopy

func (in *StackInstallStatus) DeepCopy() *StackInstallStatus

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

func (*StackInstallStatus) DeepCopyInto

func (in *StackInstallStatus) DeepCopyInto(out *StackInstallStatus)

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

type StackInstaller

type StackInstaller interface {
	metav1.Object
	runtime.Object

	Image() string
	PermissionScope() string
	SetConditions(c ...runtimev1alpha1.Condition)
	InstallJob() *corev1.ObjectReference
	SetInstallJob(*corev1.ObjectReference)
	StackRecord() *corev1.ObjectReference
	SetStackRecord(*corev1.ObjectReference)
	GroupVersionKind() schema.GroupVersionKind
}

StackInstaller provides a common interface for StackInstall and ClusterStackInstall to share controller and reconciler logic

type StackList

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

StackList contains a list of Stack.

func (*StackList) DeepCopy

func (in *StackList) DeepCopy() *StackList

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

func (*StackList) DeepCopyInto

func (in *StackList) DeepCopyInto(out *StackList)

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

func (*StackList) DeepCopyObject

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

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

type StackSpec

type StackSpec struct {
	AppMetadataSpec `json:",inline"`
	CRDs            CRDList         `json:"customresourcedefinitions,omitempty"`
	Controller      ControllerSpec  `json:"controller,omitempty"`
	Permissions     PermissionsSpec `json:"permissions,omitempty"`
}

StackSpec specifies the desired state of a Stack.

func (*StackSpec) DeepCopy

func (in *StackSpec) DeepCopy() *StackSpec

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

func (*StackSpec) DeepCopyInto

func (in *StackSpec) DeepCopyInto(out *StackSpec)

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

type StackStatus

type StackStatus struct {
	runtimev1alpha1.ConditionedStatus `json:"conditionedStatus,omitempty"`
	ControllerRef                     *corev1.ObjectReference `json:"controllerRef,omitempty"`
}

StackStatus represents the observed state of a Stack.

func (*StackStatus) DeepCopy

func (in *StackStatus) DeepCopy() *StackStatus

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

func (*StackStatus) DeepCopyInto

func (in *StackStatus) DeepCopyInto(out *StackStatus)

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