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 BundleBuilder
- type Component
- type ComponentBuilder
- type ComponentList
- type ComponentReference
- type ComponentSet
- type ComponentSetList
- type ComponentSetSpec
- type ComponentSpec
- type File
- type FileGroup
- type Identifier
- type InlineType
- type PatchTemplate
- type PatchTemplateBuilder
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 Components 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"` // Components are Components are files that are inlined. The // components must be unique based on the combination of ComponentName + // Version. Components []*Component `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 BundleBuilder ¶ added in v0.8.0
type BundleBuilder struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // SetName for the resulting Bundle and ComponentSet. The combination of // SetName and Version should provide a unique identifier for the generate. SetName string `json:"setName,omitempty"` // Version for the Bundle and ComponentSet. See Bundle.Version for more // details. The version is optional for the ComponentBuilder Version string `json:"version,omitempty"` // ComponentFiles represent ComponentBuilder or Component types that are // referenced via file urls. ComponentFiles []File `json:"componentFiles,omitempty"` }
BundleBuilder builds component data. Practically speaking, the BundleBuilder builds Bundles, ComponentSets, and Components.
func (*BundleBuilder) DeepCopy ¶ added in v0.8.0
func (in *BundleBuilder) DeepCopy() *BundleBuilder
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleBuilder.
func (*BundleBuilder) DeepCopyInto ¶ added in v0.8.0
func (in *BundleBuilder) DeepCopyInto(out *BundleBuilder)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BundleBuilder) DeepCopyObject ¶ added in v0.8.0
func (in *BundleBuilder) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Component ¶ added in v0.8.0
type Component struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // The specification object for the Component. Spec ComponentSpec `json:"spec,omitempty"` }
Component 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 (*Component) ComponentReference ¶ added in v0.8.0
func (c *Component) ComponentReference() ComponentReference
ComponentReference creates a ComponentReference from a component.
func (*Component) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Component.
func (*Component) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Component) DeepCopyObject ¶ added in v0.8.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Component) MakeAndSetName ¶ added in v0.8.0
func (c *Component) MakeAndSetName()
MakeAndSetName constructs the name from the Component's ComponentName and Version and stores the result in metadata.name.
type ComponentBuilder ¶ added in v0.8.0
type ComponentBuilder struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // ComponentName is the canonical name of this component. See // ComponentSpec.ComponentName for more details. ComponentName string `json:"componentName,omitempty"` // Version is the version for this component. See ComponentSpec.Version for // more details. The version is optional for the ComponentBuilder. Version string `json:"version,omitempty"` // AppVersion is an optional SemVer versions string that should have the form // X.Y or X.Y.Z (Major.Minor.Patch), which indicates the version of the // application provided by the component. The AppVersion will frequently be // the version of the container image and need not be updated when the // Version field is updated. // // For example, for an etcd component, the version field might be something // like 10.9.8, but the app version might be something like 3.3.10, // representing the version of Etcd. AppVersion string `json:"appVersion,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"` }
ComponentBuilder builds Components.
func (*ComponentBuilder) ComponentReference ¶ added in v0.8.0
func (c *ComponentBuilder) ComponentReference() ComponentReference
ComponentReference creates a ComponentReference from a component.
func (*ComponentBuilder) DeepCopy ¶ added in v0.8.0
func (in *ComponentBuilder) DeepCopy() *ComponentBuilder
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentBuilder.
func (*ComponentBuilder) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentBuilder) DeepCopyInto(out *ComponentBuilder)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentBuilder) DeepCopyObject ¶ added in v0.8.0
func (in *ComponentBuilder) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentList ¶ added in v0.8.0
type ComponentList struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Items []Component `json:"items,omitempty"` }
ComponentList contains a list of Components.
func (*ComponentList) DeepCopy ¶ added in v0.8.0
func (in *ComponentList) DeepCopy() *ComponentList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentList.
func (*ComponentList) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentList) DeepCopyInto(out *ComponentList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentList) DeepCopyObject ¶ added in v0.8.0
func (in *ComponentList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
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. As such, the version should not be tied to the // version of the container images. 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 ComponentSpec ¶ added in v0.8.0
type ComponentSpec 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"` // AppVersion is an optional SemVer versions string that should have the form // X.Y or X.Y.Z (Major.Minor.Patch), which indicates the version of the // application provided by the component. The AppVersion will frequently be // the version of the container image and need not be updated when the // Version field is updated. // // For example, for an etcd component, the version field might be something // like 10.9.8, but the app version might be something like 3.3.10, // representing the version of Etcd. AppVersion string `json:"appVersion,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"` }
ComponentSpec represents the spec for the component.
func (*ComponentSpec) DeepCopy ¶ added in v0.8.0
func (in *ComponentSpec) DeepCopy() *ComponentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSpec.
func (*ComponentSpec) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentSpec) DeepCopyInto(out *ComponentSpec)
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" )
type PatchTemplate ¶ added in v0.9.0
type PatchTemplate struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Template is a template that creates a patch for a K8S object. In other // words, a templated YAML blob that's meant to be applied via // strategic-merge-patch. It's currently assumed to be a YAML go-template. Template string `json:"template,omitempty"` // OptionsSchema is the schema for the parameters meant to be applied to // the patch template. OptionsSchema *apiextensions.JSONSchemaProps `json:"optionsSchema,omitempty"` }
PatchTemplate contains configuration for patching objects.
func (*PatchTemplate) DeepCopy ¶ added in v0.9.0
func (in *PatchTemplate) DeepCopy() *PatchTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PatchTemplate.
func (*PatchTemplate) DeepCopyInto ¶ added in v0.9.0
func (in *PatchTemplate) DeepCopyInto(out *PatchTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PatchTemplate) DeepCopyObject ¶ added in v0.9.0
func (in *PatchTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PatchTemplateBuilder ¶ added in v0.9.0
type PatchTemplateBuilder struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Template is a template that creates a patch for a K8S object. In other // words, a templated YAML blob that's meant to be applied via // strategic-merge-patch. It's currently assumed to be a YAML go-template. Template string `json:"template,omitempty"` // BuildSchema is the schema for the parameters meant to be applied to // the patch template. BuildSchema *apiextensions.JSONSchemaProps `json:"buildSchema,omitempty"` // TargetSchema is the schema for the parameters after the build-phase. This // becomes the 'OptionsSchema' field. TargetSchema *apiextensions.JSONSchemaProps `json:"targetSchema,omitempty"` }
PatchTemplateBuilder contains configuration for creating patch templates.
func (*PatchTemplateBuilder) DeepCopy ¶ added in v0.9.0
func (in *PatchTemplateBuilder) DeepCopy() *PatchTemplateBuilder
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PatchTemplateBuilder.
func (*PatchTemplateBuilder) DeepCopyInto ¶ added in v0.9.0
func (in *PatchTemplateBuilder) DeepCopyInto(out *PatchTemplateBuilder)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PatchTemplateBuilder) DeepCopyObject ¶ added in v0.9.0
func (in *PatchTemplateBuilder) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.