v1alpha1

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

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

View Source
const GroupName = "bundle.gke.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
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

func CreateName(inName, version string) string

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

func (in *Bundle) DeepCopy() *Bundle

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

func (*Bundle) DeepCopyInto added in v0.6.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.6.0

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

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"`

	// ComponentNamePolicy defines how to generate the metadata.name
	// for a Component or ComponentBuilder that does not already have one.
	//  - SetAndComponent generates a name from the set name and version and
	//    component name and version.
	//  - Component (default) generates a name from the component name and version
	ComponentNamePolicy string `json:"componentNamePolicy,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

func (in *Component) DeepCopy() *Component

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

func (*Component) DeepCopyInto added in v0.8.0

func (in *Component) DeepCopyInto(out *Component)

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

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

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"`

	// 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"`

	// TemplateFiles represent templates with a specific template type.
	// The process of inlining a component turns template files into
	// objectTemplates. During the inline process, each templateFileSet
	// which may contain one or multiple template files of the same type,
	// will be built into separate inline objects.
	TemplateFiles []TemplateFileSet `json:"templateFiles,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 ComponentBuilder.

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.ListMeta `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 ComponentRequire added in v0.10.0

type ComponentRequire struct {
	// ComponentName (required) specifies the name of a component.
	ComponentName string `json:"componentName,omitempty"`

	// Version specifies the minimum required version present in another
	// components Requirements object. In otherwords, the Version given by
	// ComponentName in a Bundle or Set must be >= to this version, fixing the
	// major version.
	//
	// If version is not included, then any component with the specified
	// ComponentName will be considered a valid match.
	Version string `json:"version,omitempty"`
}

ComponentRequire is a specifies a minimal component version that will work with the component.

func (*ComponentRequire) DeepCopy added in v0.10.0

func (in *ComponentRequire) DeepCopy() *ComponentRequire

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

func (*ComponentRequire) DeepCopyInto added in v0.10.0

func (in *ComponentRequire) DeepCopyInto(out *ComponentRequire)

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

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) ComponentSetReference added in v0.12.0

func (c *ComponentSet) ComponentSetReference() ComponentSetReference

ComponentSetReference creates a ComponentSetReference from a ComponentSet.

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.ListMeta `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 ComponentSetReference added in v0.10.0

type ComponentSetReference struct {
	// SetName is the readable name of a component set.
	SetName string `json:"setName,omitempty"`

	// Version is the version string for a component set.
	Version string `json:"version,omitempty"`
}

ComponentSetReference provides a reference to a component set

func (*ComponentSetReference) DeepCopy added in v0.10.0

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

func (*ComponentSetReference) DeepCopyInto added in v0.10.0

func (in *ComponentSetReference) DeepCopyInto(out *ComponentSetReference)

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

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"`

	// 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"`

	// Digest is an optional hash of the file to ensure we are pulling
	// the correct binary/file.
	Digest string `json:"hash,omitempty"`
}

File represents some sort of file that's specified external to a component or bundle, which could be on either a local or remote file system.

func (*File) DeepCopy added in v0.5.0

func (in *File) DeepCopy() *File

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

func (*File) DeepCopyInto added in v0.5.0

func (in *File) DeepCopyInto(out *File)

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

func (File) ParsedURL added in v0.6.1

func (f File) ParsedURL() (*url.URL, error)

ParsedURL parses the URL in a file object. If no scheme is present, the scheme is assumed to be a filepath on the local filesystem.

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"`

	// AsBinary indicates whether to import this text as Binary data rather than
	// string data. Note that Binary data is only supported for Kubernetes
	// clusters > Kubernetes v1.10.
	AsBinary bool `json:"asBinary"`

	// Annotations to apply to the resulting config map.
	Annotations map[string]string `json:"annotations,omitempty"`

	// Labels to apply to the resulting config map.
	Labels map[string]string `json:"labels,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

func (in *FileGroup) DeepCopy() *FileGroup

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

func (*FileGroup) DeepCopyInto added in v0.6.0

func (in *FileGroup) DeepCopyInto(out *FileGroup)

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"

	// InlinePathIdentifier is an identifier used to preserve the path where an
	// object was inlined from.
	InlinePathIdentifier Identifier = "bundle.gke.io/inline-path"
)

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 ObjectSelector added in v0.11.0

type ObjectSelector struct {
	// Kinds represent the Kinds to match.
	Kinds []string `json:"kinds,omitempty"`

	// Names represent the metadata.names to match.
	Names []string `json:"names,omitempty"`

	// Annotations contain key/value pairs to match. An empty string value matches
	// all annotation-values for a particular key.
	Annotations map[string]string `json:"annotations,omitempty"`

	// Labels contain key/value pairs to match. An empty string value matches
	// all label-values for a particular key.
	Labels map[string]string `json:"labels,omitempty"`

	// Namespaces to match.
	Namespaces []string `json:"namespaces,omitempty"`

	// InvertMatch inverts the match. By default, the ObjectSelector will include
	// objects matching all of the criteria above. This flag indicates that objects
	// NOT matching the criteria should be included instead.
	InvertMatch *bool `json:"invertMatch,omitempty"`
}

ObjectSelector is used for identifying Objects on which to apply the patch template.

func (*ObjectSelector) DeepCopy added in v0.11.0

func (in *ObjectSelector) DeepCopy() *ObjectSelector

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

func (*ObjectSelector) DeepCopyInto added in v0.11.0

func (in *ObjectSelector) DeepCopyInto(out *ObjectSelector)

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

type ObjectTemplate added in v0.10.2

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

	// Template is a template-string that creates one or more Kubernetes object.
	Template string `json:"template,omitempty"`

	// Type indicates how the template should be detemplatized and is required.
	Type TemplateType `json:"type,omitempty"`

	// OptionsSchema is the schema for the parameters meant to be applied to
	// the object template, which includes both defaulting and validation.
	OptionsSchema *apiextensions.JSONSchemaProps `json:"optionsSchema,omitempty"`
}

ObjectTemplate contains configuration for creating objects.

func (*ObjectTemplate) DeepCopy added in v0.10.2

func (in *ObjectTemplate) DeepCopy() *ObjectTemplate

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

func (*ObjectTemplate) DeepCopyInto added in v0.10.2

func (in *ObjectTemplate) DeepCopyInto(out *ObjectTemplate)

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

func (*ObjectTemplate) DeepCopyObject added in v0.10.2

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

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

type ObjectTemplateBuilder added in v0.10.2

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

	// File is references a template file. Files can contain one or more objects.
	// If the object contains more.
	File File `json:"file,omitempty"`

	// Type indicates how the template should be detemplatized. It defaults to Go
	// Templates during build if left unspecified.
	Type TemplateType `json:"type,omitempty"`

	// OptionsSchema is the schema for the parameters meant to be applied to
	// the object template, which includes both defaulting and validation.
	OptionsSchema *apiextensions.JSONSchemaProps `json:"optionsSchema,omitempty"`
}

ObjectTemplateBuilder contains configuration for creating ObjectTemplates.

func (*ObjectTemplateBuilder) DeepCopy added in v0.11.0

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

func (*ObjectTemplateBuilder) DeepCopyInto added in v0.11.0

func (in *ObjectTemplateBuilder) DeepCopyInto(out *ObjectTemplateBuilder)

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

func (*ObjectTemplateBuilder) DeepCopyObject added in v0.11.0

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

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

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.
	//
	// If either APIVersion or Kind are present in the Template, they will be
	// removed during patch-appllication and added to the ObjectSelector.
	Template string `json:"template,omitempty"`

	// PatchType represents how patches are applied. If not specified, use
	// StrategicMergePatch.
	PatchType string `json:"patchType,omitempty"`

	// Selector identifies the objects to which the patch should be applied
	// For each object selected, the template will have its apiVersion and
	// kind set to match the object, then be applied to the object.
	Selector *ObjectSelector `json:"selector,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"`

	// PatchType represents how patches are applied. If not specified, use
	// StrategicMergePatch.
	PatchType string `json:"patchType,omitempty"`

	// Selector identifies the objects to which the patch should be applied
	// For each object selected, the template will have its apiVersion and
	// kind set to match the object, then be applied to the object.
	Selector *ObjectSelector `json:"selector,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

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.

type PatchType added in v0.11.1

type PatchType string

PatchType represents

const (
	// StrategicMergePatch is the default patch type. Use Kubernetes Strategic
	// Merge Patch to apply patches. See more at:
	// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-api-machinery/strategic-merge-patch.md
	StrategicMergePatch PatchType = "StrategicMergePatch"

	// JSONPatch relies on RFC6902 JSON Patching to apply patches and is useful
	// for when object types are not available in the patcher runtime schema.
	JSONPatch PatchType = "JSONPatch"
)

type Requirements added in v0.10.0

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

	// Visibility indicates which components can depend on this component.
	//
	// If not specified, the component defaults to being 'private' -- other
	// components cannot depend on this component.
	//
	// There are several reserved names (which are anyways illegal as component names):
	//
	//    @public: visible to all components.
	//    @private: not visible for other components to depend on. This is the default.
	//
	// If either @public or @private are specified, these rules override all
	// other component rules.
	//
	// Visibility can be broadened with new versions of components, for example,
	// by going from private to granting visibility to specific components or
	// event to public. However, it's it's not supported to narrow visibility,
	// for example, by going from public to private. Doing so may result in
	// previous component versions not being accessible based on the new
	// visibility rules.  To narrow visibility, it's recommended to create a
	// new component -- my-component-v2.
	Visibility []string `json:"visibility,omitempty"`

	// Require specifies components that must be packaged with this component.
	Require []ComponentRequire `json:"require,omitempty"`
}

Requirements specifies the packaging-time dependencies for an encapsulating Component object. The term 'packaging-time' is meant to distinguish from compile or runtime dependencies, and refers to the idea that when building a collection of components, the Requirements are checked to ensure that the set of components is valid. Additionally, the Requirements may be used to construct the set of components by selecting the appropriate components from a universe of available components.

Only one requirements object can be specified in a component.

func (*Requirements) DeepCopy added in v0.10.0

func (in *Requirements) DeepCopy() *Requirements

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

func (*Requirements) DeepCopyInto added in v0.10.0

func (in *Requirements) DeepCopyInto(out *Requirements)

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

func (*Requirements) DeepCopyObject added in v0.10.0

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

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

type TemplateFileSet added in v0.13.0

type TemplateFileSet struct {
	// Type indicates how the template files should be detemplatized. It defaults
	// to Go Templates during build if left unspecified.
	TemplateType TemplateType `json:"templateType,omitempty"`

	// Templates files that are specified via a File-URL. 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 template file may result in multiple objects.
	Files []File `json:"files,omitempty"`
}

TemplateFileSet represents a collection of template files which must be of the same template type.

func (*TemplateFileSet) DeepCopy added in v0.14.0

func (in *TemplateFileSet) DeepCopy() *TemplateFileSet

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

func (*TemplateFileSet) DeepCopyInto added in v0.14.0

func (in *TemplateFileSet) DeepCopyInto(out *TemplateFileSet)

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

type TemplateType added in v0.10.2

type TemplateType string

TemplateType indicates the type of the template.

const (
	// TemplateTypeUndefined represents an undefined template type.
	TemplateTypeUndefined TemplateType = ""

	// TemplateTypeGo represents a go-template, which is assumed to be YAML.
	TemplateTypeGo TemplateType = "go-template"

	// TemplateTypeJsonnet represents a jsonnet type.
	TemplateTypeJsonnet TemplateType = "jsonnet"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL