Bug 1956652

Summary: Jenkins throws KubernetesAuthException when starting Pod Agent
Product: OpenShift Container Platform Reporter: Simon Krenger <skrenger>
Component: JenkinsAssignee: Akram Ben Aissi <abenaiss>
Status: CLOSED NOTABUG QA Contact: Jitendar Singh <jitsingh>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.6CC: aos-bugs, pbhattac, vbobade
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-04 12:56:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 Akram Ben Aissi 2021-05-04 12:56:24 UTC
As discussed and investigated, this is related to the use of JCasC plugin which overrides a credential that we generate on Jenkins startup.
This credential is not needed anymore with recent versions of kubernetes plugin, so, clicking "Save" in "Nodes and Clouds" solves the issue.
The other resolver is to declare the credential in JCasC with the hardocded id: 1a12dfa4-7fc5-47a7-aa17-cc56572a41c7 :

```
credentials:
  system:
    domainCredentials:
      - credentials:
          - string:
              scope: GLOBAL
              id: "my-id"
              secret: "my-secret"
              description: "my desc"
          - fileSystemServiceAccountCredential:
              scope: GLOBAL
              id: "1a12dfa4-7fc5-47a7-aa17-cc56572a41c7"
              description: "ServiceAccountToken"
```