v1

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1 defines all of the versioned (v1) definitions of the Smith model. +groupName=smith.atlassian.com

Index

Constants

View Source
const (
	BundleInProgress = cond_v1.ConditionInProgress
	BundleReady      = cond_v1.ConditionReady
	BundleError      = cond_v1.ConditionError
)

These are valid conditions of a Bundle.

View Source
const (
	BundleReasonTerminalError  = "TerminalError"
	BundleReasonRetriableError = "RetriableError"
)
View Source
const (
	ResourceBlocked    cond_v1.ConditionType = "Blocked"
	ResourceInProgress                       = cond_v1.ConditionInProgress
	ResourceReady                            = cond_v1.ConditionReady
	ResourceError                            = cond_v1.ConditionError
)

These are valid conditions of a resource.

View Source
const (
	ResourceReasonDependenciesNotReady = "DependenciesNotReady"

	ResourceReasonTerminalError  = "TerminalError"
	ResourceReasonRetriableError = "RetriableError"
)
View Source
const (
	BundleResourceSingular = "bundle"
	BundleResourcePlural   = "bundles"
	BundleResourceVersion  = "v1"
	BundleResourceKind     = "Bundle"

	BundleResourceGroupVersion = smith.GroupName + "/" + BundleResourceVersion

	BundleResourceName = BundleResourcePlural + "." + smith.GroupName

	ReferenceModifierBindSecret = "bindsecret"
)

Variables

View Source
var (
	// SchemeBuilder needs to be exported as `SchemeBuilder` so
	// the code-generation can find it.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is exposed for API installation
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: smith.GroupName, Version: BundleResourceVersion}

SchemeGroupVersion is group version used to register these objects.

Functions

func Kind

func Kind(kind string) schema.GroupKind

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

Types

type Bundle

type Bundle struct {
	meta_v1.TypeMeta `json:",inline"`

	// Standard object metadata
	meta_v1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the specification of the desired behavior of the Bundle.
	Spec BundleSpec `json:"spec,omitempty"`

	// Status is most recently observed status of the Bundle.
	Status BundleStatus `json:"status,omitempty"`
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object Bundle describes a resources bundle.

func (*Bundle) DeepCopy added in v0.2.0

func (in *Bundle) DeepCopy() *Bundle

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

func (*Bundle) DeepCopyInto added in v0.2.0

func (in *Bundle) DeepCopyInto(out *Bundle)

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

func (*Bundle) DeepCopyObject added in v0.2.0

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

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

type BundleList

type BundleList struct {
	meta_v1.TypeMeta `json:",inline"`
	// Standard list metadata.
	meta_v1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of bundles.
	Items []Bundle `json:"items"`
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*BundleList) DeepCopy added in v0.2.0

func (in *BundleList) DeepCopy() *BundleList

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

func (*BundleList) DeepCopyInto added in v0.2.0

func (in *BundleList) DeepCopyInto(out *BundleList)

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

func (*BundleList) DeepCopyObject added in v0.2.0

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

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

type BundleSpec

type BundleSpec struct {
	Resources []Resource `json:"resources"`
}

+k8s:deepcopy-gen=true

func (*BundleSpec) DeepCopy added in v0.2.0

func (in *BundleSpec) DeepCopy() *BundleSpec

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

func (*BundleSpec) DeepCopyInto added in v0.2.0

func (in *BundleSpec) DeepCopyInto(out *BundleSpec)

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

type BundleStatus

type BundleStatus struct {
	// ObservedGeneration is the most recent generation observed for this Bundle. It corresponds to the
	// Bundle's generation, which is updated on mutation by the API Server.
	ObservedGeneration int64               `json:"observedGeneration,omitempty"`
	Conditions         []cond_v1.Condition `json:"conditions,omitempty"`
	ResourceStatuses   []ResourceStatus    `json:"resourceStatuses,omitempty"`
	ObjectsToDelete    []ObjectToDelete    `json:"objectsToDelete,omitempty"`
	// PluginStatuses is a list of statuses for Smith plugins used in the Bundle.
	PluginStatuses []PluginStatus `json:"pluginStatuses,omitempty"`
}

+k8s:deepcopy-gen=true BundleStatus represents the latest available observations of a Bundle's current state.

func (*BundleStatus) DeepCopy added in v0.2.0

func (in *BundleStatus) DeepCopy() *BundleStatus

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

func (*BundleStatus) DeepCopyInto added in v0.2.0

func (in *BundleStatus) DeepCopyInto(out *BundleStatus)

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

func (*BundleStatus) GetResourceStatus added in v1.0.0

func (bs *BundleStatus) GetResourceStatus(resName ResourceName) (int, *ResourceStatus)

func (*BundleStatus) String

func (bs *BundleStatus) String() string

type ObjectToDelete

type ObjectToDelete struct {
	Group   string `json:"group"`
	Version string `json:"version"`
	Kind    string `json:"kind"`
	// Name of the object.
	Name string `json:"name"`
}

type PluginName added in v1.0.0

type PluginName string

PluginName is a name of a plugin to be invoked.

type PluginSpec added in v1.0.0

type PluginSpec struct {
	Name       PluginName             `json:"name"`
	ObjectName string                 `json:"objectName"`
	Spec       map[string]interface{} `json:"spec,omitempty"`
}

+k8s:deepcopy-gen=true PluginSpec holds the specification for a plugin.

func (*PluginSpec) DeepCopy added in v1.0.0

func (in *PluginSpec) DeepCopy() *PluginSpec

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

func (*PluginSpec) DeepCopyInto added in v1.0.0

func (in *PluginSpec) DeepCopyInto(out *PluginSpec)

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

type PluginStatus

type PluginStatus struct {
	Name    PluginName      `json:"name"`
	Group   string          `json:"group"`
	Version string          `json:"version"`
	Kind    string          `json:"kind"`
	Status  PluginStatusStr `json:"status,omitempty"`
}

type PluginStatusStr

type PluginStatusStr string
const (
	PluginStatusOk           PluginStatusStr = "Ok"
	PluginStatusNoSuchPlugin PluginStatusStr = "NoSuchPlugin"
)

type Reference

type Reference struct {
	Name     ReferenceName `json:"name,omitempty"`
	Resource ResourceName  `json:"resource"`
	Path     string        `json:"path,omitempty"`
	Example  interface{}   `json:"example,omitempty"`
	Modifier string        `json:"modifier,omitempty"`
}

+k8s:deepcopy-gen=true Refer to a part of another object

func (*Reference) DeepCopy

func (in *Reference) DeepCopy() *Reference

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

func (*Reference) DeepCopyInto

func (in *Reference) DeepCopyInto(out *Reference)

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

func (*Reference) Ref

func (in *Reference) Ref() string

Ref returns string representation of the reference that can be used to pull in the referred entity.

type ReferenceName

type ReferenceName string

ReferenceName is a the name of a reference which can be used inside a resource.

type Resource

type Resource struct {
	// Name of the resource for references.
	Name ResourceName `json:"name"`

	// Explicit dependencies.
	References []Reference `json:"references,omitempty"`

	Spec ResourceSpec `json:"spec"`
}

+k8s:deepcopy-gen=true Resource describes an object that should be provisioned.

func (*Resource) DeepCopy added in v0.2.0

func (in *Resource) DeepCopy() *Resource

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

func (*Resource) DeepCopyInto added in v0.2.0

func (in *Resource) DeepCopyInto(out *Resource)

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

type ResourceName

type ResourceName string

ResourceName is a reference to another Resource in the same bundle.

type ResourceSpec added in v1.0.0

type ResourceSpec struct {
	Object runtime.Object `json:"object,omitempty"`
	Plugin *PluginSpec    `json:"plugin,omitempty"`
}

+k8s:deepcopy-gen=true ResourceSpec is a union type - either object of plugin can be specified.

func (*ResourceSpec) DeepCopy added in v1.0.0

func (in *ResourceSpec) DeepCopy() *ResourceSpec

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

func (*ResourceSpec) DeepCopyInto added in v1.0.0

func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)

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

func (*ResourceSpec) UnmarshalJSON added in v1.0.0

func (rs *ResourceSpec) UnmarshalJSON(data []byte) error

type ResourceStatus added in v1.0.0

type ResourceStatus struct {
	Name               ResourceName `json:"name"`
	ResourceStatusData `json:",inline"`
}

+k8s:deepcopy-gen=true

func (*ResourceStatus) DeepCopy added in v1.0.0

func (in *ResourceStatus) DeepCopy() *ResourceStatus

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

func (*ResourceStatus) DeepCopyInto added in v1.0.0

func (in *ResourceStatus) DeepCopyInto(out *ResourceStatus)

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

type ResourceStatusData

type ResourceStatusData struct {
	Conditions []cond_v1.Condition `json:"conditions,omitempty"`
}

+k8s:deepcopy-gen=true

func (*ResourceStatusData) DeepCopy

func (in *ResourceStatusData) DeepCopy() *ResourceStatusData

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

func (*ResourceStatusData) DeepCopyInto

func (in *ResourceStatusData) DeepCopyInto(out *ResourceStatusData)

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