-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test with "external" elasticsearch (#441)
* Test with "external" elasticsearch * Strip all ES config except "enable" (for forwarding) * Create ECK subscription no matter the observability_strategy * Deploy ES from CI for events testing (Code copied/trimmed from STO) * Default to use_redhat for CI * Fixes from testing * ephemeral volume * wait for CRD to establish * Adjust smoketest to always test events * Test events to external ES in any observability_strategy mode * We no longer need the smoketest to know the observability_strategy at all * Update build/stf-run-ci/tasks/setup_elasticsearch.yml Co-authored-by: Leif Madsen <lmadsen@redhat.com> * Apply spelling/caps suggestions from code review --------- Co-authored-by: Leif Madsen <lmadsen@redhat.com>
- Loading branch information
1 parent
10bf140
commit 483f898
Showing
10 changed files
with
141 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
- name: Set default ElasticSearch manifest | ||
set_fact: | ||
elasticsearch_manifest: "{{ lookup('template', './manifest_elasticsearch.j2') | from_yaml }}" | ||
when: elasticsearch_manifest is not defined | ||
|
||
- name: Create an instance of Elasticsearch | ||
k8s: | ||
state: present | ||
definition: | ||
'{{ elasticsearch_manifest }}' | ||
|
||
- name: Look up the newly generated ES Certs | ||
k8s_info: | ||
api_version: v1 | ||
kind: Secret | ||
name: elasticsearch-es-http-certs-public | ||
namespace: '{{ namespace }}' | ||
register: elasticsearch_certs | ||
until: elasticsearch_certs.resources[0].data["ca.crt"] is defined | ||
retries: 5 | ||
delay: 30 | ||
|
||
- name: Copy the ES CA cert to our TLS secret | ||
k8s: | ||
definition: | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: elasticsearch-es-cert | ||
namespace: '{{ namespace }}' | ||
data: | ||
ca.crt: '{{ elasticsearch_certs.resources[0].data["ca.crt"] }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
apiVersion: elasticsearch.k8s.elastic.co/v1 | ||
kind: Elasticsearch | ||
metadata: | ||
name: elasticsearch | ||
namespace: {{ namespace }} | ||
spec: | ||
auth: {} | ||
http: | ||
service: | ||
metadata: {} | ||
spec: {} | ||
tls: | ||
certificate: {} | ||
monitoring: | ||
logs: {} | ||
metrics: {} | ||
nodeSets: | ||
- count: 1 | ||
name: default | ||
config: | ||
node.roles: | ||
- master | ||
- data | ||
- ingest | ||
node.store.allow_mmap: true | ||
podTemplate: | ||
metadata: | ||
labels: | ||
tuned.openshift.io/elasticsearch: elasticsearch | ||
spec: | ||
containers: | ||
- name: elasticsearch | ||
resources: | ||
limits: | ||
cpu: "2" | ||
memory: 4Gi | ||
requests: | ||
cpu: "1" | ||
memory: 4Gi | ||
volumes: | ||
- emptyDir: {} | ||
name: elasticsearch-data | ||
transport: | ||
service: | ||
metadata: {} | ||
spec: {} | ||
tls: | ||
certificate: {} | ||
certificateAuthorities: {} | ||
updateStrategy: | ||
changeBudget: {} | ||
version: {{ elasticsearch_version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters