chore: add RemoveFailedPods to descheduler #621
Workflow file for this run
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
--- | |
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: "Helm Repository Sync" | |
on: | |
pull_request: | |
branches: ["main"] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pre-job: | |
name: Helm Repository Sync Pre-Job | |
runs-on: ubuntu-latest | |
outputs: | |
any_changed: ${{ steps.changed-files.outputs.any_changed }} | |
all_changed_and_modified_files: ${{ steps.changed-files.outputs.all_changed_and_modified_files }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Changed Files | |
id: changed-files | |
uses: tj-actions/changed-files@v45 | |
with: | |
files: kubernetes/**/helmrelease.yaml | |
helm-repository-sync: | |
name: Helm Repository Sync | |
needs: pre-job | |
runs-on: home-ops-runner | |
strategy: | |
matrix: | |
cluster: ["main", "utility"] | |
if: ${{ needs.pre-job.outputs.any_changed == 'true' }} | |
steps: | |
- name: Configure 1password | |
uses: 1password/load-secrets-action/configure@v2 | |
with: | |
service-account-token: ${{ secrets.ONEPASS_SA_TOKEN }} | |
- name: Get Secrets | |
uses: 1password/load-secrets-action@v2 | |
with: | |
export-env: true | |
env: | |
KUBECONFIG_BASE64: op://Kubernetes/kubernetes/KUBECONFIG_BASE64 | |
- name: Write kubeconfig | |
id: kubeconfig | |
uses: timheuer/base64-to-file@v1 | |
with: | |
encodedString: ${{ env.KUBECONFIG_BASE64 }} | |
fileName: kubeconfig | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install flux | |
run: curl -fsSL https://fluxcd.io/install.sh | bash | |
- name: Sync Helm Repository | |
env: | |
KUBECONFIG: ${{ steps.kubeconfig.outputs.filePath }} | |
FILTER: '[.spec.chart.spec.sourceRef] | unique | .[] | "\(.namespace) \(.name)"' | |
shell: bash | |
run: | | |
yq eval-all "${FILTER}" ${{ needs.pre-job.outputs.all_changed_and_modified_files }} \ | |
| xargs -l bash -c 'flux --context ${{ matrix.cluster }} --namespace $0 reconcile source helm $1' | |
helm-repository-sync-status: | |
needs: helm-repository-sync | |
name: Helm Repository Sync Success | |
runs-on: ubuntu-latest | |
if: ${{ always() }} | |
steps: | |
- name: Any jobs failed? | |
if: ${{ contains(needs.*.result, 'failure') }} | |
run: exit 1 | |
- name: All jobs passed or skipped? | |
if: ${{ !(contains(needs.*.result, 'failure')) }} | |
run: echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}" |