Documentation ¶
Overview ¶
Package v1alpha1 represents the v1alpha1 version of the Cluster Bundle API. +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=bundle.gke.io
Index ¶
- Constants
- Variables
- func CreateName(inName, version string) string
- func Resource(resource string) schema.GroupResource
- type Bundle
- type ComponentPackage
- type ComponentPackageList
- type ComponentPackageSpec
- type ComponentReference
- type ComponentSet
- type ComponentSetList
- type ComponentSetSpec
- type File
- type FileGroup
- type Identifier
- type InlineType
Constants ¶
const GroupName = "bundle.gke.io"
GroupName specifies the group name used to register the objects.
Variables ¶
var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder // Depreciated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme )
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
func CreateName ¶ added in v0.6.0
CreateName creates a name string to be used for ObjectMeta.Name. It is used to create standarized names for ComponentPackages and ComponentSets. It assumes that the inName and version fields already conform to naming requirements as discussed in: k8s.io/docs/concepts/overview/working-with-objects/names/
func Resource ¶ added in v0.5.0
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Bundle ¶ added in v0.6.0
type Bundle struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // SetName is the human-readable string for this set of components. It // must only contain lower case alphanumerics, periods, and dashes. See more // details at k8s.io/docs/concepts/overview/working-with-objects/names/ SetName string `json:"setName,omitempty"` // Version is the required version string for this component set and should // have the form X.Y.Z (Major.Minor.Patch). Generally speaking, major-version // changes should indicate breaking changes, minor-versions should indicate // backwards compatible features, and patch changes should indicate backwords // compatible. If there are any changes to the bundle, then the version // string must be incremented. Version string `json:"version,omitempty"` // ComponentFiles reference ComponentPackage files. The component files can // be inlined as directly included components (see `Components` below). ComponentFiles []File `json:"componentFiles,omitempty"` // Components are ComponentPackages are files that are inlined. The // components must be unique based on the combination of ComponentName + // Version. Components []*ComponentPackage `json:"components,omitempty"` }
Bundle encapsulates component data, which can be used for build systems, release automation, libraries, and tooling. It is not intended for building controllers or even applying directly to clusters, and as such, is intentionally designed with and spec/status fields and without a generated client library.
func (*Bundle) ComponentSet ¶ added in v0.6.1
func (b *Bundle) ComponentSet() *ComponentSet
ComponentSet creates a ComponentSet from a Bundle. Only components that are inlined into the Bundle are considered for the purposes of ComponentSet creation.
func (*Bundle) DeepCopy ¶ added in v0.6.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bundle.
func (*Bundle) DeepCopyInto ¶ added in v0.6.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Bundle) DeepCopyObject ¶ added in v0.6.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Bundle) MakeAndSetAllNames ¶ added in v0.6.0
func (b *Bundle) MakeAndSetAllNames()
MakeAndSetAllNames constructs the metadata.name for the Bundle and all the child inlined components.
func (*Bundle) MakeAndSetName ¶ added in v0.6.0
func (b *Bundle) MakeAndSetName()
MakeAndSetName constructs the name from the Bundle's SetName and Version and stores the result in metadata.name.
type ComponentPackage ¶ added in v0.4.0
type ComponentPackage struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // The specification object for the ComponentPackage. Spec ComponentPackageSpec `json:"spec,omitempty"` }
ComponentPackage represents Kubernetes objects grouped into components and versioned together. These could be applications or they could be some sort of supporting collection of objects.
func (*ComponentPackage) ComponentReference ¶ added in v0.6.1
func (c *ComponentPackage) ComponentReference() ComponentReference
ComponentReference creates a ComponentReference from a component.
func (*ComponentPackage) DeepCopy ¶ added in v0.5.0
func (in *ComponentPackage) DeepCopy() *ComponentPackage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentPackage.
func (*ComponentPackage) DeepCopyInto ¶ added in v0.5.0
func (in *ComponentPackage) DeepCopyInto(out *ComponentPackage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentPackage) DeepCopyObject ¶ added in v0.5.0
func (in *ComponentPackage) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ComponentPackage) MakeAndSetName ¶ added in v0.6.0
func (c *ComponentPackage) MakeAndSetName()
MakeAndSetName constructs the name from the ComponentPackage's ComponentName and Version and stores the result in metadata.name.
type ComponentPackageList ¶ added in v0.5.0
type ComponentPackageList struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Items []ComponentPackage `json:"items,omitempty"` }
ComponentPackageList contains a list of ComponentPackages.
func (*ComponentPackageList) DeepCopy ¶ added in v0.5.0
func (in *ComponentPackageList) DeepCopy() *ComponentPackageList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentPackageList.
func (*ComponentPackageList) DeepCopyInto ¶ added in v0.5.0
func (in *ComponentPackageList) DeepCopyInto(out *ComponentPackageList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentPackageList) DeepCopyObject ¶ added in v0.5.0
func (in *ComponentPackageList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentPackageSpec ¶ added in v0.4.0
type ComponentPackageSpec struct { // ComponentName is the canonical name of this component. For example, 'etcd' // or 'kube-proxy'. It must have the same naming properties as the // Metadata.Name to allow for constructing the name. // See more at k8s.io/docs/concepts/overview/working-with-objects/names/ ComponentName string `json:"componentName,omitempty"` // Version is the required version for this component. The version // should be a SemVer 2 string (see https://semver.org/) of the form X.Y.Z // (Major.Minor.Patch). A major-version changes should indicate breaking // changes, minor-versions should indicate backwards compatible features, and // patch changes should indicate backwards compatible. If there are any // changes to the component, then the version string must be incremented. Version string `json:"version,omitempty"` // Structured Kubenetes objects that run as part of this app, whether on the // master, on the nodes, or in some other fashio. These Kubernetes objects // are inlined and must be YAML/JSON compatible. Each must have `apiVersion`, // `kind`, and `metadata`. // // This is essentially equivalent to the Kubernetes `Unstructured` type. Objects []*unstructured.Unstructured `json:"objects,omitempty"` // Objects that are specified via a File-URL. The process of inlining a // component turns object files into objects. During the inline process, if // the file is YAML-formatted and contains multiple objects in the YAML-doc, // the objects will be split into separate inline objects. In other words, // one object file may result in multiple objects. // // Each object file must be parsable into a Struct: In other words, // it should be representable as either YAML or JSON. ObjectFiles []File `json:"objectFiles,omitempty"` // Raw files represent arbitrary string data. Unlike object files, // these files don't need to be parsable as YAML or JSON. So, during the // inline process, the data is inserted into a generated config map before // being added to the objects. A ConfigMap is generated per-filegroup. RawTextFiles []FileGroup `json:"rawTextFiles,omitempty"` }
ComponentPackageSpec represents the spec for the component.
func (*ComponentPackageSpec) DeepCopy ¶ added in v0.5.0
func (in *ComponentPackageSpec) DeepCopy() *ComponentPackageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentPackageSpec.
func (*ComponentPackageSpec) DeepCopyInto ¶ added in v0.5.0
func (in *ComponentPackageSpec) DeepCopyInto(out *ComponentPackageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentReference ¶ added in v0.6.0
type ComponentReference struct { // ComponentName is the readable name of a component. ComponentName string `json:"componentName,omitempty"` // Version is the version string for a component. Version string `json:"version,omitempty"` }
ComponentReference provides a reference
func (*ComponentReference) DeepCopy ¶ added in v0.6.0
func (in *ComponentReference) DeepCopy() *ComponentReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentReference.
func (*ComponentReference) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentReference) DeepCopyInto(out *ComponentReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ComponentReference) GetLocalObjectRef ¶ added in v0.6.0
func (c ComponentReference) GetLocalObjectRef() corev1.LocalObjectReference
GetLocalObjectRef creates a LocalObjectReference from a ComponentReference.
type ComponentSet ¶ added in v0.5.0
type ComponentSet struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // The specification object for the ComponentSet Spec ComponentSetSpec `json:"spec,omitempty"` }
ComponentSet references a precise set of component packages.
func (*ComponentSet) DeepCopy ¶ added in v0.5.0
func (in *ComponentSet) DeepCopy() *ComponentSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSet.
func (*ComponentSet) DeepCopyInto ¶ added in v0.5.0
func (in *ComponentSet) DeepCopyInto(out *ComponentSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentSet) DeepCopyObject ¶ added in v0.5.0
func (in *ComponentSet) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ComponentSet) GetAllLocalObjectRefs ¶ added in v0.6.0
func (c *ComponentSet) GetAllLocalObjectRefs() []corev1.LocalObjectReference
GetAllLocalObjectRefs creates LocalObjectReferences for all the component references in a ComponentSet.
func (*ComponentSet) MakeAndSetName ¶ added in v0.6.0
func (c *ComponentSet) MakeAndSetName()
MakeAndSetName constructs the name from the ComponentSet's SetName and Version and stores the result in metadata.name.
type ComponentSetList ¶ added in v0.5.0
type ComponentSetList struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Items []ComponentSet `json:"items,omitempty"` }
ComponentSetList contains a list of ComponentSets.
func (*ComponentSetList) DeepCopy ¶ added in v0.5.0
func (in *ComponentSetList) DeepCopy() *ComponentSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSetList.
func (*ComponentSetList) DeepCopyInto ¶ added in v0.5.0
func (in *ComponentSetList) DeepCopyInto(out *ComponentSetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentSetList) DeepCopyObject ¶ added in v0.5.0
func (in *ComponentSetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentSetSpec ¶ added in v0.5.0
type ComponentSetSpec struct { // SetName is the human-readable string for this group of components. It // must only contain lower case alphanumerics, periods, and dashes. See more // details at k8s.io/docs/concepts/overview/working-with-objects/names/ SetName string `json:"setName,omitempty"` // Version is the required version string for this component set and should // have the form X.Y.Z (Major.Minor.Patch). Generally speaking, major-version // changes should indicate breaking changes, minor-versions should indicate // backwards compatible features, and patch changes should indicate backwords // compatible. If there are any changes to the bundle, then the version // string must be incremented. Version string `json:"version,omitempty"` // Components are references to component objects that make up the component // set. To get the Metadata.Name for the component, GetLocalObjectRef() // should be called on the component reference. Components []ComponentReference `json:"components,omitempty"` }
ComponentSetSpec represents a versioned selection of Kubernetes components.
func (*ComponentSetSpec) DeepCopy ¶ added in v0.5.0
func (in *ComponentSetSpec) DeepCopy() *ComponentSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSetSpec.
func (*ComponentSetSpec) DeepCopyInto ¶ added in v0.5.0
func (in *ComponentSetSpec) DeepCopyInto(out *ComponentSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type File ¶
type File struct { // URL to find this file; the url string must be parsable via Go's net/url // library. It is generally recommended that a URI scheme be provided in the // URL, but it is not required. If a scheme is not provided, it is assumed // that the scheme is a file-scheme. // // For example, these are all valid: // - foo/bar/biff (a relative path) // - /foo/bar/biff (an absolute path) // - file:///foo/bar/biff (an absolute path with an explicit 'file' scheme) // - http://example.com/foo.yaml URL string `json:"url,omitempty"` // Optional Sha256 hash of the binary to ensure we are pulling the correct // binary/file. Hash string `json:"hash,omitempty"` }
File represents some sort of file that's specified external to the bundle, which could be on either a local or remote file system.
func (*File) DeepCopy ¶ added in v0.5.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new File.
func (*File) DeepCopyInto ¶ added in v0.5.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FileGroup ¶ added in v0.6.0
type FileGroup struct { // Name of the filegroup. For raw text files, this becomes the name of the. Name string `json:"name,omitempty"` // Files that make up this file group. Files []File `json:"files,omitempty"` }
FileGroup represents a collection of files. When used to create ConfigMaps from RawTextFiles, the metadata.name comes from the Name field and data-key being the basename of File URL. Thus, if the url is something like 'file://foo/bar/biff.txt', the data-key will be 'biff.txt'.
func (*FileGroup) DeepCopy ¶ added in v0.6.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileGroup.
func (*FileGroup) DeepCopyInto ¶ added in v0.6.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Identifier ¶ added in v0.6.1
type Identifier string
Identifier is a key used for a metadata label or annotation to experess extra information about components and objects.
const ( // InlineTypeIdentifier is an identifier used to identify how an object in a // component was inlined. InlineTypeIdentifier Identifier = "bundle.gke.io/inline-type" )
type InlineType ¶ added in v0.6.1
type InlineType string
InlineType is a value that the InlineTypeIdentifier can take.
const ( // KubeObjectInline indicates the object was inlined as an untructured object. KubeObjectInline InlineType = "kube-object" // RawStringInline indicates the object was inlined via raw-strings into a // ConfigMap. RawStringInline InlineType = "raw-string" )