Azure / k8s-create-secret

GitHub Action to create Kubernetes cluster secrets
MIT License
35 stars 31 forks source link

Support for non-existing secrets #93

Open JeannedArk opened 1 year ago

JeannedArk commented 1 year ago

Hi,

are there any considerations to support deployment of secrets for the first time, i.e. when secrets do not yet exist? I am aware that the documentation says: Create a generic secret or docker-registry secret in Kubernetes cluster, replacing the secret if it already exists.

Currently, using the action in this scenario results in:

Warning: Failed to delete secret with statusCode: 404
Warning: {}
Deleting secret:
undefined
Error: SyntaxError: Unexpected token = in JSON at position 27

IMHO it would be quite useful to support this.

Thanks

github-actions[bot] commented 1 year ago

This issue is idle because it has been open for 14 days with no activity.

bownux commented 1 year ago

I think it is actually deleting the secret and not able to parse the result json.

github-actions[bot] commented 1 year ago

This issue is idle because it has been open for 14 days with no activity.

PiotrDevCAN commented 7 months ago

Hi, is there any update on this? I noticed this problem concerns all versions above v2 and secrets that are defined as 'generic' Assuming, initially, the specific secret doesn't exist, and providing base64 value into the data key, the action fails with the following error: Warning: Failed to delete secret with statusCode: 404 Warning: {} Deleting secret: undefined Error: SyntaxError: Unexpected token h in JSON at position 0