Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use elasticsearch operator 4.2, add workflow for 4.1 #631

Merged
merged 4 commits into from
Sep 11, 2019
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
32 changes: 32 additions & 0 deletions .github/workflows/e2e-openshift-4.1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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
with:
operator-sdk-version: v0.10.0
- uses: actions/checkout@v1

- 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:
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
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ 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
ES_OPERATOR_BRANCH ?= release-4.2
ES_OPERATOR_IMAGE ?= quay.io/openshift/origin-elasticsearch-operator:4.2
SDK_VERSION=v0.10.0
GOPATH ?= "$(HOME)/go"

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
@kubectl 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