Revert "Wait for available API token in a new namespace (#7045)"

This reverts commit 275c54e810.

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>"
  ]
}
)
pull/11667/head
Max Gautier 2024-10-25 14:57:25 +02:00
parent e119863e04
commit 2ba28a3389
No known key found for this signature in database
1 changed files with 0 additions and 10 deletions

View File

@ -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: |