fix: add cluster label to logs and flate workflow (#72)

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl
2026-06-25 09:11:21 -04:00
committed by GitHub
parent ad3d5ed968
commit ab3b629f93
2 changed files with 74 additions and 0 deletions
+73
View File
@@ -0,0 +1,73 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Flate"
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
filter:
name: Flate - Filter
runs-on: ubuntu-latest
outputs:
changed-files: ${{ steps.changed-files.outputs.changed_files }}
steps:
- name: Get Changed Files
id: changed-files
uses: bjw-s-labs/action-changed-files@a9a36fb08ce06db9b02fbd8026cc2c0945eb9841 # v0.6.0
with:
patterns: kubernetes/**/*
flate:
if: ${{ needs.filter.outputs.changed-files != '[]' }}
needs: filter
name: Flate - ${{ matrix.cluster }} - ${{ matrix.resource }}
runs-on: ubuntu-latest
strategy:
matrix:
cluster: ["staging", "production"]
resource: ["helmrelease", "kustomization"]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Install Flate
uses: home-operations/flate/action@a13598d5cb2faa79c2638e7bfe61711b1a1c1a5f # v0.4.9
with:
cache: true
- name: Run Flate
env:
FLATE_PATH: ./kubernetes/clusters/${{ matrix.cluster }}
KIND: ${{ matrix.resource }}
run: flate test $KIND
success:
if: ${{ !cancelled() }}
needs:
- flate
name: Flate - Success
runs-on: ubuntu-latest
steps:
- name: Any jobs failed?
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: All jobs passed or skipped?
if: ${{ !(contains(needs.*.result, 'failure')) }}
env:
RESULTS: ${{ toJSON(needs.*.result) }}
run: echo "All jobs passed or skipped" && echo "$RESULTS"
@@ -29,6 +29,7 @@ spec:
"kubernetesCollector.decolorizeFields": _msg
collector:
extraFields: '{"cluster":"${CLUSTER_NAME}"}'
streamFields:
- kubernetes.pod_name
- kubernetes.pod_namespace