Revert "Add Flux v2.1.2 component manifests" #198
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
name: e2e | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ '*' ] | |
tags-ignore: [ '*' ] | |
permissions: | |
contents: read | |
jobs: | |
kubernetes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Flux | |
uses: fluxcd/flux2/action@main | |
- name: Setup Kubernetes | |
uses: engineerd/[email protected] | |
with: | |
version: v0.20.0 | |
image: kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8 | |
- name: Install Flux in Kubernetes Kind | |
run: flux install | |
- name: Set Istio Gateway service type | |
run: | | |
kubectl -n flux-system create cm istio-version --from-literal=service=NodePort | |
- name: Setup cluster reconciliation | |
run: | | |
kubectl apply -f - <<EOF > cat | |
apiVersion: source.toolkit.fluxcd.io/v1beta2 | |
kind: GitRepository | |
metadata: | |
name: flux-system | |
namespace: flux-system | |
spec: | |
interval: 15m | |
ref: | |
branch: ${GITHUB_REF#refs/heads/} | |
url: ${{ github.event.repository.html_url }} | |
ignore: | | |
/clusters/my-cluster/flux-system/ | |
EOF | |
kubectl -n flux-system wait gitrepository/flux-system --for=condition=ready --timeout=1m | |
flux create kustomization flux-system \ | |
--source=flux-system \ | |
--path=./clusters/my-cluster | |
- name: Verify cluster reconciliation | |
run: | | |
kubectl -n flux-system wait kustomization/istio-system --for=condition=ready --timeout=2m | |
kubectl -n flux-system wait kustomization/istio-gateway --for=condition=ready --timeout=2m | |
kubectl -n flux-system wait kustomization/apps --for=condition=ready --timeout=2m | |
kubectl -n prod wait canary/frontend --for=condition=promoted --timeout=1m | |
kubectl -n prod rollout status deployment/frontend --timeout=1m | |
kubectl -n prod wait canary/backend --for=condition=promoted --timeout=1m | |
kubectl -n prod rollout status deployment/backend --timeout=1m | |
- name: List Flux managed objects | |
run: | | |
flux get all --all-namespaces | |
- name: Test canary release | |
run: | | |
kubectl -n prod set image deployment/backend backend=ghcr.io/stefanprodan/podinfo:6.1.1 | |
echo '>>> Waiting for canary finalization' | |
retries=25 | |
count=0 | |
ok=false | |
until ${ok}; do | |
kubectl -n prod get canary/backend | grep 'Succeeded' && ok=true || ok=false | |
sleep 20 | |
kubectl -n istio-system logs deployment/flagger --tail 1 | |
count=$(($count + 1)) | |
if [[ ${count} -eq ${retries} ]]; then | |
echo "No more retries left" | |
exit 1 | |
fi | |
done | |
- name: Debug failure | |
if: failure() | |
run: | | |
kubectl -n flux-system get all | |
kubectl -n flux-system logs deploy/source-controller | |
kubectl -n flux-system logs deploy/kustomize-controller | |
kubectl -n flux-system logs deploy/helm-controller | |
kubectl -n istio-system logs deployment/flagger | |
kubectl -n istio-operator get all | |
kubectl -n istio-system get all | |
kubectl -n prod get all | |
kubectl -n prod describe deployment backend | |
kubectl -n prod logs -l app=backend --all-containers=true |