0

I am trying to create a secret with a file of type Oracle wallet - cwallet.sso file. But I noticed that, the checksum of the mounted file is not same as the original file. As a result, I am unable to connect to db.

I am trying to create secret from the file itself as below: kubectl -n ${NAMESPACE} create secret generic conn-details --from-file=./sqlnet.ora --from-file=./tnsnames.ora --from-file=./cwallet.sso -o yaml | kubectl apply -f -

Is there something wrong with my approach?

Adding more details that I had missed earlier: The secret creation works manually, but via Jenkins pipeline it fails. Is the below syntax a correct way to copy sso file type? writeFile file: "cwallet.sso", text: libraryResource('adw' + '/cwallet.sso')

Anjana
  • 1
  • 4
  • did you notice any changes in the mounted file? are both identical? – hariK May 18 '20 at 18:46
  • I tried but I couldn't reproduce the issue. `root@app:/app# md5sum cwallet.sso sqlnet.ora tnsnames.ora ` `693c9858cf3ffadec26cc67a224b3a97 cwallet.sso` `7a5043aba4492d8e163a192f2597d753 sqlnet.ora` `1804d67d3a802c2371ede9607b7bacec tnsnames.ora` `$ md5sum cwallet.sso sqlnet.ora tnsnames.ora` `693c9858cf3ffadec26cc67a224b3a97 cwallet.sso` `7a5043aba4492d8e163a192f2597d753 sqlnet.ora` `1804d67d3a802c2371ede9607b7bacec tnsnames.ora` could you please share more details if possible? – hariK May 18 '20 at 21:53
  • How was the cwallet.sso file originally created? Was the -auto_login_local flag used? If so, you may not be able to copy it like that. – pmdba May 19 '20 at 05:33
  • @hariK Thanks for the response.The file was downloaded from the ADW console. When I create the secret manually, then it is working fine. However when I am doing it as part of the pipeline, the artifact is not getting uploaded properly. This is how I am trying to copy the file: writeFile file: "cwallet.sso", text: libraryResource(adw + '/cwallet.sso') – Anjana May 19 '20 at 16:48

0 Answers0