Skip to content
Merged
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
10 changes: 8 additions & 2 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.2.2. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.2.3. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
GOPATH ?= $(shell go env GOPATH)
GOBIN ?= $(firstword $(subst :, ,${GOPATH}))/bin
Expand Down Expand Up @@ -38,5 +38,11 @@ OPERATOR_SDK := $(GOBIN)/operator-sdk-v0.18.2
$(OPERATOR_SDK): .bingo/operator-sdk.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/operator-sdk-v0.18.2"
@cd .bingo && $(GO) build -mod=mod -modfile=operator-sdk.mod -o=$(GOBIN)/operator-sdk-v0.18.2 "github.com/operator-framework/operator-sdk/cmd/operator-sdk"
@cd .bingo && $(GO) build -mod=mod -modfile=operator-sdk.mod -o=$(GOBIN)/operator-sdk-v0.18.2 "github.com/operator-framework/operator-sdk/cmd/operator-sdk"

OPM := $(GOBIN)/opm-v1.13.6
$(OPM): .bingo/opm.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/opm-v1.13.6"
@cd .bingo && $(GO) build -mod=mod -modfile=opm.mod -o=$(GOBIN)/opm-v1.13.6 "github.com/operator-framework/operator-registry/cmd/opm"

5 changes: 5 additions & 0 deletions .bingo/opm.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.14

require github.com/operator-framework/operator-registry v1.13.6 // cmd/opm
7 changes: 5 additions & 2 deletions .bingo/variables.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.2.2. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.2.3. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
gobin=$(go env GOBIN)
Expand All @@ -14,4 +14,7 @@ GOLANGCI_LINT="${gobin}/golangci-lint-v1.27.0"

JUNITREPORT="${gobin}/junitreport"

OPERATOR_SDK="${gobin}/operator-sdk-v0.18.2"
OPERATOR_SDK="${gobin}/operator-sdk-v0.18.2"

OPM="${gobin}/opm-v1.13.6"

23 changes: 8 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export GOROOT=$(shell go env GOROOT)
export GOFLAGS=-mod=vendor
export GO111MODULE=on

export OCP_VERSION=4.6

export APP_NAME=elasticsearch-operator
IMAGE_TAG?=127.0.0.1:5000/openshift/origin-$(APP_NAME):latest
APP_REPO=github.com/openshift/$(APP_NAME)
Expand All @@ -32,8 +34,7 @@ gobindir:
GEN_TIMESTAMP=.zz_generate_timestamp
generate: $(GEN_TIMESTAMP) $(OPERATOR_SDK)
$(GEN_TIMESTAMP): $(shell find pkg/apis -name '*.go')
$(OPERATOR_SDK) generate k8s
$(OPERATOR_SDK) generate crds
@./hack/generate-crd.sh
@$(MAKE) fmt
@touch $@

Expand Down Expand Up @@ -118,19 +119,11 @@ uninstall:
$(MAKE) elasticsearch-catalog-uninstall
.PHONY: uninstall

opm:
@if [ ! -f "${GOPATH}/src/github.com/operator-framework/operator-registry/opm" ] ; then \
mkdir -p ${GOPATH}/src/github.com/operator-framework ||: ; \
pushd ${GOPATH}/src/github.com/operator-framework ; \
[ ! -d ./operator-registry ] && git clone https://github.com/operator-framework/operator-registry ; \
cd operator-registry ; \
go build ./cmd/opm/ ; \
popd ; \
fi
.PHONY: opm

generate-bundle: opm
mkdir -p bundle; pushd bundle; ${GOPATH}/src/github.com/operator-framework/operator-registry/opm alpha bundle generate --directory ../manifests/4.6/ --package elasticsearch-operator --channels 4.6 --output-dir .; popd
generate-bundle: $(OPM)
mkdir -p bundle; \
pushd bundle; \
$(OPM) alpha bundle generate --directory ../manifests/$(OCP_VERSION)/ --package elasticsearch-operator --channels $(OCP_VERSION) --output-dir .; \
popd
.PHONY: generate-bundle

# to use these targets, ensure the following env vars are set:
Expand Down
4 changes: 4 additions & 0 deletions bundle/manifests/crd-drop-status-validation-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- op: replace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should exclude this from the bundle manifests file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore this -- will fix as part of #446

path: /spec/validation/openAPIV3Schema/properties/status
value:
type: object
210 changes: 0 additions & 210 deletions bundle/manifests/elasticsearches.crd.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions bundle/manifests/kibanas.crd.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions bundle/manifests/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
resources:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should exclude this from the bundle manifests file

- logging.openshift.io_elasticsearches_crd.yaml
- logging.openshift.io_kibanas_crd.yaml
patchesJson6902:
- path: crd-drop-status-validation-patch.yaml
target:
group: apiextensions.k8s.io
version: v1beta1
kind: CustomResourceDefinition
name: elasticsearches.logging.openshift.io
- path: crd-drop-status-validation-patch.yaml
target:
group: apiextensions.k8s.io
version: v1beta1
kind: CustomResourceDefinition
name: kibanas.logging.openshift.io
Loading