Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions apis/cluster/v1beta1/workspace_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,19 @@ const (
ModuleSourceInline ModuleSource = "Inline"
)

// RemotePullPolicy determines when to pull remote module sources.
// +kubebuilder:validation:Enum=Always;IfNotPresent
type RemotePullPolicy string

// Remote pull policies.
const (
// RemotePullPolicyAlways pulls remote source on every reconciliation (default)
RemotePullPolicyAlways RemotePullPolicy = "Always"

// RemotePullPolicyIfNotPresent pulls remote source only if not already present
RemotePullPolicyIfNotPresent RemotePullPolicy = "IfNotPresent"
)

// WorkspaceParameters are the configurable fields of a Workspace.
type WorkspaceParameters struct {
// The root module of this workspace; i.e. the module containing its main.tf
Expand Down Expand Up @@ -145,12 +158,21 @@ type WorkspaceParameters struct {
// Boolean value to indicate CLI logging of tofu execution is enabled or not
// +optional
EnableTofuCLILogging bool `json:"enableTofuCLILogging,omitempty"`

// RemotePullPolicy determines when to download remote module sources.
// +optional
// +kubebuilder:default=Always
RemotePullPolicy *RemotePullPolicy `json:"remotePullPolicy,omitempty"`
}

// WorkspaceObservation are the observable fields of a Workspace.
type WorkspaceObservation struct {
Checksum string `json:"checksum,omitempty"`
Outputs map[string]extensionsV1.JSON `json:"outputs,omitempty"`

// RemoteSource is the remote module URL that was last retrieved
// +optional
RemoteSource string `json:"remoteSource,omitempty"`
}

// A WorkspaceSpec defines the desired state of a Workspace.
Expand Down
5 changes: 5 additions & 0 deletions apis/cluster/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions apis/namespaced/v1beta1/workspace_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ const (
ModuleSourceInline ModuleSource = "Inline"
)

// RemotePullPolicy determines when to pull remote module sources.
// +kubebuilder:validation:Enum=Always;IfNotPresent
type RemotePullPolicy string

// Remote pull policies.
const (
// RemotePullPolicyAlways pulls remote source on every reconciliation (default)
RemotePullPolicyAlways RemotePullPolicy = "Always"

// RemotePullPolicyIfNotPresent pulls remote source only if not already present
RemotePullPolicyIfNotPresent RemotePullPolicy = "IfNotPresent"
)

// WorkspaceParameters are the configurable fields of a Workspace.
type WorkspaceParameters struct {
// The root module of this workspace; i.e. the module containing its main.tf
Expand Down Expand Up @@ -144,12 +157,21 @@ type WorkspaceParameters struct {
// Boolean value to indicate CLI logging of tofu execution is enabled or not
// +optional
EnableTofuCLILogging bool `json:"enableTofuCLILogging,omitempty"`

// RemotePullPolicy determines when to download remote module sources.
// +optional
// +kubebuilder:default=Always
RemotePullPolicy *RemotePullPolicy `json:"remotePullPolicy,omitempty"`
}

// WorkspaceObservation are the observable fields of a Workspace.
type WorkspaceObservation struct {
Checksum string `json:"checksum,omitempty"`
Outputs map[string]extensionsV1.JSON `json:"outputs,omitempty"`

// RemoteSource is the remote module URL that was last retrieved
// +optional
RemoteSource string `json:"remoteSource,omitempty"`
}

// A WorkspaceSpec defines the desired state of a Workspace.
Expand Down
5 changes: 5 additions & 0 deletions apis/namespaced/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading