Skip to content

Commit f8f9819

Browse files
authored
feat: allow operator-sdk install to be customizable (#6443)
- This allows the operator-sdk install to customizable via Makefile. If necessary, a specific version can be downloaded and used. Signed-off-by: Gabe Alford <[email protected]>
1 parent 716bfab commit f8f9819

File tree

9 files changed

+221
-36
lines changed

9 files changed

+221
-36
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
Add a Parameter to the Makefile to allow modifying the
6+
'operator-sdk' binary before running any commands. If
7+
necessary, a specific version of the SDK can be downloaded
8+
for cases when the project has yet to upgrade to a later or
9+
latest version.
10+
kind: addition
11+
breaking: false

internal/plugins/manifests/v2/init.go

Lines changed: 59 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828

2929
"github.com/operator-framework/operator-sdk/internal/plugins/manifests/v2/templates/config/manifests"
3030
"github.com/operator-framework/operator-sdk/internal/util/projutil"
31+
"github.com/operator-framework/operator-sdk/internal/version"
3132
)
3233

3334
// Version of `opm` to download and use for building index images.
@@ -68,7 +69,15 @@ func (s *initSubcommand) Scaffold(fs machinery.Filesystem) error {
6869
}
6970
projectName = strings.ToLower(filepath.Base(dir))
7071
}
71-
makefileBytes = append([]byte(fmt.Sprintf(makefileBundleVarFragment, s.config.GetDomain(), projectName)), makefileBytes...)
72+
makefileBytes = append([]byte(fmt.Sprintf(makefileBundleVarFragment, s.config.GetDomain(), projectName, strings.Trim(version.Version, "+git"))), makefileBytes...)
73+
74+
// Append SDK recipes.
75+
switch operatorType {
76+
case projutil.OperatorTypeGo:
77+
makefileBytes = append(makefileBytes, []byte(makefileSDKFragmentGo)...)
78+
default:
79+
makefileBytes = append(makefileBytes, []byte(makefileSDKFragmentNonGo)...)
80+
}
7281

7382
// Append bundle recipes.
7483
switch operatorType {
@@ -168,24 +177,65 @@ USE_IMAGE_DIGESTS ?= false
168177
ifeq ($(USE_IMAGE_DIGESTS), true)
169178
BUNDLE_GEN_FLAGS += --use-image-digests
170179
endif
180+
181+
# Set the Operator SDK version to use. By default, what is installed on the system is used.
182+
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
183+
OPERATOR_SDK_VERSION ?= %[3]s
184+
`
185+
186+
makefileSDKFragmentGo = `
187+
.PHONY: operator-sdk
188+
OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk
189+
operator-sdk: ## Download operator-sdk locally if necessary.
190+
ifeq (,$(wildcard $(OPERATOR_SDK)))
191+
ifeq (, $(shell which operator-sdk 2>/dev/null))
192+
@{ \
193+
set -e ;\
194+
mkdir -p $(dir $(OPERATOR_SDK)) ;\
195+
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
196+
curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$${OS}_$${ARCH} ;\
197+
chmod +x $(OPERATOR_SDK) ;\
198+
}
199+
else
200+
OPERATOR_SDK = $(shell which operator-sdk)
201+
endif
202+
endif
203+
`
204+
205+
makefileSDKFragmentNonGo = `
206+
.PHONY: operator-sdk
207+
OPERATOR_SDK ?= ./bin/operator-sdk
208+
operator-sdk: ## Download operator-sdk locally if necessary.
209+
ifeq (,$(wildcard $(OPERATOR_SDK)))
210+
ifeq (, $(shell which operator-sdk 2>/dev/null))
211+
@{ \
212+
set -e ;\
213+
mkdir -p $(dir $(OPERATOR_SDK)) ;\
214+
curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$(OS)_$(ARCH) ;\
215+
chmod +x $(OPERATOR_SDK) ;\
216+
}
217+
else
218+
OPERATOR_SDK = $(shell which operator-sdk)
219+
endif
220+
endif
171221
`
172222

173223
makefileBundleFragmentGo = `
174224
.PHONY: bundle
175-
bundle: manifests kustomize ## Generate bundle manifests and metadata, then validate generated files.
176-
operator-sdk generate kustomize manifests -q
225+
bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
226+
$(OPERATOR_SDK) generate kustomize manifests -q
177227
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
178-
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
179-
operator-sdk bundle validate ./bundle
228+
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
229+
$(OPERATOR_SDK) bundle validate ./bundle
180230
`
181231

182232
makefileBundleFragmentNonGo = `
183233
.PHONY: bundle
184-
bundle: kustomize ## Generate bundle manifests and metadata, then validate generated files.
185-
operator-sdk generate kustomize manifests -q
234+
bundle: kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
235+
$(OPERATOR_SDK) generate kustomize manifests -q
186236
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
187-
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
188-
operator-sdk bundle validate ./bundle
237+
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
238+
$(OPERATOR_SDK) bundle validate ./bundle
189239
`
190240

191241
makefileBundleBuildPushFragment = `

internal/testutils/olm.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ PKG_MAN_OPTS ?= $(PKG_FROM_VERSION) $(PKG_CHANNELS) $(PKG_IS_DEFAULT_CHANNEL)
4444
4545
# Generate package manifests.
4646
packagemanifests: kustomize %s
47-
operator-sdk generate kustomize manifests -q --interactive=false
47+
$(OPERATOR_SDK) generate kustomize manifests -q --interactive=false
4848
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
49-
$(KUSTOMIZE) build config/manifests | operator-sdk generate packagemanifests -q --version $(VERSION) $(PKG_MAN_OPTS)
49+
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate packagemanifests -q --version $(VERSION) $(PKG_MAN_OPTS)
5050
`
5151

5252
// AddPackagemanifestsTarget will append the packagemanifests target to the makefile
@@ -78,7 +78,7 @@ func (tc TestContext) AddPackagemanifestsTarget(operatorType projutil.OperatorTy
7878
func (tc TestContext) DisableManifestsInteractiveMode() error {
7979
// Todo: check if we cannot improve it since the replace/content will exists in the
8080
// pkgmanifest target if it be scaffolded before this call
81-
content := "operator-sdk generate kustomize manifests"
81+
content := "$(OPERATOR_SDK) generate kustomize manifests"
8282
replace := content + " --interactive=false"
8383
return ReplaceInFile(filepath.Join(tc.Dir, "Makefile"), content, replace)
8484
}

testdata/ansible/memcached-operator/Makefile

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ ifeq ($(USE_IMAGE_DIGESTS), true)
4646
BUNDLE_GEN_FLAGS += --use-image-digests
4747
endif
4848

49+
# Set the Operator SDK version to use. By default, what is installed on the system is used.
50+
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
51+
OPERATOR_SDK_VERSION ?= v1.29.0
52+
4953
# Image URL to use all building/pushing image targets
5054
IMG ?= controller:latest
5155

@@ -155,12 +159,28 @@ ANSIBLE_OPERATOR = $(shell which ansible-operator)
155159
endif
156160
endif
157161

162+
.PHONY: operator-sdk
163+
OPERATOR_SDK ?= ./bin/operator-sdk
164+
operator-sdk: ## Download operator-sdk locally if necessary.
165+
ifeq (,$(wildcard $(OPERATOR_SDK)))
166+
ifeq (, $(shell which operator-sdk 2>/dev/null))
167+
@{ \
168+
set -e ;\
169+
mkdir -p $(dir $(OPERATOR_SDK)) ;\
170+
curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$(OS)_$(ARCH) ;\
171+
chmod +x $(OPERATOR_SDK) ;\
172+
}
173+
else
174+
OPERATOR_SDK = $(shell which operator-sdk)
175+
endif
176+
endif
177+
158178
.PHONY: bundle
159-
bundle: kustomize ## Generate bundle manifests and metadata, then validate generated files.
160-
operator-sdk generate kustomize manifests --interactive=false -q
179+
bundle: kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
180+
$(OPERATOR_SDK) generate kustomize manifests --interactive=false -q
161181
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
162-
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
163-
operator-sdk bundle validate ./bundle
182+
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
183+
$(OPERATOR_SDK) bundle validate ./bundle
164184

165185
.PHONY: bundle-build
166186
bundle-build: ## Build the bundle image.

testdata/go/v3/memcached-operator/Makefile

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ ifeq ($(USE_IMAGE_DIGESTS), true)
4646
BUNDLE_GEN_FLAGS += --use-image-digests
4747
endif
4848

49+
# Set the Operator SDK version to use. By default, what is installed on the system is used.
50+
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
51+
OPERATOR_SDK_VERSION ?= v1.29.0
52+
4953
# Image URL to use all building/pushing image targets
5054
IMG ?= controller:latest
5155
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
@@ -206,12 +210,29 @@ envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
206210
$(ENVTEST): $(LOCALBIN)
207211
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
208212

213+
.PHONY: operator-sdk
214+
OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk
215+
operator-sdk: ## Download operator-sdk locally if necessary.
216+
ifeq (,$(wildcard $(OPERATOR_SDK)))
217+
ifeq (, $(shell which operator-sdk 2>/dev/null))
218+
@{ \
219+
set -e ;\
220+
mkdir -p $(dir $(OPERATOR_SDK)) ;\
221+
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
222+
curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$${OS}_$${ARCH} ;\
223+
chmod +x $(OPERATOR_SDK) ;\
224+
}
225+
else
226+
OPERATOR_SDK = $(shell which operator-sdk)
227+
endif
228+
endif
229+
209230
.PHONY: bundle
210-
bundle: manifests kustomize ## Generate bundle manifests and metadata, then validate generated files.
211-
operator-sdk generate kustomize manifests --interactive=false -q
231+
bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
232+
$(OPERATOR_SDK) generate kustomize manifests --interactive=false -q
212233
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
213-
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
214-
operator-sdk bundle validate ./bundle
234+
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
235+
$(OPERATOR_SDK) bundle validate ./bundle
215236

216237
.PHONY: bundle-build
217238
bundle-build: ## Build the bundle image.

testdata/go/v3/monitoring/memcached-operator/Makefile

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ ifeq ($(USE_IMAGE_DIGESTS), true)
4646
BUNDLE_GEN_FLAGS += --use-image-digests
4747
endif
4848

49+
# Set the Operator SDK version to use. By default, what is installed on the system is used.
50+
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
51+
OPERATOR_SDK_VERSION ?= v1.29.0
52+
4953
# Image URL to use all building/pushing image targets
5054
IMG ?= controller:latest
5155
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
@@ -221,12 +225,29 @@ envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
221225
$(ENVTEST): $(LOCALBIN)
222226
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
223227

228+
.PHONY: operator-sdk
229+
OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk
230+
operator-sdk: ## Download operator-sdk locally if necessary.
231+
ifeq (,$(wildcard $(OPERATOR_SDK)))
232+
ifeq (, $(shell which operator-sdk 2>/dev/null))
233+
@{ \
234+
set -e ;\
235+
mkdir -p $(dir $(OPERATOR_SDK)) ;\
236+
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
237+
curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$${OS}_$${ARCH} ;\
238+
chmod +x $(OPERATOR_SDK) ;\
239+
}
240+
else
241+
OPERATOR_SDK = $(shell which operator-sdk)
242+
endif
243+
endif
244+
224245
.PHONY: bundle
225-
bundle: manifests kustomize ## Generate bundle manifests and metadata, then validate generated files.
226-
operator-sdk generate kustomize manifests --interactive=false -q
246+
bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
247+
$(OPERATOR_SDK) generate kustomize manifests --interactive=false -q
227248
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
228-
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
229-
operator-sdk bundle validate ./bundle
249+
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
250+
$(OPERATOR_SDK) bundle validate ./bundle
230251

231252
.PHONY: bundle-build
232253
bundle-build: ## Build the bundle image.

testdata/go/v4-alpha/memcached-operator/Makefile

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ ifeq ($(USE_IMAGE_DIGESTS), true)
4646
BUNDLE_GEN_FLAGS += --use-image-digests
4747
endif
4848

49+
# Set the Operator SDK version to use. By default, what is installed on the system is used.
50+
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
51+
OPERATOR_SDK_VERSION ?= v1.29.0
52+
4953
# Image URL to use all building/pushing image targets
5054
IMG ?= controller:latest
5155
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
@@ -206,12 +210,29 @@ envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
206210
$(ENVTEST): $(LOCALBIN)
207211
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
208212

213+
.PHONY: operator-sdk
214+
OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk
215+
operator-sdk: ## Download operator-sdk locally if necessary.
216+
ifeq (,$(wildcard $(OPERATOR_SDK)))
217+
ifeq (, $(shell which operator-sdk 2>/dev/null))
218+
@{ \
219+
set -e ;\
220+
mkdir -p $(dir $(OPERATOR_SDK)) ;\
221+
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
222+
curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$${OS}_$${ARCH} ;\
223+
chmod +x $(OPERATOR_SDK) ;\
224+
}
225+
else
226+
OPERATOR_SDK = $(shell which operator-sdk)
227+
endif
228+
endif
229+
209230
.PHONY: bundle
210-
bundle: manifests kustomize ## Generate bundle manifests and metadata, then validate generated files.
211-
operator-sdk generate kustomize manifests --interactive=false -q
231+
bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
232+
$(OPERATOR_SDK) generate kustomize manifests --interactive=false -q
212233
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
213-
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
214-
operator-sdk bundle validate ./bundle
234+
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
235+
$(OPERATOR_SDK) bundle validate ./bundle
215236

216237
.PHONY: bundle-build
217238
bundle-build: ## Build the bundle image.

testdata/go/v4-alpha/monitoring/memcached-operator/Makefile

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ ifeq ($(USE_IMAGE_DIGESTS), true)
4646
BUNDLE_GEN_FLAGS += --use-image-digests
4747
endif
4848

49+
# Set the Operator SDK version to use. By default, what is installed on the system is used.
50+
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
51+
OPERATOR_SDK_VERSION ?= v1.29.0
52+
4953
# Image URL to use all building/pushing image targets
5054
IMG ?= controller:latest
5155
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
@@ -221,12 +225,29 @@ envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
221225
$(ENVTEST): $(LOCALBIN)
222226
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
223227

228+
.PHONY: operator-sdk
229+
OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk
230+
operator-sdk: ## Download operator-sdk locally if necessary.
231+
ifeq (,$(wildcard $(OPERATOR_SDK)))
232+
ifeq (, $(shell which operator-sdk 2>/dev/null))
233+
@{ \
234+
set -e ;\
235+
mkdir -p $(dir $(OPERATOR_SDK)) ;\
236+
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
237+
curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$${OS}_$${ARCH} ;\
238+
chmod +x $(OPERATOR_SDK) ;\
239+
}
240+
else
241+
OPERATOR_SDK = $(shell which operator-sdk)
242+
endif
243+
endif
244+
224245
.PHONY: bundle
225-
bundle: manifests kustomize ## Generate bundle manifests and metadata, then validate generated files.
226-
operator-sdk generate kustomize manifests --interactive=false -q
246+
bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
247+
$(OPERATOR_SDK) generate kustomize manifests --interactive=false -q
227248
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
228-
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
229-
operator-sdk bundle validate ./bundle
249+
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
250+
$(OPERATOR_SDK) bundle validate ./bundle
230251

231252
.PHONY: bundle-build
232253
bundle-build: ## Build the bundle image.

testdata/helm/memcached-operator/Makefile

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ ifeq ($(USE_IMAGE_DIGESTS), true)
4646
BUNDLE_GEN_FLAGS += --use-image-digests
4747
endif
4848

49+
# Set the Operator SDK version to use. By default, what is installed on the system is used.
50+
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
51+
OPERATOR_SDK_VERSION ?= v1.29.0
52+
4953
# Image URL to use all building/pushing image targets
5054
IMG ?= controller:latest
5155

@@ -154,12 +158,28 @@ HELM_OPERATOR = $(shell which helm-operator)
154158
endif
155159
endif
156160

161+
.PHONY: operator-sdk
162+
OPERATOR_SDK ?= ./bin/operator-sdk
163+
operator-sdk: ## Download operator-sdk locally if necessary.
164+
ifeq (,$(wildcard $(OPERATOR_SDK)))
165+
ifeq (, $(shell which operator-sdk 2>/dev/null))
166+
@{ \
167+
set -e ;\
168+
mkdir -p $(dir $(OPERATOR_SDK)) ;\
169+
curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$(OS)_$(ARCH) ;\
170+
chmod +x $(OPERATOR_SDK) ;\
171+
}
172+
else
173+
OPERATOR_SDK = $(shell which operator-sdk)
174+
endif
175+
endif
176+
157177
.PHONY: bundle
158-
bundle: kustomize ## Generate bundle manifests and metadata, then validate generated files.
159-
operator-sdk generate kustomize manifests --interactive=false -q
178+
bundle: kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
179+
$(OPERATOR_SDK) generate kustomize manifests --interactive=false -q
160180
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
161-
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
162-
operator-sdk bundle validate ./bundle
181+
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
182+
$(OPERATOR_SDK) bundle validate ./bundle
163183

164184
.PHONY: bundle-build
165185
bundle-build: ## Build the bundle image.

0 commit comments

Comments
 (0)