-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
125 changed files
with
4,910 additions
and
2,141 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
version: "1.0" | ||
|
||
accounts: | ||
- name: "${ACCOUNT_PROJECT}" | ||
driver: "gce" | ||
options: | ||
key: "${ACCOUNT_KEY}" | ||
secret: "${ACCOUNT_SECRET}" | ||
project: "${ACCOUNT_PROJECT}" | ||
|
||
scanners: | ||
- account_name: "${ACCOUNT_PROJECT}" | ||
resources: | ||
- type: "node" | ||
regions: | ||
- "us-central1" | ||
filters: | ||
- type: "<" | ||
pointer: "/extra/creationTimestamp" | ||
param: "${CREATION_DATE}" | ||
converters: | ||
param: "date" | ||
value: "date" | ||
- type: "=" | ||
pointer: "/extra/labels/project" | ||
param: "elastic-agent" | ||
- type: "regex" | ||
pointer: "/name" | ||
param: "^ogc(.*)" | ||
- type: "!=" | ||
pointer: "/state" | ||
param: "unknown" | ||
- type: "!=" | ||
pointer: "/state" | ||
param: "terminated" |
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,13 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json | ||
|
||
# Removes stale GCE instances having matching labels, name prefixes and older than 24 hours | ||
# See gce-cleanup.sh and .buildkite/misc/gce-cleanup.yml | ||
env: | ||
VAULT_PATH: "kv/ci-shared/observability-ingest/cloud/gcp" | ||
DOCKER_REGISTRY: "docker.elastic.co" | ||
steps: | ||
- label: "GCE Cleanup" | ||
key: "gce-cleanup" | ||
command: ".buildkite/scripts/steps/gce-cleanup.sh" | ||
agents: | ||
provider: "gcp" |
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 |
---|---|---|
|
@@ -12,3 +12,4 @@ steps: | |
- "build/diagnostics/*" | ||
agents: | ||
provider: "gcp" | ||
machineType: "n1-standard-8" |
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,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
export ACCOUNT_KEY_SECRET=$(vault kv get -field=client_email $VAULT_PATH) | ||
export ACCOUNT_SECRET=$(vault kv get -field=private_key $VAULT_PATH) | ||
export ACCOUNT_PROJECT_SECRET=$(vault kv get -field=project_id $VAULT_PATH) | ||
export CREATION_DATE=$(date -Is -d "24 hours ago") | ||
|
||
docker run -v $(pwd)/.buildkite/misc/gce-cleanup.yml:/etc/cloud-reaper/config.yml \ | ||
-e ACCOUNT_SECRET="$ACCOUNT_SECRET" \ | ||
-e ACCOUNT_KEY="$ACCOUNT_KEY_SECRET" \ | ||
-e ACCOUNT_PROJECT=$ACCOUNT_PROJECT_SECRET \ | ||
-e CREATION_DATE=$CREATION_DATE \ | ||
${DOCKER_REGISTRY}/observability-ci/cloud-reaper:0.3.0 cloud-reaper --config /etc/cloud-reaper/config.yml destroy --confirm |
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,9 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
# Unset all variables ending with _SECRET or _TOKEN | ||
for var in $(printenv | sed 's;=.*;;' | sort); do | ||
if [[ "$var" == *_SECRET || "$var" == *_TOKEN ]]; then | ||
unset "$var" | ||
fi | ||
done |
Validating CODEOWNERS rules …
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.