From ea87e52c3fe6d11e326147c41cb8e37524e63834 Mon Sep 17 00:00:00 2001 From: Chris Koehnke Date: Wed, 15 Apr 2020 16:39:13 -0400 Subject: [PATCH 1/2] Use busybox for key generation in testing Use a smaller image for generating a key used in testing. --- kibana/examples/security/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kibana/examples/security/Makefile b/kibana/examples/security/Makefile index a54769d95..c6bd349bb 100644 --- a/kibana/examples/security/Makefile +++ b/kibana/examples/security/Makefile @@ -13,5 +13,5 @@ purge: helm del --purge $(RELEASE) secrets: - encryptionkey=$$(echo $$(docker run --rm docker.elastic.co/elasticsearch/elasticsearch:$(STACK_VERSION) /bin/sh -c "< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c50")) && \ + encryptionkey=$$(docker run --rm busybox /bin/sh -c "< /dev/urandom tr -dc _A-Za-z0-9 | head -c50") && \ kubectl create secret generic kibana --from-literal=encryptionkey=$$encryptionkey From 6908249866c82a6532a10134ee43ed0679c488b7 Mon Sep 17 00:00:00 2001 From: Chris Koehnke Date: Wed, 15 Apr 2020 17:16:13 -0400 Subject: [PATCH 2/2] Use busybox for ES testing password generation And set a tag for the busybox image. --- elasticsearch/examples/security/Makefile | 2 +- kibana/examples/security/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch/examples/security/Makefile b/elasticsearch/examples/security/Makefile index 3d10b0b81..d8c6f11c7 100644 --- a/elasticsearch/examples/security/Makefile +++ b/elasticsearch/examples/security/Makefile @@ -20,7 +20,7 @@ pull-elasticsearch-image: secrets: docker rm -f elastic-helm-charts-certs || true rm -f elastic-certificates.p12 elastic-certificate.pem elastic-stack-ca.p12 || true - password=$$([ ! -z "$$ELASTIC_PASSWORD" ] && echo $$ELASTIC_PASSWORD || echo $$(docker run --rm $(ELASTICSEARCH_IMAGE) /bin/sh -c "< /dev/urandom tr -cd '[:alnum:]' | head -c20")) && \ + password=$$([ ! -z "$$ELASTIC_PASSWORD" ] && echo $$ELASTIC_PASSWORD || echo $$(docker run --rm busybox:1.31.1 /bin/sh -c "< /dev/urandom tr -cd '[:alnum:]' | head -c20")) && \ docker run --name elastic-helm-charts-certs -i -w /app \ $(ELASTICSEARCH_IMAGE) \ /bin/sh -c " \ diff --git a/kibana/examples/security/Makefile b/kibana/examples/security/Makefile index c6bd349bb..d3a365fd7 100644 --- a/kibana/examples/security/Makefile +++ b/kibana/examples/security/Makefile @@ -13,5 +13,5 @@ purge: helm del --purge $(RELEASE) secrets: - encryptionkey=$$(docker run --rm busybox /bin/sh -c "< /dev/urandom tr -dc _A-Za-z0-9 | head -c50") && \ + encryptionkey=$$(docker run --rm busybox:1.31.1 /bin/sh -c "< /dev/urandom tr -dc _A-Za-z0-9 | head -c50") && \ kubectl create secret generic kibana --from-literal=encryptionkey=$$encryptionkey