Skip to content

Commit

Permalink
Add field to Extension API to skip crd safety checks
Browse files Browse the repository at this point in the history
Signed-off-by: everettraven <everettraven@gmail.com>
  • Loading branch information
everettraven committed Mar 27, 2024
1 parent 01eff91 commit 66e614a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ generate: $(CONTROLLER_GEN) #EXHELP Generate code containing DeepCopy, DeepCopyI
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."

.PHONY: verify
verify: tidy fmt vet generate #HELP Verify all generated code is up-to-date.
verify: tidy fmt vet generate manifests #HELP Verify all generated code is up-to-date.
git diff --exit-code

.PHONY: fmt
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/extension_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ type ExtensionSpec struct {

// source of Extension to be installed
Source ExtensionSource `json:"source"`

//+kubebuilder:Optional
//
// skipCRDUpgradeSafetyCheck specifies whether or not the CRD upgrade safety checks should be skipped when attempting to install the extension
SkipCRDUpgradeSafetyCheck bool `json:"skipCRDUpgradeSafetyCheck,omitempty"`
}

// ExtensionStatus defines the observed state of Extension
Expand Down
5 changes: 5 additions & 0 deletions config/crd/bases/olm.operatorframework.io_extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ spec:
maxLength: 253
pattern: ^[a-z0-9]+([\.-][a-z0-9]+)*$
type: string
skipCRDUpgradeSafetyCheck:
description: skipCRDUpgradeSafetyCheck specifies whether or not the
CRD upgrade safety checks should be skipped when attempting to install
the extension
type: boolean
source:
description: source of Extension to be installed
properties:
Expand Down

0 comments on commit 66e614a

Please sign in to comment.