-
Bug
-
Resolution: Not a Bug
-
Undefined
-
None
-
4.19.0
-
None
-
None
-
False
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
Whenever I'm creating a secret from file, the oc tool is adding a linebreak at the end of the token. This is problematic since the API doesn't recognize the API key and therefore causes a failure.
Version-Release number of selected component (if applicable):
oc version Client Version: 4.17.5 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: 4.19.21 Kubernetes Version: v1.32.10
How reproducible:
always
Steps to Reproduce:
1. Create a file with an API key. Make sure not to add any linebreak to the file. Just the API key.
2. export the path to the file under MY_TOKEN_PATH
3. Run oc create secret generic secretname --from-file=mytoken=${MY_TOKEN_PATH} -n default
4. Check the secretname secret under default namespace
Actual results:
mytoken contains a linebreak at the end of the key
Expected results:
mytoken contains just the key with no linebreak nor extra space
Additional info:
I started noticing this recently (mid-december 2025, maybe even more recent)
- links to