From 0de16afb18278c38500a473561f9025b3f5c88f6 Mon Sep 17 00:00:00 2001 From: Andreas Gkizas Date: Fri, 6 Oct 2023 16:18:35 +0300 Subject: [PATCH 1/4] Fixing script to read ascii code --- deploy/kubernetes/Makefile | 2 +- deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/kubernetes/Makefile b/deploy/kubernetes/Makefile index e4d8b474908..ba6aea9168d 100644 --- a/deploy/kubernetes/Makefile +++ b/deploy/kubernetes/Makefile @@ -1,7 +1,7 @@ ALL=elastic-agent-standalone elastic-agent-managed BEAT_VERSION=$(shell grep '^:stack-version:' ../../version/docs/version.asciidoc | cut -c 17- ) -BRANCH_VERSION=$(shell grep '^:doc-branch:' ../../version/docs/version.asciidoc | cut -c 14- ) +BRANCH_VERSION=$(shell cut -d. -f1-2 <<< '${BEAT_VERSION}') #variables needed for ci-create-kubernetes-templates-pull-request ELASTIC_AGENT_REPO=kibana diff --git a/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml b/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml index 244003075e0..b06a0414ede 100644 --- a/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml +++ b/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml @@ -683,7 +683,7 @@ spec: # - -c # - >- # mkdir -p /etc/elastic-agent/inputs.d && - # wget -O - https://github.com/elastic/elastic-agent/archive/main.tar.gz | tar xz -C /etc/elastic-agent/inputs.d --strip=5 "elastic-agent-main/deploy/kubernetes/elastic-agent-standalone/templates.d" + # wget -O - https://github.com/elastic/elastic-agent/archive/8.8.tar.gz | tar xz -C /etc/elastic-agent/inputs.d --strip=5 "elastic-agent-8.8/deploy/kubernetes/elastic-agent-standalone/templates.d" # volumeMounts: # - name: external-inputs # mountPath: /etc/elastic-agent/inputs.d From 689ef9adcd79f323cc10ace85dbc2a146fdd622c Mon Sep 17 00:00:00 2001 From: Andreas Gkizas Date: Tue, 10 Oct 2023 12:37:29 +0300 Subject: [PATCH 2/4] Changing to read from version.go --- deploy/kubernetes/Makefile | 3 +-- deploy/kubernetes/elastic-agent-managed-kubernetes.yaml | 2 +- deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/deploy/kubernetes/Makefile b/deploy/kubernetes/Makefile index ba6aea9168d..e6990b0eb53 100644 --- a/deploy/kubernetes/Makefile +++ b/deploy/kubernetes/Makefile @@ -1,6 +1,5 @@ ALL=elastic-agent-standalone elastic-agent-managed - -BEAT_VERSION=$(shell grep '^:stack-version:' ../../version/docs/version.asciidoc | cut -c 17- ) +BEAT_VERSION=$(shell grep -oE '[0-9]+\.[0-9]+\.[0-9]+(\-[a-zA-Z]+[0-9]+)?' "../../version/version.go") BRANCH_VERSION=$(shell cut -d. -f1-2 <<< '${BEAT_VERSION}') #variables needed for ci-create-kubernetes-templates-pull-request diff --git a/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml b/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml index 4e9399ec6c6..44df212a629 100644 --- a/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml +++ b/deploy/kubernetes/elastic-agent-managed-kubernetes.yaml @@ -30,7 +30,7 @@ spec: dnsPolicy: ClusterFirstWithHostNet containers: - name: elastic-agent - image: docker.elastic.co/beats/elastic-agent:8.8.1 + image: docker.elastic.co/beats/elastic-agent:8.12.0 env: # Set to 1 for enrollment into Fleet server. If not set, Elastic Agent is run in standalone mode - name: FLEET_ENROLL diff --git a/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml b/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml index b06a0414ede..125936a37b3 100644 --- a/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml +++ b/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml @@ -683,13 +683,13 @@ spec: # - -c # - >- # mkdir -p /etc/elastic-agent/inputs.d && - # wget -O - https://github.com/elastic/elastic-agent/archive/8.8.tar.gz | tar xz -C /etc/elastic-agent/inputs.d --strip=5 "elastic-agent-8.8/deploy/kubernetes/elastic-agent-standalone/templates.d" + # wget -O - https://github.com/elastic/elastic-agent/archive/8.12.tar.gz | tar xz -C /etc/elastic-agent/inputs.d --strip=5 "elastic-agent-8.12/deploy/kubernetes/elastic-agent-standalone/templates.d" # volumeMounts: # - name: external-inputs # mountPath: /etc/elastic-agent/inputs.d containers: - name: elastic-agent-standalone - image: docker.elastic.co/beats/elastic-agent:8.8.1 + image: docker.elastic.co/beats/elastic-agent:8.12.0 args: ["-c", "/etc/elastic-agent/agent.yml", "-e"] env: # The basic authentication username used to connect to Elasticsearch From c599df5959dcfd4d4fbc67461919d7b94eb17b19 Mon Sep 17 00:00:00 2001 From: Andreas Gkizas Date: Thu, 19 Oct 2023 16:44:18 +0300 Subject: [PATCH 3/4] Adding workspace to makefile --- deploy/kubernetes/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/kubernetes/Makefile b/deploy/kubernetes/Makefile index e6990b0eb53..b840800f472 100644 --- a/deploy/kubernetes/Makefile +++ b/deploy/kubernetes/Makefile @@ -1,5 +1,6 @@ ALL=elastic-agent-standalone elastic-agent-managed -BEAT_VERSION=$(shell grep -oE '[0-9]+\.[0-9]+\.[0-9]+(\-[a-zA-Z]+[0-9]+)?' "../../version/version.go") +WORKSPACE=$(shell git rev-parse --show-toplevel) +BEAT_VERSION=$(shell grep -oE '[0-9]+\.[0-9]+\.[0-9]+(\-[a-zA-Z]+[0-9]+)?' "${WORKSPACE}/version/version.go") BRANCH_VERSION=$(shell cut -d. -f1-2 <<< '${BEAT_VERSION}') #variables needed for ci-create-kubernetes-templates-pull-request From db3a67b665420bfca60dc799fa1737e42418c2d0 Mon Sep 17 00:00:00 2001 From: Andreas Gkizas Date: Thu, 19 Oct 2023 17:42:54 +0300 Subject: [PATCH 4/4] Adding shell on top of makefile --- deploy/kubernetes/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deploy/kubernetes/Makefile b/deploy/kubernetes/Makefile index b840800f472..6247c9461e1 100644 --- a/deploy/kubernetes/Makefile +++ b/deploy/kubernetes/Makefile @@ -1,3 +1,5 @@ +SHELL := /bin/bash + ALL=elastic-agent-standalone elastic-agent-managed WORKSPACE=$(shell git rev-parse --show-toplevel) BEAT_VERSION=$(shell grep -oE '[0-9]+\.[0-9]+\.[0-9]+(\-[a-zA-Z]+[0-9]+)?' "${WORKSPACE}/version/version.go")