diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 2dab304..7ac4b6b 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -10,6 +10,7 @@ jobs: runs-on: ubuntu-latest outputs: node-labels: ${{ steps.filter.outputs.node-labels }} + coredns: ${{ steps.filter.outputs.coredns }} steps: - uses: actions/checkout@v5 with: @@ -20,6 +21,8 @@ jobs: filters: | k8s: - 'node-labels/**' + coredns: + - 'coredns/**' deploy-node-labels: runs-on: ubuntu-latest @@ -35,3 +38,18 @@ jobs: - name: Deploy run: | kubectl apply --server-side --field-manager=t000-n -f node-labels + + deploy-coredns: + runs-on: ubuntu-latest + needs: check-changes + if: ${{ needs.check-changes.outputs.coredns == 'true' }} + steps: + - uses: actions/checkout@v5 + - uses: azure/setup-kubectl@v4 + - uses: azure/k8s-set-context@v4 + with: + method: kubeconfig + kubeconfig: ${{ secrets.KUBECONFIG }} + - name: Deploy + run: | + kubectl apply -n kube-system -f coredns diff --git a/.gitea/workflows/validate.yaml b/.gitea/workflows/validate.yaml index 719646b..da68584 100644 --- a/.gitea/workflows/validate.yaml +++ b/.gitea/workflows/validate.yaml @@ -18,3 +18,16 @@ jobs: - name: Validate run: | kubectl apply --server-side --field-manager=t000-n --dry-run=server -f node-labels + + validate-coredns: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: azure/setup-kubectl@v4 + - uses: azure/k8s-set-context@v4 + with: + method: kubeconfig + kubeconfig: ${{ secrets.KUBECONFIG }} + - name: Validate + run: | + kubectl apply -n kube-system -f coredns