Skip to content

Commit

Permalink
Revert "Wait for available API token in a new namespace (kubernetes-s…
Browse files Browse the repository at this point in the history
…igs#7045)"

This reverts commit 275c54e.

Static tokens are no longer created automatically for service account in
Kubernetes. Instead, they are dynamically injected into pods using a
projected volume.

Thus there is no longer a need to check for this (it didn't work anyway,
since the describe output actually contains <none> when there is no
tokens:
{
  "attempts": 1,
  "changed": false,
  "cmd": "set -o pipefail && /usr/local/bin/kubectl describe serviceaccounts default --namespace test | grep Tokens | awk '{print $2}'",
  "delta": "0:00:00.075633",
  "end": "2024-10-19 14:25:04.858871",
  "msg": "",
  "rc": 0,
  "start": "2024-10-19 14:25:04.783238",
  "stderr": "",
  "stderr_lines": [],
  "stdout": "<none>",
  "stdout_lines": [
    "<none>"
  ]
}
)
  • Loading branch information
VannTen committed Oct 25, 2024
1 parent e119863 commit 2ba28a3
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tests/testcases/030_check-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,6 @@
command: "{{ bin_dir }}/kubectl create namespace test"
changed_when: false

- name: Wait for API token of test namespace
shell: "set -o pipefail && {{ bin_dir }}/kubectl describe serviceaccounts default --namespace test | grep Tokens | awk '{print $2}'"
args:
executable: /bin/bash
changed_when: false
register: default_token
until: default_token.stdout | length > 0
retries: 5
delay: 5

- name: Run 2 agnhost pods in test ns
shell:
cmd: |
Expand Down

0 comments on commit 2ba28a3

Please sign in to comment.