Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Poller iteration gets interrupted if one of the ExternalSecrets is not properly formatted (e.g. absent secretsDescriptor.data element) #158

Closed
walcovanloon opened this issue Sep 3, 2019 · 5 comments
Labels

Comments

@walcovanloon
Copy link

walcovanloon commented Sep 3, 2019

https://github.com/godaddy/kubernetes-external-secrets/blob/72a4f6f420230825b8cd55e42949e8655b04ba6c/lib/backends/kv-backend.js#L67

Expected outcome:
a validation error is logged by the daemon, but handling of external secrets continues.

Actual outcome:
poller gets interrupted, does not continue with the ExternalSecrets that follow the malformatted ExternalSecret

Stacktrace logged:

at SecretsManagerBackend._fetchSecretPropertyValues (/app/lib/backends/kv-backend.js:26:37)\n at SecretsManagerBackend.getSecretManifestData (/app/lib/backends/kv-backend.js:68:45)\n at Poller._createSecretManifest (/app/lib/poller.js:52:8)\n at Poller._upsertKubernetesSecret (/app/lib/poller.js:89:39)\n at Poller._poll (/app/lib/poller.js:75:18)\n at ontimeout (timers.js:436:11)\n at tryOnTimeout (timers.js:300:5)\n at listOnTimeout (timers.js:263:5)\n at Timer.processTimers (timers.js:223:10)","msg":"Cannot read property 'map' of undefined","v":1}

@walcovanloon walcovanloon changed the title Poller gets interrupted if one of the ExternalSecrets is not properly formatted (e.g. absent secretsDescriptor.data element) Poller iteration gets interrupted if one of the ExternalSecrets is not properly formatted (e.g. absent secretsDescriptor.data element) Sep 3, 2019
@moolen
Copy link
Member

moolen commented Oct 29, 2019

I can reproduce this problem. We should also think about validating the External Secret resource using OpenAPI Validation.

/good-first-issue

moolen added a commit to moolen/kubernetes-external-secrets that referenced this issue Nov 5, 2019
moolen added a commit to moolen/kubernetes-external-secrets that referenced this issue Nov 7, 2019
moolen added a commit to moolen/kubernetes-external-secrets that referenced this issue Nov 8, 2019
moolen added a commit to moolen/kubernetes-external-secrets that referenced this issue Nov 8, 2019
@Flydiverny
Copy link
Member

#208 has been merged and CRD validation will be available in next release, but I think we could probably still do some improvements on error handling and reporting of borked externalsecrets.

@walcovanloon
Copy link
Author

walcovanloon commented Nov 13, 2019

great, thanks for the fix! I will test it on the next release.

@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Jan 29, 2021
@moolen
Copy link
Member

moolen commented Jan 29, 2021

I think this is done (#208). Feel free to re-open or create a new issue for enhancements.

@moolen moolen closed this as completed Jan 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants