Skip to content

Commit

Permalink
Use Elasticsearch operator 4.2 by default and add CI for 4.1
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay committed Sep 11, 2019
1 parent a059701 commit a12ebcf
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/e2e-openshift-4.1.yaml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a12ebcf

Please sign in to comment.