-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: Alex Collins <[email protected]> Signed-off-by: Alex Collins <[email protected]>
- Loading branch information
Showing
36 changed files
with
369 additions
and
103 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,7 @@ jobs: | |
name: E2E Tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 25 | ||
needs: [ tests, argoexec-image ] | ||
needs: [ argoexec-image ] | ||
env: | ||
KUBECONFIG: /home/runner/.kubeconfig | ||
strategy: | ||
|
@@ -86,7 +86,19 @@ jobs: | |
profile: minimal | ||
- test: test-python-sdk | ||
profile: minimal | ||
- test: test-executor | ||
install_k3s_version: v1.21.2+k3s1 | ||
profile: minimal | ||
- test: test-corefunctional | ||
install_k3s_version: v1.21.2+k3s1 | ||
profile: minimal | ||
- test: test-functional | ||
install_k3s_version: v1.21.2+k3s1 | ||
profile: minimal | ||
steps: | ||
- name: Install socat | ||
# needed by Kubernetes v1.25 | ||
run: sudo apt-get -y install socat | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
|
@@ -105,7 +117,7 @@ jobs: | |
cache: pip | ||
- name: Install and start K3S | ||
run: | | ||
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.21.2+k3s1 INSTALL_K3S_CHANNEL=stable INSTALL_K3S_EXEC=--docker K3S_KUBECONFIG_MODE=644 sh - | ||
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=${{matrix.install_k3s_version}} INSTALL_K3S_CHANNEL=stable INSTALL_K3S_EXEC=--docker K3S_KUBECONFIG_MODE=644 sh - | ||
until kubectl --kubeconfig=/etc/rancher/k3s/k3s.yaml cluster-info ; do sleep 10s ; done | ||
cp /etc/rancher/k3s/k3s.yaml /home/runner/.kubeconfig | ||
echo "- name: fake_token_user" >> $KUBECONFIG | ||
|
@@ -133,23 +145,54 @@ jobs: | |
- run: make cli STATIC_FILES=false | ||
if: ${{matrix.test == 'test-api' || matrix.test == 'test-cli' || matrix.test == 'test-java-sdk' || matrix.test == 'test-python-sdk'}} | ||
name: Build CLI | ||
- run: ./hack/port-forward.sh | ||
name: Start port forward | ||
- run: make start PROFILE=${{matrix.profile}} AUTH_MODE=client STATIC_FILES=false LOG_LEVEL=info API=${{matrix.test == 'test-api' || matrix.test == 'test-cli' || matrix.test == 'test-java-sdk' || matrix.test == 'test-python-sdk'}} UI=false LOGS=false > /tmp/argo.log 2>&1 & | ||
name: Start controller/API | ||
- run: make wait | ||
timeout-minutes: 4 | ||
name: Wait for MinIO/MySQL etc to be ready | ||
name: Wait for controller to be up | ||
- name: Run tests ${{matrix.test}} | ||
# https://github.com/marketplace/actions/retry-step | ||
uses: nick-fields/[email protected] | ||
with: | ||
timeout_minutes: 20 | ||
max_attempts: 2 | ||
command: make ${{matrix.test}} E2E_SUITE_TIMEOUT=20m STATIC_FILES=false | ||
- if: ${{ failure() }} | ||
name: MinIO/MySQL deployment | ||
run: | | ||
set -eux | ||
kubectl get deploy | ||
kubectl describe deploy | ||
- if: ${{ failure() }} | ||
name: MinIO/MySQL pods | ||
run: | | ||
set -eux | ||
kubectl get pods -l '!workflows.argoproj.io/workflow' | ||
kubectl describe pods -l '!workflows.argoproj.io/workflow' | ||
- if: ${{ failure() }} | ||
name: MinIO/MySQL logs | ||
run: kubectl logs -l '!workflows.argoproj.io/workflow' --prefix | ||
- if: ${{ failure() }} | ||
name: Controller/API logs | ||
run: | | ||
[ -e /tmp/argo.log ] && cat /tmp/argo.log | ||
- if: ${{ failure() }} | ||
name: Workflows | ||
run: | | ||
set -eux | ||
kubectl get wf | ||
kubectl describe wf | ||
- if: ${{ failure() }} | ||
name: Workflow pods | ||
run: | | ||
set -eux | ||
kubectl get pods -l workflows.argoproj.io/workflow | ||
kubectl describe pods -l workflows.argoproj.io/workflow | ||
- if: ${{ failure() }} | ||
name: Wait container logs | ||
run: kubectl logs -c wait -l workflows.argoproj.io/workflow --prefix | ||
codegen: | ||
name: Codegen | ||
runs-on: ubuntu-latest | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,6 +183,7 @@ v1.0 | |
v1.1 | ||
v1.2 | ||
v1.3 | ||
v1.24 | ||
v2 | ||
v2.10 | ||
v2.11 | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Kubernetes Secrets | ||
|
||
As of Kubernetes v1.24, secrets are no longer automatically created for service accounts. | ||
|
||
You must create a secret | ||
manually: [Find out how to create these yourself manually](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-service-account-api-token) | ||
. | ||
|
||
You must make the secret discoverable. You have two options: | ||
|
||
## Option 1 - Discovery By Name | ||
|
||
Name your secret `${serviceAccountName}.service-account-token`. | ||
|
||
```yaml | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: default.service-account-token | ||
annotations: | ||
kubernetes.io/service-account.name: default | ||
type: kubernetes.io/service-account-token | ||
``` | ||
This option is simpler than option 2, as you can combine creating the secret with making it discoverable by name. | ||
## Option 2 - Discovery By Annotation | ||
Annotate the service account with the secret name: | ||
```yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: default | ||
annotations: | ||
workflows.argoproj.io/service-account-token.name: my-token | ||
``` | ||
This option is useful when the secret already exists, or the service account has a very long name. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
#!/bin/sh | ||
set -eu | ||
#!/usr/bin/env bash | ||
set -eu -o pipefail | ||
|
||
port=$1 | ||
|
||
lsof -s TCP:LISTEN -i ":$port" | grep -v PID | awk '{print $2}' | xargs -L 1 kill || true | ||
pids=$(lsof -t -s TCP:LISTEN -i ":$port" || true) | ||
|
||
if [ "$pids" != "" ]; then | ||
kill $pids | ||
fi |
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
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
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
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
7 changes: 7 additions & 0 deletions
7
manifests/quick-start/base/default.service-account-token-secret.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: default.service-account-token | ||
annotations: | ||
kubernetes.io/service-account.name: default | ||
type: kubernetes.io/service-account-token |
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
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
Oops, something went wrong.