Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the v1 API group +kubebuilder:object:generate=true +groupName=porter.sh
Index ¶
- Constants
- Variables
- func MergeMap(target, override map[string]interface{}) map[string]interface{}
- type AgentConfig
- type AgentConfigList
- type AgentConfigSpec
- func (in *AgentConfigSpec) DeepCopy() *AgentConfigSpec
- func (in *AgentConfigSpec) DeepCopyInto(out *AgentConfigSpec)
- func (c AgentConfigSpec) GetPorterImage() string
- func (c AgentConfigSpec) GetPullPolicy() v1.PullPolicy
- func (c AgentConfigSpec) GetVolumeSize() resource.Quantity
- func (c AgentConfigSpec) MergeConfig(overrides ...AgentConfigSpec) (AgentConfigSpec, error)
- type Installation
- type InstallationConditionType
- type InstallationList
- type InstallationPhase
- type InstallationSpec
- type InstallationStatus
- type OCIReferenceParts
- type PluginConfig
- type PorterConfig
- type PorterConfigList
- type PorterConfigSpec
- type SecretsConfig
- type StorageConfig
Constants ¶
const ( Prefix = "porter.sh/" AnnotationRetry = Prefix + "retry" )
Variables ¶
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 ¶
Types ¶
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 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. Annotations don't have limits on the value, but labels are restricted to alphanumeric and .-_ I am just hashing the annotation value here to avoid problems using it directly as a label value.
type InstallationConditionType ¶ added in v0.3.0
type InstallationConditionType string
These are valid conditions of an Installation.
const ( // ConditionScheduled means that the Porter run has been scheduled. ConditionScheduled InstallationConditionType = "Scheduled" // ConditionStarted means that the Porter run has started. ConditionStarted InstallationConditionType = "Started" // ConditionComplete means the Porter run has completed successfully. ConditionComplete InstallationConditionType = "Completed" // ConditionFailed means the Porter run failed. ConditionFailed InstallationConditionType = "Failed" )
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 InstallationPhase ¶ added in v0.3.0
type InstallationPhase string
These are valid statuses for an Installation.
const ( // PhaseUnknown means that we don't know what porter is doing yet. PhaseUnknown InstallationPhase = "Unknown" // PhasePending means that Porter's execution is pending. PhasePending InstallationPhase = "Pending" // PhasePending indicates that Porter is running. PhaseRunning InstallationPhase = "Running" // PhaseSucceeded means that calling Porter succeeded. PhaseSucceeded InstallationPhase = "Succeeded" // PhaseFailed means that calling Porter failed. PhaseFailed InstallationPhase = "Failed" )
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 v1.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 v1.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 { // The last generation observed by the controller. ObservedGeneration int64 `json:"observedGeneration,omitempty"` // The currently active job that is running Porter. ActiveJob *v1.LocalObjectReference `json:"activeJob,omitempty"` // The current status of the installation // Possible values are: Unknown, Pending, Running, Succeeded, and Failed. // +kubebuilder:validation:Type=string Phase InstallationPhase `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"` }
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.
func (*InstallationStatus) Initialize ¶ added in v0.3.0
func (s *InstallationStatus) Initialize()
Reset the installation status before Porter is run. This wipes out the status from any previous runs.
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 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 { // Debug specifies if Porter should output debug logs. Debug *bool `json:"debug,omitempty" yaml:"debug,omitempty" mapstructure:"debug,omitempty"` // DebugPlugins specifies if Porter should output debug logs for the plugins. DebugPlugins *bool `json:"debugPlugins,omitempty" yaml:"debug-plugins,omitempty" mapstructure:"debug-plugins,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" mapstructure:"default-storage-plugin"` // DefaultSecretsPlugin is the name of the storage plugin to use when DefaultSecrets is unspecified. DefaultSecretsPlugin *string `json:"defaultSecretsPlugin" yaml:"default-secrets-plugin" mapstructure:"default-secrets-plugin"` // 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 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.