Skip to content
Draft
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
2 changes: 1 addition & 1 deletion make/env.mk
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ TAG := $(BUILD_TAG)
endif

ifeq ($(TAG),)
TAG=$(shell git describe --tags --abbrev=10 --dirty --long --exclude '*-nightly-*')
TAG=$(shell git describe --tags --abbrev=10 --long --exclude '*-nightly-*')
endif

# Set expiration on Quay.io for non-release tags.
Expand Down
16 changes: 9 additions & 7 deletions operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,17 @@ build-installer: manifests generate kustomize ## Generate a consolidated YAML wi
$(KUSTOMIZE) build build/dist > dist/install.yaml

.PHONY: chart
chart: kubebuilder manifests ## Generate a helm chart with all necessary resources.
chart: kubebuilder manifests build-installer ## Generate a helm chart with all necessary resources.
# The dependency above makes sure protos are up to date, so we can skip this time-consuming process below
# by specifying the SKIP env var. Otherwise each target that kubebuilder invokes (and there is a bunch) would regen protos.
rm -rf dist/chart
# Run the sed and kubebuilder as a single command, propagating the VERSION from when the directory is still pristine, to prevent -dirty suffix while PROJECT is modified.
set -e; \
if [[ "$(ROX_IMAGE_FLAVOR)" = opensource ]]; then sed -i'.bak' -e 's,^projectName: rhacs-operator,projectName: stackrox-operator,' PROJECT; fi; \
VERSION=$(VERSION) ROX_OPERATOR_SKIP_PROTO_GENERATED_SRCS=true $(KUBEBUILDER) edit --plugins=helm/v2-alpha --force
if [[ "$(ROX_IMAGE_FLAVOR)" = opensource ]]; then mv PROJECT.bak PROJECT; fi
rm -rf dist/chart build/chart
mkdir -p build/chart
ifeq ($(ROX_IMAGE_FLAVOR), opensource)
sed -e 's,^projectName: rhacs-operator,projectName: stackrox-operator,' PROJECT > build/chart/PROJECT
else
cp PROJECT build/chart/PROJECT
endif
cd build/chart && VERSION=$(VERSION) ROX_OPERATOR_SKIP_PROTO_GENERATED_SRCS=true $(KUBEBUILDER) edit --plugins=helm/v2-alpha --force --manifests $(PROJECT_DIR)/dist/install.yaml --output-dir $(PROJECT_DIR)/dist
sed -i'.bak' -e 's,0.1.0,$(VERSION),g' dist/chart/Chart.yaml
rm -f dist/chart/Chart.yaml.bak

Expand Down
2 changes: 2 additions & 0 deletions operator/tools/kubebuilder/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ go 1.25.7

require sigs.k8s.io/kubebuilder/v4 v4.13.1

replace sigs.k8s.io/kubebuilder/v4 => github.com/camilamacedo86/kubebuilder/v4 v4.0.0-20260407151507-1da33d29230e

require (
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
Expand Down
4 changes: 2 additions & 2 deletions operator/tools/kubebuilder/go.sum

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

Loading