Documentation
¶
Overview ¶
Package v1 defines all of the versioned (v1) definitions of the Smith model. +groupName=smith.atlassian.com
Index ¶
- Constants
- Variables
- func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFuncdeprecated
- func Kind(kind string) schema.GroupKind
- type Bundle
- type BundleCondition
- type BundleConditionType
- type BundleList
- type BundleSpec
- type BundleStatus
- type ConditionStatus
- type PluginName
- type PluginSpec
- type Resource
- type ResourceCondition
- type ResourceConditionType
- type ResourceName
- type ResourceSpec
- type ResourceStatus
Constants ¶
const ( BundleReasonTerminalError = "TerminalError" BundleReasonRetriableError = "RetriableError" )
const ( ResourceReasonDependenciesNotReady = "DependenciesNotReady" ResourceReasonOtherResourceError = "OtherResourceError" ResourceReasonTerminalError = "TerminalError" ResourceReasonRetriableError = "RetriableError" )
const ( BundleResourceSingular = "bundle" BundleResourcePlural = "bundles" BundleResourceVersion = "v1" BundleResourceKind = "Bundle" BundleResourceGroupVersion = smith.GroupName + "/" + BundleResourceVersion BundleResourceName = BundleResourcePlural + "." + smith.GroupName )
Variables ¶
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 )
var BundleGVK = SchemeGroupVersion.WithKind(BundleResourceKind)
var SchemeGroupVersion = schema.GroupVersion{Group: smith.GroupName, Version: "v1"}
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func GetGeneratedDeepCopyFuncs
deprecated
added in
v0.2.0
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc
GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
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
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bundle.
func (*Bundle) DeepCopyInto ¶ added in v0.2.0
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
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Bundle) GetCondition ¶
func (b *Bundle) GetCondition(conditionType BundleConditionType) (int, *BundleCondition)
type BundleCondition ¶
type BundleCondition struct {
// Type of Bundle condition.
Type BundleConditionType `json:"type"`
// Status of the condition.
Status ConditionStatus `json:"status"`
// The last time this condition was updated.
LastUpdateTime meta_v1.Time `json:"lastUpdateTime,omitempty"`
// Last time the condition transitioned from one status to another.
LastTransitionTime meta_v1.Time `json:"lastTransitionTime,omitempty"`
// The reason for the condition's last transition.
Reason string `json:"reason,omitempty"`
// A human readable message indicating details about the transition.
Message string `json:"message,omitempty"`
}
+k8s:deepcopy-gen=true BundleCondition describes the state of a bundle at a certain point.
func (*BundleCondition) DeepCopy ¶ added in v0.2.0
func (in *BundleCondition) DeepCopy() *BundleCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleCondition.
func (*BundleCondition) DeepCopyInto ¶ added in v0.2.0
func (in *BundleCondition) DeepCopyInto(out *BundleCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BundleConditionType ¶
type BundleConditionType string
const ( BundleInProgress BundleConditionType = "InProgress" BundleReady BundleConditionType = "Ready" BundleError BundleConditionType = "Error" )
These are valid conditions of a Bundle.
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 {
Conditions []BundleCondition `json:"conditions,omitempty"`
ResourceStatuses []ResourceStatus `json:"resourceStatuses,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) ShortString ¶
func (bs *BundleStatus) ShortString() string
type ConditionStatus ¶
type ConditionStatus string
const ( ConditionTrue ConditionStatus = "True" ConditionFalse ConditionStatus = "False" ConditionUnknown ConditionStatus = "Unknown" )
These are valid condition statuses. "ConditionTrue" means a resource is in the condition. "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes can't decide if a resource is in the condition or not. In the future, we could add other intermediate conditions, e.g. ConditionDegraded.
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"`
}
PluginSpec holds the specification for a plugin.
func (*PluginSpec) DeepCopy ¶ added in v1.0.0
func (in *PluginSpec) DeepCopy() *PluginSpec
DeepCopy is an 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 Resource ¶
type Resource struct {
// Name of the resource for references.
Name ResourceName `json:"name"`
// Explicit dependencies.
DependsOn []ResourceName `json:"dependsOn,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
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.
func (*Resource) DeepCopyInto ¶ added in v0.2.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceCondition ¶ added in v1.0.0
type ResourceCondition struct {
// Type of Resource condition.
Type ResourceConditionType `json:"type"`
// Status of the condition.
Status ConditionStatus `json:"status"`
// The last time this condition was updated.
LastUpdateTime meta_v1.Time `json:"lastUpdateTime,omitempty"`
// Last time the condition transitioned from one status to another.
LastTransitionTime meta_v1.Time `json:"lastTransitionTime,omitempty"`
// The reason for the condition's last transition.
Reason string `json:"reason,omitempty"`
// A human readable message indicating details about the transition.
Message string `json:"message,omitempty"`
}
+k8s:deepcopy-gen=true ResourceCondition describes the state of a resource at a certain point.
func (*ResourceCondition) DeepCopy ¶ added in v1.0.0
func (in *ResourceCondition) DeepCopy() *ResourceCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceCondition.
func (*ResourceCondition) DeepCopyInto ¶ added in v1.0.0
func (in *ResourceCondition) DeepCopyInto(out *ResourceCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceConditionType ¶ added in v1.0.0
type ResourceConditionType string
const ( ResourceBlocked ResourceConditionType = "Blocked" ResourceInProgress ResourceConditionType = "InProgress" ResourceReady ResourceConditionType = "Ready" ResourceError ResourceConditionType = "Error" )
These are valid conditions of a resource.
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) IntoTyped ¶ added in v1.0.0
func (rs *ResourceSpec) IntoTyped(obj runtime.Object) error
IntoTyped tries to convert resource spec into a typed object passed as obj. It supports objects of the same type and Unstructured. Note that it does not perform a deep copy in case of typed API object. Note that this method may fail if references are used where a non-string value is expected.
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"`
Conditions []ResourceCondition `json:"conditions,omitempty"`
}
+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.
func (*ResourceStatus) GetCondition ¶ added in v1.0.0
func (rs *ResourceStatus) GetCondition(conditionType ResourceConditionType) (int, *ResourceCondition)