From a12ebcf2102acd0bea00197e11ddbfd25c99c1bc Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 11 Sep 2019 10:55:30 +0200 Subject: [PATCH 1/4] 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 From 7a365f030a8f1b2f301261100e23f9c9e2c9dedd Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 11 Sep 2019 11:09:59 +0200 Subject: [PATCH 2/4] Use kubectl Signed-off-by: Pavol Loffay --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7865fc07d..7559e47df 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ set-max-map-count: .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 + @kubectl label nodes --all kubernetes.io/os=linux --overwrite .PHONY: deploy-es-operator deploy-es-operator: set-node-os-linux set-max-map-count From 8cf4e743a9a4b5f55f5c09614e0f965424ef6991 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 11 Sep 2019 12:05:13 +0200 Subject: [PATCH 3/4] Fix review comments Signed-off-by: Pavol Loffay --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 7559e47df..1e84b29eb 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ KAFKA_NAMESPACE ?= "kafka" ES_OPERATOR_NAMESPACE ?= openshift-logging ES_OPERATOR_BRANCH ?= release-4.2 ES_OPERATOR_IMAGE ?= quay.io/openshift/origin-elasticsearch-operator:4.2 -SDK_VERSION=v0.8.1 +SDK_VERSION=v0.10.0 GOPATH ?= "$(HOME)/go" LD_FLAGS ?= "-X $(VERSION_PKG).version=$(OPERATOR_VERSION) -X $(VERSION_PKG).buildDate=$(VERSION_DATE) -X $(VERSION_PKG).defaultJaeger=$(JAEGER_VERSION)" @@ -146,14 +146,14 @@ 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. + # 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 + # Elasticsearch requires labeled nodes. These labels are by default present in OCP 4.2 @kubectl label nodes --all kubernetes.io/os=linux --overwrite .PHONY: deploy-es-operator From df137d94e3aad4b4545e7c066bb25108c2583c8b Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 11 Sep 2019 12:09:59 +0200 Subject: [PATCH 4/4] Remove outdatted config for old SDK Signed-off-by: Pavol Loffay --- .github/workflows/e2e-openshift-4.1.yaml | 37 ++++++++++++------------ 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/.github/workflows/e2e-openshift-4.1.yaml b/.github/workflows/e2e-openshift-4.1.yaml index 836b3a206..fd9020ee1 100644 --- a/.github/workflows/e2e-openshift-4.1.yaml +++ b/.github/workflows/e2e-openshift-4.1.yaml @@ -8,26 +8,25 @@ jobs: 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 + - uses: jpkrohling/setup-kubectl@v1-release + - uses: jpkrohling/setup-operator-sdk@v1-release + with: + operator-sdk-version: v0.10.0 + - uses: actions/checkout@v1 - - name: "setup docker" - run: ./.ci/setup-docker.sh + - name: "setup docker" + run: ./.ci/setup-docker.sh - - name: "set max_map_count" - run: sudo sysctl -w vm.max_map_count=262144 + - name: "set max_map_count" + run: sudo sysctl -w vm.max_map_count=262144 - - name: "start openshift" - run: ./.ci/start-openshift.sh + - 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 + - name: "running end to end test" + env: + 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