Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Add optional field to BundleDeployment API to enable/disable CRD upgrade safety preflight checks #902

Merged
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
18 changes: 18 additions & 0 deletions api/v1alpha2/bundledeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,24 @@ type BundleDeploymentSpec struct {
//
// config is provisioner specific configurations
Config runtime.RawExtension `json:"config,omitempty"`

//+kubebuilder:Optional
// Preflight defines the configuration of preflight checks.
Preflight *PreflightConfig `json:"preflight,omitempty"`
}

// PreflightConfig holds the configuration for the preflight checks.
type PreflightConfig struct {
//+kubebuilder:Required
// CRDUpgradeSafety holds necessary configuration for the CRD Upgrade Safety preflight checks.
CRDUpgradeSafety *CRDUpgradeSafetyPreflightConfig `json:"crdUpgradeSafety,omitempty"`
rashmigottipati marked this conversation as resolved.
Show resolved Hide resolved
}

// CRDUpgradeSafetyPreflightConfig is the configuration for CRD upgrade safety preflight check.
type CRDUpgradeSafetyPreflightConfig struct {
//+kubebuilder:Required
// Disabled represents the state of the CRD upgrade safety preflight check being disabled/enabled.
Disabled bool `json:"disabled,omitempty"`
}

// BundleDeploymentStatus defines the observed state of BundleDeployment
Expand Down
40 changes: 40 additions & 0 deletions api/v1alpha2/zz_generated.deepcopy.go

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

13 changes: 13 additions & 0 deletions manifests/base/apis/crds/core.rukpak.io_bundledeployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,19 @@ spec:
maxLength: 63
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
type: string
preflight:
description: Preflight defines the configuration of preflight checks.
properties:
crdUpgradeSafety:
description: CRDUpgradeSafety holds necessary configuration for
the CRD Upgrade Safety preflight checks.
properties:
disabled:
description: Disabled represents the state of the CRD upgrade
safety preflight check being disabled/enabled.
type: boolean
type: object
type: object
provisionerClassName:
description: provisionerClassName sets the name of the provisioner
that should reconcile this BundleDeployment.
Expand Down
Loading