-
Bug
-
Resolution: Duplicate
-
Critical
-
None
-
4.16
-
None
-
Critical
-
None
-
Proposed
-
False
-
Description of problem:
Linking "imagePullSecrets" secret to the service account is broken and not work as expected.
Version-Release number of selected component (if applicable):
4.16.0-0.nightly-2024-05-16-092402
How reproducible:
Always
Steps to Reproduce:
1. Create a new project: # oc new-project test-project 2. Link the secrets to the service account using CLI: # oc secrets link default any-other-existing-secret --for pull But the any-other-existing-secret is not actually added: # oc get serviceaccount/default -o yaml apiVersion: v1 imagePullSecrets: - name: default-dockercfg-xlrgq kind: ServiceAccount ... 5. Tried adding with manual edit $ oc edit serviceaccount/default imagePullSecrets: - name: default-dockercfg-nwc92 - name: <add any-other-existing-secret here> serviceaccount/default edited Also, the any-other-existing-secret is still not actually added: $ oc get serviceaccount/default -o yaml apiVersion: v1 imagePullSecrets: - name: default-dockercfg-nwc92 kind: ServiceAccount ...
Actual results:
Failed to link "imagePullSecrets" with service account.Should able to link without any issue
Expected results:
Should able to link "imagePullSecrets" with service account without any issue.
Additional info:
This issue was observed in OpenShift version 4.16.0-0.nightly-2024-05-16-092402. The same steps were followed in OpenShift version 4.16.0-rc.1 and the "imagePullSecrets" field was correctly updated.
Below is the execution steps
# oc new-project test-project # oc create secret generic testsecret1 --from-file=test/testfile1 secret/testsecret1 created # oc create secret generic testsecret2 --from-file=test/testfile1 secret/testsecret2 created # oc secrets link default testsecret1 # oc secrets link default testsecret2 --for pull # oc get serviceaccount/default -o yaml apiVersion: v1 imagePullSecrets: - name: default-dockercfg-nmpgp - name: testsecret2 kind: ServiceAccount metadata: creationTimestamp: "2024-05-17T09:09:16Z" name: default namespace: test-project resourceVersion: "132695" uid: 55e0518f-a645-4560-9576-253ea3111e45 secrets: - name: default-dockercfg-nmpgp - name: testsecret1
- duplicates
-
OCPBUGS-33815 openshift-controller-manager overwriting/undoing changes to ServiceAccount imagePullSecrets
- Closed