|
| 1 | +# Due to difference in configuring v1.13 and v1.14+ we split v1.13 into |
| 2 | +# seperate workflow. |
| 3 | +# TODO: We can delete this and rely on just the primary conformance.yml to |
| 4 | +# test v1.14/v1.15/v1.16 upon the release of v1.16. |
| 5 | +name: Talos Conformance (v1.13) (PR) |
| 6 | +on: |
| 7 | + pull_request_target: |
| 8 | + types: |
| 9 | + - opened |
| 10 | + - synchronize |
| 11 | + - reopened |
| 12 | + pull_request: |
| 13 | +jobs: |
| 14 | + setup-and-test: |
| 15 | + runs-on: ubuntu-22.04 |
| 16 | + permissions: |
| 17 | + id-token: write |
| 18 | + contents: read |
| 19 | + strategy: |
| 20 | + fail-fast: false |
| 21 | + max-parallel: 2 |
| 22 | + matrix: |
| 23 | + cilium: |
| 24 | + # renovate: datasource=github-releases depName=cilium/cilium |
| 25 | + - 'v1.13.10' |
| 26 | + talos: |
| 27 | + # renovate: datasource=github-releases depName=siderolabs/talos |
| 28 | + - 'v1.6.5' |
| 29 | + # renovate: datasource=github-releases depName=siderolabs/talos |
| 30 | + - 'v1.5.4' |
| 31 | + config: |
| 32 | + - name: 'Vanilla' |
| 33 | + kube-proxy: false |
| 34 | + kube-proxy-replacement: "strict" |
| 35 | + socketlb: false |
| 36 | + bpf-masquerade: true |
| 37 | + ipam-mode: 'kubernetes' |
| 38 | + ipv4: true |
| 39 | + ipv6: false |
| 40 | + encryption-enabled: false |
| 41 | + encryption-type: ipsec |
| 42 | + tunnel-mode: vxlan |
| 43 | + nodeport: true |
| 44 | + l7: true |
| 45 | + ingress: true |
| 46 | + steps: |
| 47 | + - name: Checkout |
| 48 | + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 |
| 49 | + with: |
| 50 | + ref: ${{ github.event.pull_request.head.sha }} |
| 51 | + - name: Configure AWS credentials from shared services account |
| 52 | + uses: aws-actions/configure-aws-credentials@v2 |
| 53 | + with: |
| 54 | + role-to-assume: arn:aws:iam::478566851380:role/TalosConformanceCI |
| 55 | + aws-region: us-east-2 |
| 56 | + - uses: hashicorp/setup-terraform@v3 |
| 57 | + - name: Create Talos Cluster |
| 58 | + run: | |
| 59 | + cd test/conformance |
| 60 | + ./create-ci-env.sh \ |
| 61 | + --kube-proxy ${{ matrix.config.kube-proxy}} \ |
| 62 | + --talos-version ${{ matrix.talos }} \ |
| 63 | + --pr ${{ github.run_number }} \ |
| 64 | + --owner "isovalent/terraform-aws-talos" |
| 65 | + make apply |
| 66 | + - name: Install Cilium CLI |
| 67 | + uses: cilium/cilium-cli@2d69d3f50d783ae22ead9054f14b18074c70b108 # v0.16.1 |
| 68 | + with: |
| 69 | + repository: cilium/cilium-cli |
| 70 | + release-version: v0.15.20 |
| 71 | + ci-version: "" |
| 72 | + binary-name: cilium-cli |
| 73 | + binary-dir: /usr/local/bin |
| 74 | + - name: Install Cilium |
| 75 | + run: | |
| 76 | + cd test/conformance |
| 77 | + export $(make print-kubeconfig) |
| 78 | + kubectl create -n kube-system secret generic cilium-ipsec-keys \ |
| 79 | + --from-literal=keys="3 rfc4106(gcm(aes)) $(echo $(dd if=/dev/urandom count=20 bs=1 2> /dev/null | xxd -p -c 64)) 128" |
| 80 | + kubectl create -n kube-system -f ipmasq-config.yaml |
| 81 | + cilium-cli install --version="${{ matrix.cilium }}" \ |
| 82 | + --values=values.yaml \ |
| 83 | + --set ipv4.enabled=${{ matrix.config.ipv4 }} \ |
| 84 | + --set ipv6.enabled=${{ matrix.config.ipv6 }} \ |
| 85 | + --set bpf.masquerade=${{ matrix.config.bpf-masquerade }} \ |
| 86 | + --set kubeProxyReplacement=${{ matrix.config.kube-proxy-replacement }} \ |
| 87 | + --set socketLB.enabled=${{ matrix.config.socketlb }} \ |
| 88 | + --set ipam.mode=${{ matrix.config.ipam-mode }} \ |
| 89 | + --set ingressController.enabled=${{ matrix.config.ingress }} \ |
| 90 | + --set encryption.enabled=${{ matrix.config.encryption-enabled }} \ |
| 91 | + --set encryption.type=${{ matrix.config.encryption-type }} \ |
| 92 | + --set tunnelProtocol=${{ matrix.config.tunnel-mode }} \ |
| 93 | + --set nodePort.enabled=${{ matrix.config.nodeport }} \ |
| 94 | + --set l7Proxy=${{ matrix.config.l7 }} |
| 95 | + cilium-cli status --wait |
| 96 | +
|
| 97 | + - name: Run E2E Connectivity Tests |
| 98 | + run: | |
| 99 | + cd test/conformance |
| 100 | + export $(make print-kubeconfig) |
| 101 | + ./wait |
| 102 | + kubectl create ns cilium-test |
| 103 | + kubectl label ns cilium-test pod-security.kubernetes.io/enforce=privileged |
| 104 | + kubectl label ns cilium-test pod-security.kubernetes.io/warn=privileged |
| 105 | + cilium-cli connectivity test --collect-sysdump-on-failure |
| 106 | +
|
| 107 | + - name: Fetch artifacts |
| 108 | + if: ${{ !success() && steps.run-tests.outcome != 'skipped' }} |
| 109 | + shell: bash |
| 110 | + run: | |
| 111 | + cd test/conformance |
| 112 | + export $(make print-kubeconfig) |
| 113 | + kubectl get svc -o wide -A |
| 114 | + kubectl get pods --all-namespaces -o wide |
| 115 | + cilium-cli status |
| 116 | + mkdir -p cilium-sysdumps |
| 117 | + cilium-cli sysdump --output-filename cilium-sysdump-${{ github.run_id }}-${{ github.run_number }} |
| 118 | +
|
| 119 | + - name: Upload artifacts |
| 120 | + if: ${{ !success() }} |
| 121 | + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 |
| 122 | + with: |
| 123 | + name: cilium-sysdumps-${{ github.run_id }}-${{ github.run_number }} |
| 124 | + path: ./test/conformance/cilium-sysdump-*.zip |
| 125 | + |
| 126 | + - name: Cleanup |
| 127 | + if: always() |
| 128 | + run: | |
| 129 | + cd test/conformance |
| 130 | + make destroy |
| 131 | +
|
0 commit comments