From a12ebcf2102acd0bea00197e11ddbfd25c99c1bc Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 11 Sep 2019 10:55:30 +0200 Subject: [PATCH] Use Elasticsearch operator 4.2 by default and add CI for 4.1 Signed-off-by: Pavol Loffay --- .github/workflows/e2e-openshift-4.1.yaml | 33 ++++++++++++++++++++++++ Makefile | 16 +++++++++--- 2 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/e2e-openshift-4.1.yaml diff --git a/.github/workflows/e2e-openshift-4.1.yaml b/.github/workflows/e2e-openshift-4.1.yaml new file mode 100644 index 000000000..836b3a206 --- /dev/null +++ b/.github/workflows/e2e-openshift-4.1.yaml @@ -0,0 +1,33 @@ +name: "OpenShift end-to-end tests, ES operator 4.1" +on: [push, pull_request] + +jobs: + end-to-end: + runs-on: ubuntu-latest + strategy: + matrix: + TEST_GROUP: [es-self-provisioned] + steps: + - uses: jpkrohling/setup-kubectl@v1-release + - uses: jpkrohling/setup-operator-sdk@v1-release + - uses: actions/checkout@v1 + with: + path: src/github.com/jaegertracing/jaeger-operator # remove when using operator >= 0.9.0 + + - name: "setup docker" + run: ./.ci/setup-docker.sh + + - name: "set max_map_count" + run: sudo sysctl -w vm.max_map_count=262144 + + - name: "start openshift" + run: ./.ci/start-openshift.sh + + - name: "running end to end test" + env: + GOPATH: /home/runner/work/jaeger-operator #remove when using operator >= 0.9.0 + CI: true + TEST_GROUP: ${{ matrix.TEST_GROUP }} + ES_OPERATOR_BRANCH: release-4.1 + ES_OPERATOR_IMAGE: quay.io/openshift/origin-elasticsearch-operator:4.1 + run: ./.ci/run-e2e-tests.sh diff --git a/Makefile b/Makefile index a6b998e9d..7865fc07d 100644 --- a/Makefile +++ b/Makefile @@ -16,9 +16,9 @@ OPERATOR_VERSION ?= "$(shell git describe --tags)" STORAGE_NAMESPACE ?= "${shell kubectl get sa default -o jsonpath='{.metadata.namespace}' || oc project -q}" KAFKA_NAMESPACE ?= "kafka" ES_OPERATOR_NAMESPACE ?= openshift-logging -ES_OPERATOR_BRANCH ?= release-4.1 -ES_OPERATOR_IMAGE ?= quay.io/openshift/origin-elasticsearch-operator:4.1 -SDK_VERSION=v0.10.0 +ES_OPERATOR_BRANCH ?= release-4.2 +ES_OPERATOR_IMAGE ?= quay.io/openshift/origin-elasticsearch-operator:4.2 +SDK_VERSION=v0.8.1 GOPATH ?= "$(HOME)/go" LD_FLAGS ?= "-X $(VERSION_PKG).version=$(OPERATOR_VERSION) -X $(VERSION_PKG).buildDate=$(VERSION_DATE) -X $(VERSION_PKG).defaultJaeger=$(JAEGER_VERSION)" @@ -146,10 +146,18 @@ run-debug: CLI_FLAGS = "--log-level=debug" .PHONY: set-max-map-count set-max-map-count: +# This is not required in OCP 4.1. The node tuning operator configures the property automatically +# when label tuned.openshift.io/elasticsearch=true label is present on the ES pod. The label +# is configured by ES operator. @minishift ssh -- 'sudo sysctl -w vm.max_map_count=262144' > /dev/null 2>&1 || true +.PHONY: set-node-os-linux +set-node-os-linux: +# Elasticsearch requires labeled nodes. These labels are by default present in OCP 4.2 + @oc label nodes --all kubernetes.io/os=linux --overwrite + .PHONY: deploy-es-operator -deploy-es-operator: set-max-map-count +deploy-es-operator: set-node-os-linux set-max-map-count ifeq ($(OLM),true) @echo Skipping es-operator deployment, assuming it has been installed via OperatorHub else