Skip to content

Commit

Permalink
NETOBSERV-1513: Remove v1alpha1, deprecate v1beta1, store v1beta2 (ne…
Browse files Browse the repository at this point in the history
…tobserv#577)

* NETOBSERV-1513: Remove v1alpha1, deprecate v1beta1, store v1beta2

* disable hack-crd-for-test hack
  • Loading branch information
jotak authored Feb 21, 2024
1 parent d3053bc commit f4d840b
Show file tree
Hide file tree
Showing 24 changed files with 207 additions and 17,944 deletions.
3 changes: 3 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ export IMAGE=quay.io/$USER/network-observability-operator:test
export BUNDLE_IMAGE=quay.io/$USER/network-observability-operator-bundle:v0.0.0-test
make images
make bundle bundle-build bundle-push

# or, alternatively:
BUNDLE_VERSION=0.0.0-test VERSION=test make images bundle bundle-build bundle-push
```

Optionally, you might validate the bundle:
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -266,24 +266,24 @@ doc: crdoc ## Generate markdown documentation
$(CRDOC) --resources config/crd/bases/flows.netobserv.io_flowcollectors.yaml --output docs/FlowCollector.md

generate-go-conversions: $(CONVERSION_GEN) ## Run all generate-go-conversions
$(MAKE) clean-generated-conversions SRC_DIRS="./apis/flowcollector/v1alpha1,./apis/flowcollector/v1beta1"
$(MAKE) clean-generated-conversions SRC_DIRS="./apis/flowcollector/v1beta1"
$(CONVERSION_GEN) \
--input-dirs=./apis/flowcollector/v1alpha1 \
--input-dirs=./apis/flowcollector/v1beta1 \
--build-tag=ignore_autogenerated_core \
--output-file-base=zz_generated.conversion \
$(CONVERSION_GEN_OUTPUT_BASE) \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt

.PHONY: hack-crd-for-test
hack-crd-for-test: YQ
cat ./config/crd/bases/flows.netobserv.io_flowcollectors.yaml \
| $(YQ) eval-all \
'(.spec.versions.[]|select(.name != "v1beta2").storage) = false,(.spec.versions.[]|select(.name == "v1beta2").storage) = true' \
> ./hack/cloned.flows.netobserv.io_flowcollectors.yaml
cp ./config/crd/bases/flows.netobserv.io_flowmetrics.yaml ./hack/cloned.flows.netobserv.io_flowmetrics.yaml
# Hack to reintroduce when the API stored version != latest version; see also envtest.go (CRD path config)
# .PHONY: hack-crd-for-test
# hack-crd-for-test: YQ
# cat ./config/crd/bases/flows.netobserv.io_flowcollectors.yaml \
# | $(YQ) eval-all \
# '(.spec.versions.[]|select(.name != "v1beta2").storage) = false,(.spec.versions.[]|select(.name == "v1beta2").storage) = true' \
# > ./hack/cloned.flows.netobserv.io_flowcollectors.yaml
# cp ./config/crd/bases/flows.netobserv.io_flowmetrics.yaml ./hack/cloned.flows.netobserv.io_flowmetrics.yaml

generate: gencode manifests hack-crd-for-test doc generate-go-conversions ## Run all code/file generators
generate: gencode manifests doc generate-go-conversions ## Run all code/file generators

.PHONY: clean-generated-conversions
clean-generated-conversions: ## Remove files generated by conversion-gen from the mentioned dirs
Expand Down
2 changes: 1 addition & 1 deletion PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ resources:
domain: netobserv.io
group: flows
kind: FlowMetric
path: github.com/netobserv/network-observability-operator/apis/flowcollector/v1alpha1
path: github.com/netobserv/network-observability-operator/apis/flowmetrics/v1alpha1
version: v1alpha1
version: "3"
18 changes: 0 additions & 18 deletions apis/flowcollector/v1alpha1/doc.go

This file was deleted.

Loading

0 comments on commit f4d840b

Please sign in to comment.