v1

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

Package v1 contains API Schema definitions for the v1 API group +kubebuilder:object:generate=true +groupName=porter.sh

Index

Constants

View Source
const (
	// DefaultPorterAgentRepository is the default image repository of the Porter
	// Agent to use when it is not configured in the operator.
	DefaultPorterAgentRepository = "ghcr.io/getporter/porter-agent"

	// DefaultPorterAgentVersion is the default version of the Porter Agent to
	// use when it is not configured in the operator.
	//
	// As we test out the operator with new versions of Porter, keep this value
	// up-to-date so that the default version is guaranteed to work.
	DefaultPorterAgentVersion = "v1.0.0-rc.1"

	// LabelJobType is a label applied to jobs created by the operator. It
	// indicates the purpose of the job.
	LabelJobType = Prefix + "jobType"

	// JobTypeAgent is the value of job type label applied to the Porter Agent.
	JobTypeAgent = "porter-agent"

	// JobTypeInstaller is the value of the job type label applied to the job
	// that runs the bundle.
	JobTypeInstaller = "bundle-installer"

	// LabelSecretType is a label applied to secrets created by the operator. It
	// indicates the purpose of the secret.
	LabelSecretType = Prefix + "secretType"

	// SecretTypeConfig is the value of the secret type label applied to the
	// secret that contains files to copy into the porter home directory.
	SecretTypeConfig = "porter-config"

	// SecretTypeWorkdir is the value of the secret type label applied to the
	// secret that contains files to copy into the working directory of the
	// Porter Agent.
	SecretTypeWorkdir = "workdir"

	// LabelManaged is a label applied to resources created by the Porter
	// Operator.
	LabelManaged = Prefix + "managed"

	// LabelResourceKind is a label applied to resources created by the Porter
	// Operator, representing the kind of owning resource. It is used to help the
	// operator determine if a resource has already been created.
	LabelResourceKind = Prefix + "resourceKind"

	// LabelResourceName is a label applied to the resources created by the
	// Porter Operator, representing the name of the owning resource. It is used
	// to help the operator determine if a resource has
	// already been created.
	LabelResourceName = Prefix + "resourceName"

	// LabelResourceGeneration is a label applied to the resources created by the
	// Porter Operator, representing the generation of the owning resource. It is
	// used to help the operator determine if a resource has
	// already been created.
	LabelResourceGeneration = Prefix + "resourceGeneration"

	// LabelRetry is a label applied to the resources created by the
	// Porter Operator, representing the retry attempt identifier.
	LabelRetry = Prefix + "retry"

	// FinalizerName is the name of the finalizer applied to Porter Operator
	// resources that should be reconciled by the operator before allowing it to
	// be deleted.
	FinalizerName = Prefix + "finalizer"

	// VolumePorterSharedName is the name of the volume shared between the porter
	// agent and the invocation image.
	VolumePorterSharedName = "porter-shared"

	// VolumePorterSharedPath is the mount path of the volume shared between the
	// porter agent and the invocation image.
	VolumePorterSharedPath = "/porter-shared"

	// VolumePorterConfigName is the name of the volume that contains Porter's config
	// file.
	VolumePorterConfigName = "porter-config"

	// VolumePorterConfigPath is the mount path of the volume containing Porter's
	// config file.
	VolumePorterConfigPath = "/porter-config"

	// VolumePorterWorkDirName is the name of the volume that is used as the Porter's
	// working directory.
	VolumePorterWorkDirName = "porter-workdir"

	// VolumePorterWorkDirPath is the mount path of the volume that is used as the
	// Porter's working directory.
	VolumePorterWorkDirPath = "/porter-workdir"
)
View Source
const (
	Prefix          = "porter.sh/"
	AnnotationRetry = Prefix + "retry"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "porter.sh", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func MergeMap added in v0.3.0

func MergeMap(target, override map[string]interface{}) map[string]interface{}

MergeConfig from another PorterConfigSpec. The values from the override are applied only when they are not empty.

Types

type AgentAction added in v0.5.0

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

	Spec   AgentActionSpec   `json:"spec,omitempty"`
	Status AgentActionStatus `json:"status,omitempty"`
}

AgentAction is the Schema for the agentactions API

func (*AgentAction) DeepCopy added in v0.5.0

func (in *AgentAction) DeepCopy() *AgentAction

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

func (*AgentAction) DeepCopyInto added in v0.5.0

func (in *AgentAction) DeepCopyInto(out *AgentAction)

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

func (*AgentAction) DeepCopyObject added in v0.5.0

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

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

func (*AgentAction) GetConditions added in v0.5.0

func (a *AgentAction) GetConditions() *[]metav1.Condition

func (*AgentAction) GetRetryLabelValue added in v0.5.0

func (a *AgentAction) GetRetryLabelValue() string

GetRetryLabelValue returns a value that is safe to use as a label value and represents the retry annotation used to trigger reconciliation.

func (*AgentAction) SetRetryAnnotation added in v0.5.0

func (a *AgentAction) SetRetryAnnotation(retry string)

SetRetryAnnotation flags the resource to retry its last operation.

type AgentActionList added in v0.5.0

type AgentActionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AgentAction `json:"items"`
}

AgentActionList contains a list of AgentAction

func (*AgentActionList) DeepCopy added in v0.5.0

func (in *AgentActionList) DeepCopy() *AgentActionList

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

func (*AgentActionList) DeepCopyInto added in v0.5.0

func (in *AgentActionList) DeepCopyInto(out *AgentActionList)

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

func (*AgentActionList) DeepCopyObject added in v0.5.0

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

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

type AgentActionSpec added in v0.5.0

type AgentActionSpec struct {
	// AgentConfig is the name of an AgentConfig to use instead of the AgentConfig defined at the namespace or system level.
	// +optional
	AgentConfig *corev1.LocalObjectReference `json:"agentConfig,omitempty"`

	// PorterConfig is the name of a PorterConfig to use instead of the PorterConfig defined at the namespace or system level.
	PorterConfig *corev1.LocalObjectReference `json:"porterConfig,omitempty"`

	// Command to run inside the Porter Agent job. Defaults to running the agent.
	Command []string `json:"command,omitempty"`

	// Args to pass to the Porter Agent job. This should be the porter command that you want to run.
	Args []string `json:"args,omitempty"`

	// Files that should be present in the working directory where the command is run.
	Files map[string][]byte `json:"files,omitempty"`

	// Env variables to set on the Porter Agent job.
	Env []corev1.EnvVar `json:"env,omitempty"`

	// EnvFrom allows setting environment variables on the Porter Agent job, using secrets or config maps as the source.
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`

	// VolumeMounts that should be defined on the Porter Agent job.
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`

	// Volumes that should be defined on the Porter Agent job.
	Volumes []corev1.Volume `json:"volumes,omitempty"`
}

AgentActionSpec defines the desired state of AgentAction

func (*AgentActionSpec) DeepCopy added in v0.5.0

func (in *AgentActionSpec) DeepCopy() *AgentActionSpec

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

func (*AgentActionSpec) DeepCopyInto added in v0.5.0

func (in *AgentActionSpec) DeepCopyInto(out *AgentActionSpec)

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

type AgentActionStatus added in v0.5.0

type AgentActionStatus struct {
	// The last generation observed by the controller.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// The currently active job that is running the Porter Agent.
	Job *corev1.LocalObjectReference `json:"job,omitempty"`

	// The current status of the agent.
	// Possible values are: Unknown, Pending, Running, Succeeded, and Failed.
	// +kubebuilder:validation:Type=string
	Phase AgentPhase `json:"phase,omitempty"`

	// Conditions store a list of states that have been reached.
	// Each condition refers to the status of the Job
	// Possible conditions are: Scheduled, Started, Completed, and Failed
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

AgentActionStatus defines the observed state of AgentAction

func (*AgentActionStatus) DeepCopy added in v0.5.0

func (in *AgentActionStatus) DeepCopy() *AgentActionStatus

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

func (*AgentActionStatus) DeepCopyInto added in v0.5.0

func (in *AgentActionStatus) DeepCopyInto(out *AgentActionStatus)

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

type AgentConditionType added in v0.5.0

type AgentConditionType string

AgentConditionType are valid conditions of a Porter agent job that is managing a change to a Porter resource.

const (
	// ConditionScheduled means that the Porter agent has been scheduled.
	ConditionScheduled AgentConditionType = "Scheduled"

	// ConditionStarted means that the Porter agent has started.
	ConditionStarted AgentConditionType = "Started"

	// ConditionComplete means the Porter agent has completed successfully.
	ConditionComplete AgentConditionType = "Completed"

	// ConditionFailed means the Porter agent failed.
	ConditionFailed AgentConditionType = "Failed"
)

type AgentConfig

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

	Spec AgentConfigSpec `json:"spec,omitempty"`
}

AgentConfig is the Schema for the agentconfigs API

func (*AgentConfig) DeepCopy

func (in *AgentConfig) DeepCopy() *AgentConfig

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

func (*AgentConfig) DeepCopyInto

func (in *AgentConfig) DeepCopyInto(out *AgentConfig)

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

func (*AgentConfig) DeepCopyObject

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

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

type AgentConfigList

type AgentConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AgentConfig `json:"items"`
}

AgentConfigList contains a list of AgentConfig values.

func (*AgentConfigList) DeepCopy

func (in *AgentConfigList) DeepCopy() *AgentConfigList

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

func (*AgentConfigList) DeepCopyInto

func (in *AgentConfigList) DeepCopyInto(out *AgentConfigList)

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

func (*AgentConfigList) DeepCopyObject

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

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

type AgentConfigSpec

type AgentConfigSpec struct {
	// PorterRepository is the repository for the Porter Agent image.
	// Defaults to ghcr.io/getporter/porter-agent
	PorterRepository string `json:"porterRepository,omitempty" mapstructure:"porterRepository,omitempty"`

	// PorterVersion is the tag for the Porter Agent image.
	// Defaults to a well-known version of the agent that has been tested with the operator.
	// Users SHOULD override this to use more recent versions.
	PorterVersion string `json:"porterVersion,omitempty" mapstructure:"porterVersion,omitempty"`

	// ServiceAccount is the service account to run the Porter Agent under.
	ServiceAccount string `json:"serviceAccount,omitempty" mapstructure:"serviceAccount,omitempty"`

	// VolumeSize is the size of the persistent volume that Porter will
	// request when running the Porter Agent. It is used to share data
	// between the Porter Agent and the bundle invocation image. It must
	// be large enough to store any files used by the bundle including credentials,
	// parameters and outputs.
	VolumeSize string `json:"volumeSize,omitempty" mapstructure:"volumeSize,omitempty"`

	// PullPolicy specifies when to pull the Porter Agent image. The default
	// is to use PullAlways when the tag is canary or latest, and PullIfNotPresent
	// otherwise.
	PullPolicy v1.PullPolicy `json:"pullPolicy,omitempty" mapstructure:"pullPolicy,omitempty"`

	// InstallationServiceAccount specifies a service account to run the Kubernetes pod/job for the installation image.
	// The default is to run without a service account.
	// This can be useful for a bundle which is targeting the kubernetes cluster that the operator is installed in.
	InstallationServiceAccount string `json:"installationServiceAccount,omitempty" mapstructure:"installationServiceAccount,omitempty"`
}

AgentConfigSpec defines the configuration for the Porter agent.

SERIALIZATION NOTE:

	The json serialization is for persisting this to Kubernetes.
 The mapstructure tags is used internally for AgentConfigSpec.MergeConfig.

func (*AgentConfigSpec) DeepCopy

func (in *AgentConfigSpec) DeepCopy() *AgentConfigSpec

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

func (*AgentConfigSpec) DeepCopyInto

func (in *AgentConfigSpec) DeepCopyInto(out *AgentConfigSpec)

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

func (AgentConfigSpec) GetPorterImage

func (c AgentConfigSpec) GetPorterImage() string

GetPorterImage returns the fully qualified image name of the Porter Agent image. Defaults the repository and tag when not set.

func (AgentConfigSpec) GetPullPolicy

func (c AgentConfigSpec) GetPullPolicy() v1.PullPolicy

GetPullPolicy returns the PullPolicy that should be used for the Porter Agent (not the bundle). Defaults to PullAlways for latest and canary, PullIfNotPresent otherwise.

func (AgentConfigSpec) GetVolumeSize

func (c AgentConfigSpec) GetVolumeSize() resource.Quantity

GetVolumeSize returns the size of the shared volume to mount between the Porter Agent and the bundle's invocation image. Defaults to 64Mi.

func (AgentConfigSpec) MergeConfig

func (c AgentConfigSpec) MergeConfig(overrides ...AgentConfigSpec) (AgentConfigSpec, error)

MergeConfig from another AgentConfigSpec. The values from the override are applied only when they are not empty.

type AgentPhase added in v0.5.0

type AgentPhase string

AgentPhase are valid statuses of a Porter agent job that is managing a change to a Porter resource.

const (
	// PhaseUnknown means that we don't know what porter is doing yet.
	PhaseUnknown AgentPhase = "Unknown"

	// PhasePending means that Porter's execution is pending.
	PhasePending AgentPhase = "Pending"

	// PhaseRunning indicates that Porter is running.
	PhaseRunning AgentPhase = "Running"

	// PhaseSucceeded means that calling Porter succeeded.
	PhaseSucceeded AgentPhase = "Succeeded"

	// PhaseFailed means that calling Porter failed.
	PhaseFailed AgentPhase = "Failed"
)

type Credential added in v0.6.0

type Credential struct {
	//Name is the bundle credential name
	Name string `json:"name" yaml:"name"`

	//Source is the bundle credential source
	//supported: secret
	//unsupported: file path(via configMap), specific value, env var, shell cmd
	Source CredentialSource `json:"source" yaml:"source"`
}

Credential defines a element in a CredentialSet

func (*Credential) DeepCopy added in v0.6.0

func (in *Credential) DeepCopy() *Credential

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

func (*Credential) DeepCopyInto added in v0.6.0

func (in *Credential) DeepCopyInto(out *Credential)

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

type CredentialSet added in v0.6.0

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

	Spec   CredentialSetSpec   `json:"spec,omitempty"`
	Status CredentialSetStatus `json:"status,omitempty"`
}

CredentialSet is the Schema for the credentialsets API

func (*CredentialSet) DeepCopy added in v0.6.0

func (in *CredentialSet) DeepCopy() *CredentialSet

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

func (*CredentialSet) DeepCopyInto added in v0.6.0

func (in *CredentialSet) DeepCopyInto(out *CredentialSet)

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

func (*CredentialSet) DeepCopyObject added in v0.6.0

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

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

func (*CredentialSet) GetRetryLabelValue added in v0.6.0

func (cs *CredentialSet) GetRetryLabelValue() string

GetRetryLabelValue returns a value that is safe to use as a label value and represents the retry annotation used to trigger reconciliation.

func (*CredentialSet) GetStatus added in v0.6.0

func (cs *CredentialSet) GetStatus() PorterResourceStatus

func (*CredentialSet) SetRetryAnnotation added in v0.6.0

func (cs *CredentialSet) SetRetryAnnotation(retry string)

SetRetryAnnotation flags the resource to retry its last operation.

func (*CredentialSet) SetStatus added in v0.6.0

func (cs *CredentialSet) SetStatus(value PorterResourceStatus)

type CredentialSetList added in v0.6.0

type CredentialSetList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CredentialSet `json:"items"`
}

CredentialSetList contains a list of CredentialSet

func (*CredentialSetList) DeepCopy added in v0.6.0

func (in *CredentialSetList) DeepCopy() *CredentialSetList

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

func (*CredentialSetList) DeepCopyInto added in v0.6.0

func (in *CredentialSetList) DeepCopyInto(out *CredentialSetList)

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

func (*CredentialSetList) DeepCopyObject added in v0.6.0

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

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

type CredentialSetSpec added in v0.6.0

type CredentialSetSpec struct {
	// AgentConfig is the name of an AgentConfig to use instead of the AgentConfig defined at the namespace or system level.
	// +optional
	AgentConfig *corev1.LocalObjectReference `json:"agentConfig,omitempty" yaml:"-"`

	// PorterConfig is the name of a PorterConfig to use instead of the PorterConfig defined at the namespace or system level.
	PorterConfig *corev1.LocalObjectReference `json:"porterConfig,omitempty" yaml:"-"`

	// SchemaVersion is the version of the credential set state schema.
	SchemaVersion string `json:"schemaVersion" yaml:"schemaVersion"`

	// Name is the name of the credential set in Porter. Immutable.
	Name string `json:"name" yaml:"name"`

	// Namespace (in Porter) where the credential set is defined.
	Namespace string `json:"namespace" yaml:"namespace"`

	//Credentials list of bundle credentials in the credential set.
	Credentials []Credential `json:"credentials" yaml:"credentials"`
}

CredentialSetSpec defines the desired state of CredentialSet

func (*CredentialSetSpec) DeepCopy added in v0.6.0

func (in *CredentialSetSpec) DeepCopy() *CredentialSetSpec

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

func (*CredentialSetSpec) DeepCopyInto added in v0.6.0

func (in *CredentialSetSpec) DeepCopyInto(out *CredentialSetSpec)

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

func (CredentialSetSpec) ToPorterDocument added in v0.6.0

func (cs CredentialSetSpec) ToPorterDocument() ([]byte, error)

type CredentialSetStatus added in v0.6.0

type CredentialSetStatus struct {
	PorterResourceStatus `json:",inline"`
}

CredentialSetStatus defines the observed state of CredentialSet

func (*CredentialSetStatus) DeepCopy added in v0.6.0

func (in *CredentialSetStatus) DeepCopy() *CredentialSetStatus

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

func (*CredentialSetStatus) DeepCopyInto added in v0.6.0

func (in *CredentialSetStatus) DeepCopyInto(out *CredentialSetStatus)

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

type CredentialSource added in v0.6.0

type CredentialSource struct {
	//Secret is a credential source using a secret plugin
	Secret string `json:"secret,omitempty" yaml:"secret,omitempty"`
}

CredentialSource defines a element in a CredentialSet

func (*CredentialSource) DeepCopy added in v0.6.0

func (in *CredentialSource) DeepCopy() *CredentialSource

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

func (*CredentialSource) DeepCopyInto added in v0.6.0

func (in *CredentialSource) DeepCopyInto(out *CredentialSource)

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

type Installation

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

	Spec   InstallationSpec   `json:"spec,omitempty"`
	Status InstallationStatus `json:"status,omitempty"`
}

Installation is the Schema for the installations API

func (*Installation) DeepCopy

func (in *Installation) DeepCopy() *Installation

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

func (*Installation) DeepCopyInto

func (in *Installation) DeepCopyInto(out *Installation)

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

func (*Installation) DeepCopyObject

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

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

func (*Installation) GetRetryLabelValue added in v0.3.0

func (i *Installation) GetRetryLabelValue() string

GetRetryLabelValue returns a value that is safe to use as a label value and represents the retry annotation used to trigger reconciliation.

func (*Installation) GetStatus added in v0.5.0

func (i *Installation) GetStatus() PorterResourceStatus

func (*Installation) SetRetryAnnotation added in v0.5.0

func (i *Installation) SetRetryAnnotation(retry string)

SetRetryAnnotation flags the resource to retry its last operation.

func (*Installation) SetStatus added in v0.5.0

func (i *Installation) SetStatus(value PorterResourceStatus)

type InstallationList

type InstallationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Installation `json:"items"`
}

InstallationList contains a list of Installation

func (*InstallationList) DeepCopy

func (in *InstallationList) DeepCopy() *InstallationList

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

func (*InstallationList) DeepCopyInto

func (in *InstallationList) DeepCopyInto(out *InstallationList)

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

func (*InstallationList) DeepCopyObject

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

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

type InstallationSpec

type InstallationSpec struct {
	// AgentConfig is the name of an AgentConfig to use instead of the AgentConfig defined at the namespace or system level.
	// +optional
	AgentConfig *corev1.LocalObjectReference `json:"agentConfig,omitempty" yaml:"-"`

	// PorterConfig is the name of a PorterConfig to use instead of the PorterConfig defined at the namespace or system level.
	PorterConfig *corev1.LocalObjectReference `json:"porterConfig,omitempty" yaml:"-"`

	// SchemaVersion is the version of the installation state schema.
	SchemaVersion string `json:"schemaVersion" yaml:"schemaVersion"`

	// Name is the name of the installation in Porter. Immutable.
	Name string `json:"name" yaml:"name"`

	// Namespace (in Porter) where the installation is defined.
	Namespace string `json:"namespace" yaml:"namespace"`

	// Uninstalled specifies if the installation should be uninstalled.
	Uninstalled bool `json:"uninstalled,omitempty" yaml:"uninstalled,omitempty"`

	// Bundle definition for the installation.
	Bundle OCIReferenceParts `json:"bundle" yaml:"bundle"`

	// Labels applied to the installation.
	Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`

	// Parameters specified by the user through overrides.
	// Does not include defaults, or values resolved from parameter sources.
	// +kubebuilder:pruning:PreserveUnknownFields
	Parameters runtime.RawExtension `json:"parameters,omitempty" yaml:"-"` // See custom marshaler below

	// CredentialSets that should be included when the bundle is reconciled.
	CredentialSets []string `json:"credentialSets,omitempty" yaml:"credentialSets,omitempty"`

	// ParameterSets that should be included when the bundle is reconciled.
	ParameterSets []string `json:"parameterSets,omitempty" yaml:"parameterSets,omitempty"`
}

InstallationSpec defines the desired state of Installation

SERIALIZATION NOTE: * The json serialization is for persisting this to Kubernetes. * The yaml serialization is for creating a Porter representation of the resource.

func (*InstallationSpec) DeepCopy

func (in *InstallationSpec) DeepCopy() *InstallationSpec

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

func (*InstallationSpec) DeepCopyInto

func (in *InstallationSpec) DeepCopyInto(out *InstallationSpec)

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

func (InstallationSpec) MarshalYAML added in v0.3.0

func (in InstallationSpec) MarshalYAML() (interface{}, error)

func (InstallationSpec) ToPorterDocument added in v0.3.0

func (in InstallationSpec) ToPorterDocument() ([]byte, error)

ToPorterDocument converts from the Kubernetes representation of the Installation into Porter's resource format.

type InstallationStatus

type InstallationStatus struct {
	PorterResourceStatus `json:",inline"`
}

InstallationStatus defines the observed state of Installation

func (*InstallationStatus) DeepCopy

func (in *InstallationStatus) DeepCopy() *InstallationStatus

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

func (*InstallationStatus) DeepCopyInto

func (in *InstallationStatus) DeepCopyInto(out *InstallationStatus)

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

type OCIReferenceParts added in v0.3.0

type OCIReferenceParts struct {
	// Repository is the OCI repository of the current bundle definition.
	Repository string `json:"repository" yaml:"repository"`

	// Version is the current version of the bundle.
	Version string `json:"version,omitempty" yaml:"version,omitempty"`

	// Digest is the current digest of the bundle.
	Digest string `json:"digest,omitempty" yaml:"digest,omitempty"`

	// Tag is the OCI tag of the current bundle definition.
	Tag string `json:"tag,omitempty" yaml:"tag,omitempty"`
}

func (*OCIReferenceParts) DeepCopy added in v0.3.0

func (in *OCIReferenceParts) DeepCopy() *OCIReferenceParts

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

func (*OCIReferenceParts) DeepCopyInto added in v0.3.0

func (in *OCIReferenceParts) DeepCopyInto(out *OCIReferenceParts)

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

type Parameter added in v0.6.0

type Parameter struct {
	// Name is the bundle parameter name
	Name string `json:"name" yaml:"name"`

	//Source is the bundle parameter source
	//supported: secret, value
	//unsupported: file path(via configMap), env var, shell cmd
	Source ParameterSource `json:"source" yaml:"source"`
}

Parameter defines an element in a ParameterSet

func (*Parameter) DeepCopy added in v0.6.0

func (in *Parameter) DeepCopy() *Parameter

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

func (*Parameter) DeepCopyInto added in v0.6.0

func (in *Parameter) DeepCopyInto(out *Parameter)

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

type ParameterSet added in v0.6.0

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

	Spec   ParameterSetSpec   `json:"spec,omitempty"`
	Status ParameterSetStatus `json:"status,omitempty"`
}

ParameterSet is the Schema for the parametersets API

func (*ParameterSet) DeepCopy added in v0.6.0

func (in *ParameterSet) DeepCopy() *ParameterSet

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

func (*ParameterSet) DeepCopyInto added in v0.6.0

func (in *ParameterSet) DeepCopyInto(out *ParameterSet)

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

func (*ParameterSet) DeepCopyObject added in v0.6.0

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

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

func (*ParameterSet) GetRetryLabelValue added in v0.6.0

func (ps *ParameterSet) GetRetryLabelValue() string

GetRetryLabelValue returns a value that is safe to use as a label value and represents the retry annotation used to trigger reconciliation.

func (*ParameterSet) GetStatus added in v0.6.0

func (ps *ParameterSet) GetStatus() PorterResourceStatus

func (*ParameterSet) SetRetryAnnotation added in v0.6.0

func (ps *ParameterSet) SetRetryAnnotation(retry string)

SetRetryAnnotation flags the resource to retry its last operation.

func (*ParameterSet) SetStatus added in v0.6.0

func (ps *ParameterSet) SetStatus(value PorterResourceStatus)

type ParameterSetList added in v0.6.0

type ParameterSetList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ParameterSet `json:"items"`
}

ParameterSetList contains a list of ParameterSet

func (*ParameterSetList) DeepCopy added in v0.6.0

func (in *ParameterSetList) DeepCopy() *ParameterSetList

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

func (*ParameterSetList) DeepCopyInto added in v0.6.0

func (in *ParameterSetList) DeepCopyInto(out *ParameterSetList)

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

func (*ParameterSetList) DeepCopyObject added in v0.6.0

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

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

type ParameterSetSpec added in v0.6.0

type ParameterSetSpec struct {
	// AgentConfig is the name of an AgentConfig to use instead of the AgentConfig defined at the namespace or system level.
	// +optional
	AgentConfig *corev1.LocalObjectReference `json:"agentConfig,omitempty" yaml:"-"`

	// PorterConfig is the name of a PorterConfig to use instead of the PorterConfig defined at the namespace or system level.
	PorterConfig *corev1.LocalObjectReference `json:"porterConfig,omitempty" yaml:"-"`

	// SchemaVersion is the version of the parameter set state schema.
	SchemaVersion string `json:"schemaVersion" yaml:"schemaVersion"`

	// Name is the name of the parameter set in Porter. Immutable.
	Name string `json:"name" yaml:"name"`

	// Namespace (in Porter) where the parameter set is defined.
	Namespace string `json:"namespace" yaml:"namespace"`
	// Parameters list of bundle parameters in the parameter set.
	Parameters []Parameter `json:"parameters" yaml:"parameters"`
}

ParameterSetSpec defines the desired state of ParameterSet

func (*ParameterSetSpec) DeepCopy added in v0.6.0

func (in *ParameterSetSpec) DeepCopy() *ParameterSetSpec

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

func (*ParameterSetSpec) DeepCopyInto added in v0.6.0

func (in *ParameterSetSpec) DeepCopyInto(out *ParameterSetSpec)

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

func (ParameterSetSpec) ToPorterDocument added in v0.6.0

func (ps ParameterSetSpec) ToPorterDocument() ([]byte, error)

type ParameterSetStatus added in v0.6.0

type ParameterSetStatus struct {
	PorterResourceStatus `json:",inline"`
}

ParameterSetStatus defines the observed state of ParameterSet

func (*ParameterSetStatus) DeepCopy added in v0.6.0

func (in *ParameterSetStatus) DeepCopy() *ParameterSetStatus

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

func (*ParameterSetStatus) DeepCopyInto added in v0.6.0

func (in *ParameterSetStatus) DeepCopyInto(out *ParameterSetStatus)

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

type ParameterSource added in v0.6.0

type ParameterSource struct {
	// Secret is a parameter source using a secret plugin
	Secret string `json:"secret,omitempty" yaml:"secret,omitempty"`
	// Value is a paremeter source using plaintext value
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

func (*ParameterSource) DeepCopy added in v0.6.0

func (in *ParameterSource) DeepCopy() *ParameterSource

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

func (*ParameterSource) DeepCopyInto added in v0.6.0

func (in *ParameterSource) DeepCopyInto(out *ParameterSource)

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

type PluginConfig added in v0.3.0

type PluginConfig struct {
	Name         string `json:"name" yaml:"name" mapstructure:"name"`
	PluginSubKey string `json:"plugin" yaml:"plugin" mapstructure:"plugin"`

	// +kubebuilder:pruning:PreserveUnknownFields
	Config runtime.RawExtension `json:"config,omitempty" yaml:"config,omitempty" mapstructure:"config,omitempty"`
}

PluginConfig is a standardized config stanza that defines which plugin to use and its custom configuration.

func (*PluginConfig) DeepCopy added in v0.3.0

func (in *PluginConfig) DeepCopy() *PluginConfig

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

func (*PluginConfig) DeepCopyInto added in v0.3.0

func (in *PluginConfig) DeepCopyInto(out *PluginConfig)

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

func (PluginConfig) MarshalYAML added in v0.3.0

func (in PluginConfig) MarshalYAML() (interface{}, error)

MarshalYAML handles writing the plugin config with its runtime.RawExtension which only has special marshal logic for json by default.

type PorterConfig added in v0.3.0

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

	Spec PorterConfigSpec `json:"spec,omitempty"`
}

PorterConfig is the Schema for the porterconfigs API

func (*PorterConfig) DeepCopy added in v0.3.0

func (in *PorterConfig) DeepCopy() *PorterConfig

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

func (*PorterConfig) DeepCopyInto added in v0.3.0

func (in *PorterConfig) DeepCopyInto(out *PorterConfig)

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

func (*PorterConfig) DeepCopyObject added in v0.3.0

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

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

type PorterConfigList added in v0.3.0

type PorterConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PorterConfig `json:"items"`
}

PorterConfigList contains a list of PorterConfig

func (*PorterConfigList) DeepCopy added in v0.3.0

func (in *PorterConfigList) DeepCopy() *PorterConfigList

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

func (*PorterConfigList) DeepCopyInto added in v0.3.0

func (in *PorterConfigList) DeepCopyInto(out *PorterConfigList)

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

func (*PorterConfigList) DeepCopyObject added in v0.3.0

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

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

type PorterConfigSpec added in v0.3.0

type PorterConfigSpec struct {
	// Threshold for printing messages to the console
	// Allowed values are: debug, info, warn, error
	Verbosity *string `json:"verbosity,omitempty" yaml:"verbosity,omitempty" mapstructure:"verbosity,omitempty"`

	// Namespace is the default Porter namespace.
	Namespace *string `json:"namespace,omitempty" yaml:"namespace,omitempty" mapstructure:"namespace,omitempty"`

	// Experimental specifies which experimental features are enabled.
	Experimental []string `json:"experimental,omitempty" yaml:"experimental,omitempty" mapstructure:"experimental,omitempty"`

	// BuildDriver specifies the name of the current build driver.
	// Requires that the build-drivers experimental feature is enabled.
	BuildDriver *string `json:"buildDriver,omitempty" yaml:"build-driver,omitempty" mapstructure:"build-driver,omitempty"`

	// DefaultStorage is the name of the storage configuration to use.
	DefaultStorage *string `json:"defaultStorage,omitempty" yaml:"default-storage,omitempty" mapstructure:"default-storage,omitempty"`

	// DefaultSecrets is the name of the secrets configuration to use.
	DefaultSecrets *string `json:"defaultSecrets,omitempty" yaml:"default-secrets,omitempty" mapstructure:"default-secrets,omitempty"`

	// DefaultStoragePlugin is the name of the storage plugin to use when DefaultStorage is unspecified.
	DefaultStoragePlugin *string `json:"defaultStoragePlugin,omitempty" yaml:"default-storage-plugin,omitempty" mapstructure:"default-storage-plugin,omitempty"`

	// DefaultSecretsPlugin is the name of the storage plugin to use when DefaultSecrets is unspecified.
	DefaultSecretsPlugin *string `json:"defaultSecretsPlugin,omitempty" yaml:"default-secrets-plugin,omitempty" mapstructure:"default-secrets-plugin,omitempty"`

	// Storage is a list of named storage configurations.
	Storage []StorageConfig `json:"storage,omitempty" yaml:"storage,omitempty" mapstructure:"storage,omitempty"`

	// Secrets is a list of named secrets configurations.
	Secrets []SecretsConfig `json:"secrets,omitempty" yaml:"secrets,omitempty" mapstructure:"secrets,omitempty"`
}

PorterConfigSpec defines the desired state of PorterConfig

SERIALIZATION NOTE:

Use json to persist this resource to Kubernetes.
Use yaml to convert to Porter's representation of the resource.
The mapstructure tags are used internally for PorterConfigSpec.MergeConfig.

func (*PorterConfigSpec) DeepCopy added in v0.3.0

func (in *PorterConfigSpec) DeepCopy() *PorterConfigSpec

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

func (*PorterConfigSpec) DeepCopyInto added in v0.3.0

func (in *PorterConfigSpec) DeepCopyInto(out *PorterConfigSpec)

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

func (PorterConfigSpec) MergeConfig added in v0.3.0

func (c PorterConfigSpec) MergeConfig(overrides ...PorterConfigSpec) (PorterConfigSpec, error)

MergeConfig from another PorterConfigSpec. The values from the override are applied only when they are not empty.

func (PorterConfigSpec) ToPorterDocument added in v0.3.0

func (c PorterConfigSpec) ToPorterDocument() ([]byte, error)

ToPorterDocument converts from the Kubernetes representation of the Installation into Porter's resource format.

type PorterResourceStatus added in v0.5.0

type PorterResourceStatus struct {
	// The last generation observed by the controller.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// The most recent action executed for the resource
	Action *corev1.LocalObjectReference `json:"action,omitempty"`

	// The current status of the agent.
	// Possible values are: Unknown, Pending, Running, Succeeded, and Failed.
	// +kubebuilder:validation:Type=string
	Phase AgentPhase `json:"phase,omitempty"`

	// Conditions store a list of states that have been reached.
	// Each condition refers to the status of the ActiveJob
	// Possible conditions are: Scheduled, Started, Completed, and Failed
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

func (*PorterResourceStatus) DeepCopy added in v0.5.0

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

func (*PorterResourceStatus) DeepCopyInto added in v0.5.0

func (in *PorterResourceStatus) DeepCopyInto(out *PorterResourceStatus)

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

func (*PorterResourceStatus) Initialize added in v0.5.0

func (s *PorterResourceStatus) Initialize()

Initialize resets the resource status before Porter is run. This wipes out the status from any previous runs.

type SecretsConfig added in v0.3.0

type SecretsConfig struct {
	PluginConfig `json:",squash" yaml:",inline" mapstructure:",squash"`
}

SecretsConfig is the plugin stanza for secrets.

func (*SecretsConfig) DeepCopy added in v0.3.0

func (in *SecretsConfig) DeepCopy() *SecretsConfig

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

func (*SecretsConfig) DeepCopyInto added in v0.3.0

func (in *SecretsConfig) DeepCopyInto(out *SecretsConfig)

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

type StorageConfig added in v0.3.0

type StorageConfig struct {
	PluginConfig `json:",squash" yaml:",inline" mapstructure:",squash"`
}

StorageConfig is the plugin stanza for storage.

func (*StorageConfig) DeepCopy added in v0.3.0

func (in *StorageConfig) DeepCopy() *StorageConfig

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

func (*StorageConfig) DeepCopyInto added in v0.3.0

func (in *StorageConfig) DeepCopyInto(out *StorageConfig)

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
y or Y : Canonical URL