Skip to content

Commit

Permalink
Remove legacy v1beta1 CRDs (#5029)
Browse files Browse the repository at this point in the history
which removes support of OpenShift 3.11 and Kubernetes <1.16.

- Remove legacy CRDs references in the docs
- Remove OpenShift 3.11 from the supported versions
- Update OperatorHub CSV minKubeVersion to 1.16
- Remove legacy CRDs generation from Makefile and manifest-gen
- rm -rf config/crds/v1beta1
- rm -rf hack/manifest-gen/templatize
- rm -f config/all-in-one.yaml
- Remove manifest-gen test case for k8s 1.13
- Drop k8s <1.16 CRDs legacy support from manifest-gen
  • Loading branch information
thbkrkr committed Nov 17, 2021
1 parent d9bd0ee commit 97676fd
Show file tree
Hide file tree
Showing 40 changed files with 43 additions and 103,878 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ monitoring-secrets.json

# generated from merging multiple files in the Makefile
config/operator.yaml
config/operator-legacy.yaml
config/crds.yaml
config/crds-legacy.yaml

# ignore generated configuration
config/eck.yaml
Expand Down
31 changes: 3 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ dependencies:
# Generate code, CRDs and documentation
ALL_V1_CRDS=config/crds/v1/all-crds.yaml

generate: tidy generate-crds-v1 generate-crds-v1beta1 generate-config-file generate-api-docs generate-notice-file
generate: tidy generate-crds-v1 generate-config-file generate-api-docs generate-notice-file

tidy:
go mod tidy
Expand Down Expand Up @@ -118,30 +118,6 @@ generate-crds-v1: go-generate controller-gen
--set=nameOverride=$(OPERATOR_NAME) \
--set=fullnameOverride=$(OPERATOR_NAME) > config/operator.yaml



generate-crds-v1beta1: go-generate controller-gen
# Generate webhook manifest
# Webhook definitions exist in both pkg/apis and pkg/controller/elasticsearch/validation
$(CONTROLLER_GEN) webhook object:headerFile=./hack/boilerplate.go.txt paths=./pkg/apis/... paths=./pkg/controller/elasticsearch/validation/...
# Generate manifests e.g. CRD, RBAC etc.
$(CONTROLLER_GEN) crd:crdVersions=v1beta1 paths="./pkg/apis/..." output:crd:artifacts:config=config/crds/v1beta1/bases
# apply patches to work around some CRD generation issues, and merge them into a single file
kubectl kustomize config/crds/v1beta1/patches > config/crds/v1beta1/all-crds.yaml
# generate a CRD only version without the operator manifests
@ ./hack/manifest-gen/manifest-gen.sh -c -g --set=global.kubeVersion=1.12.0 > config/crds-legacy.yaml
# generate the operator manifests
@ ./hack/manifest-gen/manifest-gen.sh -g \
--profile=global \
--namespace=$(OPERATOR_NAMESPACE) \
--set=global.kubeVersion=1.12.0 \
--set=installCRDs=false \
--set=telemetry.distributionChannel=all-in-one \
--set=image.tag=$(IMG_VERSION) \
--set=image.repository=$(BASE_IMG) \
--set=nameOverride=$(OPERATOR_NAME) \
--set=fullnameOverride=$(OPERATOR_NAME) > config/operator-legacy.yaml

generate-config-file:
@hack/config-extractor/extract.sh

Expand Down Expand Up @@ -177,13 +153,12 @@ unit: clean
unit-xml: clean
ECK_TEST_LOG_LEVEL=$(LOG_VERBOSITY) gotestsum --junitfile unit-tests.xml -- -cover ./pkg/... ./cmd/... $(TEST_OPTS)

# kubebuilder 2.3.1 comes with a 1.15 control plane and we rely on it for the k8s binaries
integration: GO_TAGS += integration
integration: clean generate-crds-v1beta1
integration: clean generate-crds-v1
ECK_TEST_LOG_LEVEL=$(LOG_VERBOSITY) go test -tags='$(GO_TAGS)' ./pkg/... ./cmd/... -cover $(TEST_OPTS)

integration-xml: GO_TAGS += integration
integration-xml: clean generate-crds-v1beta1
integration-xml: clean generate-crds-v1
ECK_TEST_LOG_LEVEL=$(LOG_VERBOSITY) gotestsum --junitfile integration-tests.xml -- -tags='$(GO_TAGS)' -cover ./pkg/... ./cmd/... $(TEST_OPTS)

lint:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Current features:
Supported versions:

* Kubernetes 1.18-1.22
* OpenShift 3.11, 4.5-4.9
* OpenShift 4.5-4.9
* Elasticsearch, Kibana, APM Server: 6.8+, 7.1+
* Enterprise Search: 7.7+
* Beats: 7.0+
Expand Down
Loading

0 comments on commit 97676fd

Please sign in to comment.