v1alpha1

package
Version: v0.0.0-...-be4dc66 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: Apache-2.0, BSD-2-Clause, MIT, MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Index

Constants

View Source
const (
	// OperatingSystemConfigPurposeProvision describes that the operating system configuration is used to bootstrap a
	// new VM.
	OperatingSystemConfigPurposeProvision OperatingSystemConfigPurpose = "provision"
	// OperatingSystemConfigPurposeReconcile describes that the operating system configuration is executed on an already
	// provisioned VM by the cloud-config-downloader script.
	OperatingSystemConfigPurposeReconcile OperatingSystemConfigPurpose = "reconcile"

	// OperatingSystemConfigDefaultFilePermission is the default value for a permission of a file.
	OperatingSystemConfigDefaultFilePermission int32 = 0644
	// OperatingSystemConfigSecretDataKey is a constant for the key in a secret's `.data` field containing the
	// results of a computed cloud config.
	OperatingSystemConfigSecretDataKey = "cloud_config"
)
View Source
const OperatingSystemConfigResource = "OperatingSystemConfig"

OperatingSystemConfigResource is a constant for the name of the OperatingSystemConfig resource.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: extensions.GroupName, Version: "v1alpha1"}

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 back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type CloudConfig

type CloudConfig struct {
	// SecretRef is a reference to a secret that contains the actual result of the generated cloud config.
	SecretRef corev1.SecretReference `json:"secretRef"`
}

CloudConfig is a structure for containing the generated output for the given operating system config spec. It contains a reference to a secret as the result may contain confidential data.

func (*CloudConfig) DeepCopy

func (in *CloudConfig) DeepCopy() *CloudConfig

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

func (*CloudConfig) DeepCopyInto

func (in *CloudConfig) DeepCopyInto(out *CloudConfig)

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

type DefaultSpec

type DefaultSpec struct {
	// Type contains the instance of the resource's kind.
	Type string `json:"type"`
}

DefaultSpec contains common status fields for every extension resource.

func (*DefaultSpec) DeepCopy

func (in *DefaultSpec) DeepCopy() *DefaultSpec

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

func (*DefaultSpec) DeepCopyInto

func (in *DefaultSpec) DeepCopyInto(out *DefaultSpec)

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

type DefaultStatus

type DefaultStatus struct {
	// ObservedGeneration is the most recent generation observed for this resource.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// State can be filled by the operating controller with what ever data it needs.
	State string `json:"state,omitempty"`
	// LastOperation holds information about the last operation on the resource.
	// +optional
	LastOperation *LastOperation `json:"lastOperation,omitempty"`
	// LastError holds information about the last occurred error during an operation.
	// +optional
	LastError *LastError `json:"lastError,omitempty"`
}

DefaultStatus contains common status fields for every extension resource.

func (*DefaultStatus) DeepCopy

func (in *DefaultStatus) DeepCopy() *DefaultStatus

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

func (*DefaultStatus) DeepCopyInto

func (in *DefaultStatus) DeepCopyInto(out *DefaultStatus)

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

type DropIn

type DropIn struct {
	// Name is the name of the drop-in.
	Name string `json:"name"`
	// Content is the content of the drop-in.
	Content string `json:"content"`
}

DropIn is a drop-in configuration for a systemd unit.

func (*DropIn) DeepCopy

func (in *DropIn) DeepCopy() *DropIn

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

func (*DropIn) DeepCopyInto

func (in *DropIn) DeepCopyInto(out *DropIn)

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

type ErrorCode

type ErrorCode string

ErrorCode is a string alias.

const (
	// ErrorInfraUnauthorized indicates that the last error occurred due to invalid cloud provider credentials.
	ErrorInfraUnauthorized ErrorCode = "ERR_INFRA_UNAUTHORIZED"
	// ErrorInfraInsufficientPrivileges indicates that the last error occurred due to insufficient cloud provider privileges.
	ErrorInfraInsufficientPrivileges ErrorCode = "ERR_INFRA_INSUFFICIENT_PRIVILEGES"
	// ErrorInfraQuotaExceeded indicates that the last error occurred due to cloud provider quota limits.
	ErrorInfraQuotaExceeded ErrorCode = "ERR_INFRA_QUOTA_EXCEEDED"
	// ErrorInfraDependencies indicates that the last error occurred due to dependent objects on the cloud provider level.
	ErrorInfraDependencies ErrorCode = "ERR_INFRA_DEPENDENCIES"
)

type File

type File struct {
	// Path is the path of the file system where the file should get written to.
	Path string `json:"path"`
	// Permissions describes with which permissions the file should get written to the file system.
	// Should be defaulted to octal 0644.
	// +optional
	Permissions *int32 `json:"permissions,omitempty"`
	// Content describe the file's content.
	Content FileContent `json:"content"`
}

File is a file that should get written to the host's file system. The content can either be inlined or referenced from a secret in the same namespace.

func (*File) DeepCopy

func (in *File) DeepCopy() *File

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

func (*File) DeepCopyInto

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

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

type FileContent

type FileContent struct {
	// SecretRef is a struct that contains information about the referenced secret.
	// +optional
	SecretRef *FileContentSecretRef `json:"secretRef,omitempty"`
	// Inline is a struct that contains information about the inlined data.
	// +optional
	Inline *FileContentInline `json:"inline,omitempty"`
}

FileContent can either reference a secret or contain inline configuration.

func (*FileContent) DeepCopy

func (in *FileContent) DeepCopy() *FileContent

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

func (*FileContent) DeepCopyInto

func (in *FileContent) DeepCopyInto(out *FileContent)

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

type FileContentInline

type FileContentInline struct {
	// Encoding is the file's encoding (e.g. base64).
	Encoding string `json:"encoding"`
	// Data is the file's data.
	Data string `json:"data"`
}

FileContentInline contains keys for inlining a file content's data and encoding.

func (*FileContentInline) DeepCopy

func (in *FileContentInline) DeepCopy() *FileContentInline

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

func (*FileContentInline) DeepCopyInto

func (in *FileContentInline) DeepCopyInto(out *FileContentInline)

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

type FileContentSecretRef

type FileContentSecretRef struct {
	// Name is the name of the secret.
	Name string `json:"name"`
	// DataKey is the key in the secret's `.data` field that should be read.
	DataKey string `json:"dataKey"`
}

FileContentSecretRef contains keys for referencing a file content's data from a secret in the same namespace.

func (*FileContentSecretRef) DeepCopy

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

func (*FileContentSecretRef) DeepCopyInto

func (in *FileContentSecretRef) DeepCopyInto(out *FileContentSecretRef)

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

type LastError

type LastError struct {
	// A human readable message indicating details about the last error.
	Description string `json:"description"`
	// Well-defined error codes of the last error(s).
	// +optional
	Codes []ErrorCode `json:"codes,omitempty"`
}

LastError indicates the last occurred error for an operation on a resource.

func (*LastError) DeepCopy

func (in *LastError) DeepCopy() *LastError

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

func (*LastError) DeepCopyInto

func (in *LastError) DeepCopyInto(out *LastError)

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

type LastOperation

type LastOperation struct {
	// A human readable message indicating details about the last operation.
	Description string `json:"description"`
	// Last time the operation state transitioned from one to another.
	LastUpdateTime metav1.Time `json:"lastUpdateTime"`
	// The progress in percentage (0-100) of the last operation.
	Progress int `json:"progress"`
	// Status of the last operation, one of Aborted, Processing, Succeeded, Error, Failed.
	State LastOperationState `json:"state"`
	// Type of the last operation, one of Create, Reconcile, Delete.
	Type LastOperationType `json:"type"`
}

LastOperation indicates the type and the state of the last operation, along with a description message and a progress indicator.

func (*LastOperation) DeepCopy

func (in *LastOperation) DeepCopy() *LastOperation

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

func (*LastOperation) DeepCopyInto

func (in *LastOperation) DeepCopyInto(out *LastOperation)

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

type LastOperationState

type LastOperationState string

LastOperationState is a string alias.

const (
	// LastOperationStateProcessing indicates that an operation is ongoing.
	LastOperationStateProcessing LastOperationState = "Processing"
	// LastOperationStateSucceeded indicates that an operation has completed successfully.
	LastOperationStateSucceeded LastOperationState = "Succeeded"
	// LastOperationStateError indicates that an operation is completed with errors and will be retried.
	LastOperationStateError LastOperationState = "Error"
	// LastOperationStateFailed indicates that an operation is completed with errors and won't be retried.
	LastOperationStateFailed LastOperationState = "Failed"
	// LastOperationStatePending indicates that an operation cannot be done now, but will be tried in future.
	LastOperationStatePending LastOperationState = "Pending"
	// LastOperationStateAborted indicates that an operation has been aborted.
	LastOperationStateAborted LastOperationState = "Aborted"
)

type LastOperationType

type LastOperationType string

LastOperationType is a string alias.

const (
	// LastOperationTypeReconcile indicates a 'reconcile' operation.
	LastOperationTypeReconcile LastOperationType = "Reconcile"
	// LastOperationTypeDelete indicates a 'delete' operation.
	LastOperationTypeDelete LastOperationType = "Delete"
)

type OperatingSystemConfig

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

	Spec   OperatingSystemConfigSpec   `json:"spec"`
	Status OperatingSystemConfigStatus `json:"status"`
}

OperatingSystemConfig is a specification for a OperatingSystemConfig resource

func (*OperatingSystemConfig) DeepCopy

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

func (*OperatingSystemConfig) DeepCopyInto

func (in *OperatingSystemConfig) DeepCopyInto(out *OperatingSystemConfig)

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

func (*OperatingSystemConfig) DeepCopyObject

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

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

type OperatingSystemConfigList

type OperatingSystemConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	// Items is the list of OperatingSystemConfigs.
	Items []OperatingSystemConfig `json:"items"`
}

OperatingSystemConfigList is a list of OperatingSystemConfig resources

func (*OperatingSystemConfigList) DeepCopy

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

func (*OperatingSystemConfigList) DeepCopyInto

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

func (*OperatingSystemConfigList) DeepCopyObject

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

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

type OperatingSystemConfigPurpose

type OperatingSystemConfigPurpose string

OperatingSystemConfigPurpose is a string alias.

type OperatingSystemConfigSpec

type OperatingSystemConfigSpec struct {
	// DefaultSpec is a structure containing common fields used by all extension resources.
	DefaultSpec `json:",inline"`

	// Purpose describes how the result of this OperatingSystemConfig is used by Gardener. Either it
	// gets sent to the machine-controller-manager to bootstrap a VM, or it is downloaded by the
	// cloud-config-downloader script already running on a bootstrapped VM.
	Purpose OperatingSystemConfigPurpose `json:"purpose"`
	// ReloadConfigFilePath is the path to the generated operating system configuration. If set, controllers
	// are asked to use it when determining the .status.command of this resource. For example, if for CoreOS
	// the reload-path might be "/var/lib/config"; then the controller shall set .status.command to
	// "/usr/bin/coreos-cloudinit --from-file=/var/lib/config".
	// +optional
	ReloadConfigFilePath *string `json:"reloadConfigFilePath,omitempty"`
	// Units is a list of unit for the operating system configuration (usually, a systemd unit).
	// +patchMergeKey=name
	// +patchStrategy=merge
	// +optional
	Units []Unit `json:"units,omitempty"`
	// Files is a list of files that should get written to the host's file system.
	// +optional
	Files []File `json:"files,omitempty"`
}

OperatingSystemConfigSpec is the spec for a OperatingSystemConfig resource

func (*OperatingSystemConfigSpec) DeepCopy

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

func (*OperatingSystemConfigSpec) DeepCopyInto

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

type OperatingSystemConfigStatus

type OperatingSystemConfigStatus struct {
	// DefaultStatus is a structure containing common fields used by all extension resources.
	DefaultStatus `json:",inline"`

	// CloudConfig is a structure for containing the generated output for the given operating system
	// config spec. It contains a reference to a secret as the result may contain confidential data.
	// +optional
	CloudConfig *CloudConfig `json:"cloudConfig,omitempty"`
	// Command is the command whose execution renews/reloads the cloud config on an existing VM, e.g.
	// "/usr/bin/reload-cloud-config -from-file=<path>". The <path> is optionally provided by Gardener
	// in the .spec.reloadConfigFilePath field.
	// +optional
	Command *string `json:"command,omitempty"`
	// Units is a list of systemd unit names that are part of the generated Cloud Config and shall be
	// restarted when a new version has been downloaded.
	// +optional
	Units []string `json:"units,omitempty"`
}

OperatingSystemConfigStatus is the status for a OperatingSystemConfig resource

func (*OperatingSystemConfigStatus) DeepCopy

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

func (*OperatingSystemConfigStatus) DeepCopyInto

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

type Unit

type Unit struct {
	// Name is the name of a unit.
	Name string `json:"name"`
	// Command is the unit's command.
	// +optional
	Command *string `json:"command,omitempty"`
	// Enable describes whether the unit is enabled or not.
	// +optional
	Enable *bool `json:"enable,omitempty"`
	// Content is the unit's content.
	// +optional
	Content *string `json:"content,omitempty"`
	// DropIns is a list of drop-ins for this unit.
	// +patchMergeKey=name
	// +patchStrategy=merge
	// +optional
	DropIns []DropIn `json:"dropIns,omitempty"`
}

Unit is a unit for the operating system configuration (usually, a systemd unit).

func (*Unit) DeepCopy

func (in *Unit) DeepCopy() *Unit

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

func (*Unit) DeepCopyInto

func (in *Unit) DeepCopyInto(out *Unit)

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
t or T : Toggle theme light dark auto
y or Y : Canonical URL