v1

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Overview

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

Index

Constants

View Source
const (
	// AnnotationAgentCfgPluginHash is the label used to store plugin hashes from a AgentConfig definition.
	AnnotationAgentCfgPluginsHash = "agent-config-plugins-hash"

	// KindAgentConfig represents AgentConfig kind value.
	KindAgentConfig = "AgentConfig"
)
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.14"

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

	LabelPluginsHash = Prefix + "plugins-hash"

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

	// VolumeImgPullSecretName is the name of the volume that contains
	// .docker/config.json file.
	VolumeImgPullSecretName = "img-pull-secret"

	// VolumeImgPullSecretPath is the mount path of the volume containing for docker
	// auth for image pull secrets.
	VolumeImgPullSecretPath = "/home/nonroot"

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

	// VolumePorterPluginsPath is the mount path of the volume containing Porter's
	// config file.
	VolumePorterPluginsPath = "/app/.porter/plugins"
)
View Source
const (
	Prefix          = "getporter.org/"
	AnnotationRetry = Prefix + "retry"
)
View Source
const (
	InstallationOutputSucceeded  = "InstallationOutputSucceeded"
	AnnotationInstallationOutput = Prefix + "installationoutput"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "getporter.org", 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
)
View Source
var DefaultPlugins = map[string]Plugin{
	"kubernetes": {},
}

DefaultPlugins is the set of default plugins that will be used by the operator.

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) CreatedByAgentConfig added in v0.8.0

func (a *AgentAction) CreatedByAgentConfig() bool

CreatedByAgentConfig checks if an AgentAction is running on behalf of an agent config.

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

	// 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"`
	Status AgentConfigStatus `json:"status,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.

func (*AgentConfig) GetStatus added in v0.8.0

func (ac *AgentConfig) GetStatus() PorterResourceStatus

func (AgentConfig) MergeConfigs added in v0.8.0

func (ac AgentConfig) MergeConfigs(overrides ...AgentConfig) (AgentConfig, error)

MergeConfigs applies override AgentConfig that's ready to be used for an AgentAction in sequential order.

func (*AgentConfig) SetStatus added in v0.8.0

func (ac *AgentConfig) SetStatus(value PorterResourceStatus)

type AgentConfigAdapter added in v0.8.0

type AgentConfigAdapter struct {
	AgentConfig
	Spec AgentConfigSpecAdapter
}

AgentConfigAdapter is a wrapper of AgentConfig schema. It process the input data so that the controller can easily work with the input.

func NewAgentConfigAdapter added in v0.8.0

func NewAgentConfigAdapter(agentCfg AgentConfig) *AgentConfigAdapter

NewAgentConfigAdapter creates a new instance of the adapter from a AgentConfig.

func (*AgentConfigAdapter) DeepCopy added in v0.8.0

func (in *AgentConfigAdapter) DeepCopy() *AgentConfigAdapter

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

func (*AgentConfigAdapter) DeepCopyInto added in v0.8.0

func (in *AgentConfigAdapter) DeepCopyInto(out *AgentConfigAdapter)

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

func (*AgentConfigAdapter) GetPluginsPVCName added in v0.8.0

func (ac *AgentConfigAdapter) GetPluginsPVCName() string

GetPluginsPVCName returns a string that's the hash using plugins spec and the AgentConfig's namespace.

func (*AgentConfigAdapter) GetPluginsPVCNameAnnotation added in v0.8.0

func (ac *AgentConfigAdapter) GetPluginsPVCNameAnnotation() map[string]string

GetPluginsPVCNameAnnotation returns a string that's the hash using plugins spec and the AgentConfig's namespace.

func (*AgentConfigAdapter) GetRetryLabelValue added in v0.8.0

func (ac *AgentConfigAdapter) 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 (*AgentConfigAdapter) SetRetryAnnotation added in v0.8.0

func (ac *AgentConfigAdapter) SetRetryAnnotation(retry string)

SetRetryAnnotation flags the resource to retry its last operation.

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
	// +optional
	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.
	// +optional
	PorterVersion string `json:"porterVersion,omitempty" mapstructure:"porterVersion,omitempty"`

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

	// StorageClassName is the name of the storage class that Porter will request
	// when running the Porter Agent. It is used to determine what the storage class
	// will be for the volume requested
	StorageClassName string `json:"storageClassName,omitempty" mapstructure:"storageClassName,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.
	// +optional
	VolumeSize string `json:"volumeSize,omitempty" mapstructure:"volumeSize,omitempty"`

	// TTLSecondsAfterFinished set the time limit of the lifetime of a Job
	// that has finished execution.
	// +kubebuilder:default:=600
	TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty" mapstructure:"ttlSecondsAftterFinished,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.
	// +optional
	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.
	// +optional
	InstallationServiceAccount string `json:"installationServiceAccount,omitempty" mapstructure:"installationServiceAccount,omitempty"`

	// RetryLimit specifies the maximum number of retries that a failed agent job will run before being marked as failure.
	// The default is set to 6 the same as the `BackoffLimit` on a kubernetes job.
	RetryLimit *int32 `json:"retryLimit,omitempty" mapstructure:"retryLimit,omitempty"`

	// PluginConfigFile specifies plugins required to run Porter bundles.
	// In order to utilize mapstructure omitempty tag with an embedded struct, this field needs to be a pointer
	// +optional
	PluginConfigFile *PluginFileSpec `json:"pluginConfigFile,omitempty" mapstructure:"pluginConfigFile,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) 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 AgentConfigSpecAdapter added in v0.8.0

type AgentConfigSpecAdapter struct {
	Plugins PluginsConfigList
	// contains filtered or unexported fields
}

AgentConfigSpecAdapter is a wrapper of AgentConfigSpec with a list representation of plugins configuration.

func NewAgentConfigSpecAdapter added in v0.8.0

func NewAgentConfigSpecAdapter(spec AgentConfigSpec) AgentConfigSpecAdapter

NewAgentConfigSpecAdapter creates a new instance of the AgentConfigSpecAdapter from a AgentConfigSpec.

func (*AgentConfigSpecAdapter) DeepCopy added in v0.8.0

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

func (*AgentConfigSpecAdapter) DeepCopyInto added in v0.8.0

func (in *AgentConfigSpecAdapter) DeepCopyInto(out *AgentConfigSpecAdapter)

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

func (AgentConfigSpecAdapter) GetInstallationServiceAccount added in v0.8.0

func (c AgentConfigSpecAdapter) GetInstallationServiceAccount() string

GetInstallationServiceAccount returns the config value of installation service account.

func (AgentConfigSpecAdapter) GetPluginsPVCName added in v0.8.0

func (c AgentConfigSpecAdapter) GetPluginsPVCName(namespace string) string

GetPluginsPVCName returns a name used for this agent config plugin persistent volume claim. Returns an empty string when no plugins are specified, in which case the PVC should not be mounted

func (AgentConfigSpecAdapter) GetPorterImage added in v0.8.0

func (c AgentConfigSpecAdapter) GetPorterImage() string

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

func (AgentConfigSpecAdapter) GetPorterRepository added in v0.8.0

func (c AgentConfigSpecAdapter) GetPorterRepository() string

GetPorterRepository returns the config value of Porter repository.

func (AgentConfigSpecAdapter) GetPorterVersion added in v0.8.0

func (c AgentConfigSpecAdapter) GetPorterVersion() string

GetPorterVersion returns the config value of Porter version.

func (AgentConfigSpecAdapter) GetPullPolicy added in v0.8.0

func (c AgentConfigSpecAdapter) 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 (*AgentConfigSpecAdapter) GetRetryLimit added in v0.8.0

func (c *AgentConfigSpecAdapter) GetRetryLimit() *int32

GetRetryLimit flags the resource to retry its last operation.

func (AgentConfigSpecAdapter) GetServiceAccount added in v0.8.0

func (c AgentConfigSpecAdapter) GetServiceAccount() string

GetServiceAccount returns the config value of service account.

func (AgentConfigSpecAdapter) GetStorageClassName added in v0.8.1

func (c AgentConfigSpecAdapter) GetStorageClassName() string

GetStorageClassName returns the name of the storage class to request for the volume.

func (*AgentConfigSpecAdapter) GetTTLSecondsAfterFinished added in v1.0.0

func (c *AgentConfigSpecAdapter) GetTTLSecondsAfterFinished() *int32

GetTTLSecondsAfterFinished returns the config value of TTLSecondsAfterFinished

func (AgentConfigSpecAdapter) GetVolumeSize added in v0.8.0

func (c AgentConfigSpecAdapter) 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 (AgentConfigSpecAdapter) ToPorterDocument added in v0.8.0

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

type AgentConfigStatus added in v0.8.0

type AgentConfigStatus struct {
	PorterResourceStatus `json:",inline"`
	// The current status of whether the AgentConfig is ready to be used for an AgentAction.
	// +kubebuilder:default:=false
	// +kubebuilder:validation:Type=boolean
	Ready bool `json:"ready"`
}

AgentConfigStatus defines the observed state of AgentConfig

func (*AgentConfigStatus) DeepCopy added in v0.8.0

func (in *AgentConfigStatus) DeepCopy() *AgentConfigStatus

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

func (*AgentConfigStatus) DeepCopyInto added in v0.8.0

func (in *AgentConfigStatus) DeepCopyInto(out *AgentConfigStatus)

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

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

	// 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 +kubebuilder:printcolumn:name="Porter Name",type="string",JSONPath=".spec.name" +kubebuilder:printcolumn:name="Porter Namespace",type="string",JSONPath=".spec.namespace" +kubebuilder:printcolumn:name="Last Action",type="string",JSONPath=".status.action.name" +kubebuilder:printcolumn:name="Last Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

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 InstallationOutput added in v1.0.0

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

	Spec   InstallationOutputSpec   `json:"spec,omitempty"`
	Status InstallationOutputStatus `json:"status,omitempty"`
}

+kubebuilder:printcolumn:name="Porter Name",type="string",JSONPath=".spec.name" +kubebuilder:printcolumn:name="Porter Namespace",type="string",JSONPath=".spec.namespace" +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Output Names",type="string",JSONPath=".status.outputNames",priority=1 InstallationOutput is the Schema for the installationoutputs API

func (*InstallationOutput) DeepCopy added in v1.0.0

func (in *InstallationOutput) DeepCopy() *InstallationOutput

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

func (*InstallationOutput) DeepCopyInto added in v1.0.0

func (in *InstallationOutput) DeepCopyInto(out *InstallationOutput)

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

func (*InstallationOutput) DeepCopyObject added in v1.0.0

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

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

type InstallationOutputList added in v1.0.0

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

InstallationOutputList contains a list of InstallationOutput

func (*InstallationOutputList) DeepCopy added in v1.0.0

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

func (*InstallationOutputList) DeepCopyInto added in v1.0.0

func (in *InstallationOutputList) DeepCopyInto(out *InstallationOutputList)

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

func (*InstallationOutputList) DeepCopyObject added in v1.0.0

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

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

type InstallationOutputSpec added in v1.0.0

type InstallationOutputSpec struct {
	Name string `json:"name,omitempty"`

	Namespace string `json:"namespace,omitempty"`
}

InstallationOutputSpec defines the desired state of InstallationOutput

func (*InstallationOutputSpec) DeepCopy added in v1.0.0

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

func (*InstallationOutputSpec) DeepCopyInto added in v1.0.0

func (in *InstallationOutputSpec) DeepCopyInto(out *InstallationOutputSpec)

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

type InstallationOutputStatus added in v1.0.0

type InstallationOutputStatus struct {
	Phase AgentPhase `json:"phase,omitempty"`

	Conditions []metav1.Condition `json:"conditions,omitempty"`

	Outputs []Output `json:"outputs,omitempty"`

	OutputNames string `json:"outputNames,omitempty"`
}

InstallationOutputStatus defines the observed state of InstallationOutput

func (*InstallationOutputStatus) DeepCopy added in v1.0.0

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

func (*InstallationOutputStatus) DeepCopyInto added in v1.0.0

func (in *InstallationOutputStatus) DeepCopyInto(out *InstallationOutputStatus)

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

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

	// 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 Output added in v1.0.0

type Output struct {
	Name      string `json:"name"`
	Type      string `json:"type"`
	Sensitive bool   `json:"sensitive"`
	Value     string `json:"value"`
}

func (*Output) DeepCopy added in v1.0.0

func (in *Output) DeepCopy() *Output

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

func (*Output) DeepCopyInto added in v1.0.0

func (in *Output) DeepCopyInto(out *Output)

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

	// 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 Plugin added in v0.8.0

type Plugin struct {
	FeedURL string `json:"feedURL,omitempty" mapstructure:"feedURL,omitempty"`
	URL     string `json:"url,omitempty" mapstructure:"url,omitempty"`
	Mirror  string `json:"mirror,omitempty" mapstructure:"mirror,omitempty"`
	Version string `json:"version,omitempty" mapstructure:"version,omitempty"`
}

Plugin represents the plugin configuration.

func (*Plugin) DeepCopy added in v0.8.0

func (in *Plugin) DeepCopy() *Plugin

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

func (*Plugin) DeepCopyInto added in v0.8.0

func (in *Plugin) DeepCopyInto(out *Plugin)

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 PluginFileSpec added in v0.8.0

type PluginFileSpec struct {
	// SchemaVersion is the version of the plugins configuration state schema.
	SchemaVersion string `json:"schemaVersion" yaml:"schemaVersion"`

	// Plugins is a map of plugin configuration using plugin name as the key.
	Plugins map[string]Plugin `json:"plugins,omitempty" mapstructure:"plugins,omitempty"`
}

func (*PluginFileSpec) DeepCopy added in v0.8.0

func (in *PluginFileSpec) DeepCopy() *PluginFileSpec

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

func (*PluginFileSpec) DeepCopyInto added in v0.8.0

func (in *PluginFileSpec) DeepCopyInto(out *PluginFileSpec)

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

type PluginsConfigList added in v0.8.0

type PluginsConfigList struct {
	// contains filtered or unexported fields
}

PluginConfigList is the list implementation of the Plugins map. The list is sorted based on the plugin names alphabetically.

func NewPluginsList added in v0.8.0

func NewPluginsList(ps map[string]Plugin) PluginsConfigList

NewPluginsList creates a new instance of PluginsConfigList.

func (*PluginsConfigList) Add added in v0.8.0

func (op *PluginsConfigList) Add(name string, p Plugin)

Add adds a new item into the list.

func (*PluginsConfigList) DeepCopy added in v0.8.0

func (in *PluginsConfigList) DeepCopy() *PluginsConfigList

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

func (*PluginsConfigList) DeepCopyInto added in v0.8.0

func (in *PluginsConfigList) DeepCopyInto(out *PluginsConfigList)

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

func (PluginsConfigList) GetByName added in v0.8.0

func (op PluginsConfigList) GetByName(name string) (Plugin, bool)

GetByName returns a plugin based on its name and true if the plugin is found. if a plugin is not found in the list, the function returns an empty plugin and false.

func (PluginsConfigList) GetLabels added in v0.8.0

func (op PluginsConfigList) GetLabels() map[string]string

GetLabels returns a hash of all plugin configs that is safe to use as a label value and represents the plugin configuration used to trigger reconciliation. labels are restricted to alphanumeric and .-_ value. the maximum characters a label can contain is 63. therefore all URLs will be sanitized before using them as part of the label.

func (PluginsConfigList) GetNames added in v0.8.0

func (op PluginsConfigList) GetNames() []string

GetNames returns an array of plugin names in the list sorted alphabetically.

func (PluginsConfigList) GetPVCName added in v0.8.0

func (op PluginsConfigList) GetPVCName(namespace string) string

GetPVCName returns a hash of the plugin configs. if no plugins are defined, it returns an empty string.

func (PluginsConfigList) GetPVCNameAnnotation added in v0.8.0

func (op PluginsConfigList) GetPVCNameAnnotation(namespace string) map[string]string

GetPVCNameAnnotation returns a string that's the hash using plugins spec and the AgentConfig's namespace.

func (PluginsConfigList) IsZero added in v0.8.0

func (op PluginsConfigList) IsZero() bool

IsZero checks whether the list is empty.

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:"build-driver,omitempty" yaml:"build-driver,omitempty" mapstructure:"build-driver,omitempty"`

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

	// DefaultSecrets is the name of the secrets configuration to use.
	DefaultSecrets *string `json:"default-secrets,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 `` /* 127-byte string literal not displayed */

	// DefaultSecretsPlugin is the name of the storage plugin to use when DefaultSecrets is unspecified.
	DefaultSecretsPlugin *string `` /* 127-byte string literal not displayed */

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

	// Telemetry is settings related to Porter's tracing with open telemetry.
	Telemetry TelemetryConfig `json:"telemetry,omitempty" yaml:"telemetry,omitempty" mapstructure:"telemetry,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:",inline" 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:",inline" 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.

type TelemetryConfig added in v1.0.0

type TelemetryConfig struct {
	Enabled        *bool              `json:"enabled,omitempty" yaml:"enabled,omitempty" mapstructure:"enabled,"`
	Endpoint       *string            `json:"endpoint,omitempty" yaml:"endpoint,omitempty" mapstructure:"endpoint,"`
	Protocol       *string            `json:"protocol,omitempty" yaml:"protocol,omitempty" mapstructure:"protocol,"`
	Insecure       *bool              `json:"insecure,omitempty" yaml:"insecure,omitempty" mapstructure:"insecure,"`
	Certificate    *string            `json:"certificate,omitempty" yaml:"certificate,omitempty" mapstructure:"certificate,"`
	Headers        *map[string]string `json:"headers,omitempty" yaml:"headers,omitempty" mapstructure:"headers,"`
	Timeout        *string            `json:"timeout,omitempty" yaml:"timeout,omitempty" mapstructure:"timeout,"`
	Compression    *string            `json:"compression,omitempty" yaml:"compression,omitempty" mapstructure:"compression,"`
	StartTimeout   *string            `json:"start-timeout,omitempty" yaml:"start-timeout,omitempty" mapstructure:"start-timeout,"`
	RedirectToFile *string            `json:"redirect-to-file,omitempty" yaml:"redirect-to-file,omitempty" mapstructure:"redirect-to-file,"`
}

TelemetryConfig specifies how to connect to an open telemetry collector. See https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/otlp/otlptrace

func (*TelemetryConfig) DeepCopy added in v1.0.0

func (in *TelemetryConfig) DeepCopy() *TelemetryConfig

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

func (*TelemetryConfig) DeepCopyInto added in v1.0.0

func (in *TelemetryConfig) DeepCopyInto(out *TelemetryConfig)

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