How to reset `Clusters::Platforms::Kubernetes` secret?

Problem to solve

According to output of gitlab-rake gitlab:doctor:secrets, the Clusters::Platforms::Kubernetes secret needs to be reset:

# gitlab-rake gitlab:doctor:secrets VERBOSE=1
...
I, [2024-05-07T14:43:22.150288 #24498]  INFO -- : - Clusters::Platforms::Kubernetes failures: 1
D, [2024-05-07T14:43:22.150479 #24498] DEBUG -- :   - Clusters::Platforms::Kubernetes[1]: token

So I followed the instructions to reset the token, and it appears to work:

# DRY_RUN=false VERBOSE=true MODEL_NAMES=Clusters::Platforms::Kubernetes TOKEN_NAMES=token gitlab-rake gitlab:doctor:reset_encrypted_tokens --trace
** Invoke gitlab:doctor:reset_encrypted_tokens (first_time)
** Invoke gitlab_environment (first_time)
** Execute gitlab_environment
** Invoke environment (first_time)
** Execute environment
** Execute gitlab:doctor:reset_encrypted_tokens
I, [2024-05-07T14:42:25.681897 #24466]  INFO -- : Resetting token on Clusters::Platforms::Kubernetes if they can not be read
I, [2024-05-07T14:42:34.864193 #24466]  INFO -- : Done!

However, re-running the gitlab:doctor:secrets command flags the same missing secret:

# gitlab-rake gitlab:doctor:secrets VERBOSE=1
...
I, [2024-05-07T14:43:22.150288 #24498]  INFO -- : - Clusters::Platforms::Kubernetes failures: 1
D, [2024-05-07T14:43:22.150479 #24498] DEBUG -- :   - Clusters::Platforms::Kubernetes[1]: token

I suspect that there is a field that I need to clear in the database, similar to what others have done, which helped us to reset the other secrets. Does anyone know which value to reset in the PostgreSQL database?

Steps to reproduce

We lost some secrets a while back. I’ve reset other secrets, and this is the last one that needs to be cleared. I know that the (deprecated) token stored in /etc/gitlab/values.yml that we pass to the Helm-managed Kubernetes pod doesn’t allow the pod to connect to GitLab as a runner.

Configuration

/etc/gitlab/values.yml:

---

runnerRegistrationToken: "<our token>"

gitlabUrl: "https://example.com"

replicas: 1

rbac:
  create: true
  clusterWideAccess: true
metrics:
  enabled: true

Versions

Please select whether options apply, and add the version information.

Versions

  • GitLab 16.11.1