-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:elastic/beats into delete-proxy-queue
- Loading branch information
Showing
90 changed files
with
3,909 additions
and
1,510 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,65 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json | ||
|
||
env: | ||
IMAGE_UBUNTU_X86_64: "family/platform-ingest-beats-ubuntu-2204" | ||
GCP_HI_PERF_MACHINE_TYPE: "c2d-highcpu-16" | ||
|
||
steps: | ||
- label: "Example test" | ||
command: echo "Hello!" | ||
- label: "Checks" | ||
command: ".buildkite/deploy/kubernetes/scripts/make.sh" | ||
if: build.env("BUILDKITE_PULL_REQUEST") != "false" && build.env("GITHUB_PR_LABELS") == "kubernetes" | ||
notify: | ||
- github_commit_status: | ||
context: "Deploy K8S/Checks" | ||
agents: | ||
provider: "gcp" | ||
image: "${IMAGE_UBUNTU_X86_64}" | ||
machineType: "${GCP_HI_PERF_MACHINE_TYPE}" | ||
|
||
- label: "K8S Test/K8S version: v1.29.0" | ||
key: "k8s-test-129" | ||
env: | ||
K8S_VERSION: "v1.29.0" | ||
commands: | ||
- "MODULE=kubernetes make -C metricbeat integration-tests" | ||
- "make -C deploy/kubernetes test" | ||
agents: | ||
provider: "gcp" | ||
image: "${IMAGE_UBUNTU_X86_64}" | ||
machineType: "${GCP_HI_PERF_MACHINE_TYPE}" | ||
|
||
- label: "K8S Test/K8S version: v1.28.0" | ||
key: "k8s-test-128" | ||
env: | ||
K8S_VERSION: "v1.28.0" | ||
commands: | ||
- "MODULE=kubernetes make -C metricbeat integration-tests" | ||
- "make -C deploy/kubernetes test" | ||
agents: | ||
provider: "gcp" | ||
image: "${IMAGE_UBUNTU_X86_64}" | ||
machineType: "${GCP_HI_PERF_MACHINE_TYPE}" | ||
|
||
- label: "K8S Test/K8S version: v1.27.3" | ||
key: "k8s-test-1273" | ||
env: | ||
K8S_VERSION: "v1.27.3" | ||
commands: | ||
- "MODULE=kubernetes make -C metricbeat integration-tests" | ||
- "make -C deploy/kubernetes test" | ||
agents: | ||
provider: "gcp" | ||
image: "${IMAGE_UBUNTU_X86_64}" | ||
machineType: "${GCP_HI_PERF_MACHINE_TYPE}" | ||
|
||
- label: "K8S Test/K8S version: v1.26.6" | ||
key: "k8s-test-1266" | ||
env: | ||
K8S_VERSION: "v1.26.6" | ||
commands: | ||
- "MODULE=kubernetes make -C metricbeat integration-tests" | ||
- "make -C deploy/kubernetes test" | ||
agents: | ||
provider: "gcp" | ||
image: "${IMAGE_UBUNTU_X86_64}" | ||
machineType: "${GCP_HI_PERF_MACHINE_TYPE}" |
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,40 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
MSG="environment variable missing." | ||
KIND_VERSION=${KIND_VERSION:?$MSG} | ||
KIND_BINARY="${BIN}/kind" | ||
|
||
if command -v kind | ||
then | ||
set +e | ||
echo "Found Kind. Checking version.." | ||
FOUND_KIND_VERSION=$(kind --version 2>&1 >/dev/null | awk '{print $3}') | ||
if [ "$FOUND_KIND_VERSION" == "$KIND_VERSION" ] | ||
then | ||
echo "--- Versions match. No need to install Kind. Exiting." | ||
exit 0 | ||
fi | ||
set -e | ||
fi | ||
|
||
echo "UNMET DEP: Installing Kind" | ||
|
||
OS=$(uname -s| tr '[:upper:]' '[:lower:]') | ||
ARCH=$(uname -m| tr '[:upper:]' '[:lower:]') | ||
if [ "${ARCH}" == "aarch64" ] ; then | ||
ARCH_SUFFIX=arm64 | ||
else | ||
ARCH_SUFFIX=amd64 | ||
fi | ||
|
||
if curl -sSLo "${KIND_BINARY}" "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-${OS}-${ARCH_SUFFIX}" ; then | ||
chmod +x "${KIND_BINARY}" | ||
echo "Kind installed: ${KIND_VERSION}" | ||
else | ||
echo "Something bad with the download, let's delete the corrupted binary" | ||
if [ -e "${KIND_BINARY}" ] ; then | ||
rm "${KIND_BINARY}" | ||
fi | ||
exit 1 | ||
fi |
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,42 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
MSG="parameter missing." | ||
K8S_VERSION=${K8S_VERSION:?$MSG} | ||
KUBECTL_BINARY="${BIN}/kubectl" | ||
|
||
if command -v kubectl | ||
then | ||
set +e | ||
echo "Found kubectl. Checking version.." | ||
FOUND_KUBECTL_VERSION=$(kubectl version --client --short 2>&1 >/dev/null | awk '{print $3}') | ||
if [ "${FOUND_KUBECTL_VERSION}" == "${K8S_VERSION}" ] | ||
then | ||
echo "Kubectl Versions match. No need to install kubectl. Exiting." | ||
exit 0 | ||
fi | ||
set -e | ||
fi | ||
|
||
echo "UNMET DEP: Installing kubectl" | ||
|
||
OS=$(uname -s| tr '[:upper:]' '[:lower:]') | ||
ARCH=$(uname -m| tr '[:upper:]' '[:lower:]') | ||
if [ "${ARCH}" == "aarch64" ] ; then | ||
ARCH_SUFFIX=arm64 | ||
else | ||
ARCH_SUFFIX=amd64 | ||
fi | ||
|
||
if curl -sSLo "${KUBECTL_BINARY}" "https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/${OS}/${ARCH_SUFFIX}/kubectl" ; then | ||
chmod +x "${KUBECTL_BINARY}" | ||
echo "Current K8S Version: ${K8S_VERSION}" | ||
echo "Kubectl installed: ${KUBECTL_BINARY}" | ||
else | ||
echo "--- Something bad with the download, let's delete the corrupted binary" | ||
if [ -e "${KUBECTL_BINARY}" ] ; then | ||
rm "${KUBECTL_BINARY}" | ||
fi | ||
exit 1 | ||
fi | ||
|
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,7 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
kind create cluster --image kindest/node:${K8S_VERSION} | ||
|
||
echo "Cluster info: " | ||
kubectl cluster-info |
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,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
echo "--- Checking K8S" | ||
make -C deploy/kubernetes all | ||
make check-no-changes |
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,40 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source .buildkite/env-scripts/util.sh | ||
|
||
echo "--- Installing kind & kubectl" | ||
retry_with_count 5 .buildkite/deploy/kubernetes/scripts/install-kind.sh | ||
retry_with_count 5 .buildkite/deploy/kubernetes/scripts/install-kubectl.sh | ||
|
||
echo "--- Setting up kind" | ||
max_retries=3 | ||
timeout=5 | ||
retries=0 | ||
|
||
while true; do | ||
echo "Creating cluster" | ||
script_output=$(.buildkite/deploy/kubernetes/scripts/kind-setup.sh 2>&1) | ||
exit_code=$? | ||
|
||
echo "Script Output: $script_output" | ||
|
||
if [ $exit_code -eq 0 ]; then | ||
break | ||
else | ||
retries=$((retries + 1)) | ||
|
||
if [ $retries -gt $max_retries ]; then | ||
kind delete cluster | ||
echo "Kind setup FAILED: $script_output" | ||
exit 1 | ||
fi | ||
|
||
kind delete cluster | ||
|
||
sleep_time=$((timeout * retries)) | ||
echo "Retry #$retries failed. Retrying after ${sleep_time}s..." | ||
sleep $sleep_time | ||
fi | ||
done |
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
Oops, something went wrong.