Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vault] secretv2 kv - atProvider missing, unexpected end of JSON input #978

Open
phac008 opened this issue Jan 10, 2025 · 4 comments
Open
Labels
area:security Related to security brick bug Something isn't working

Comments

@phac008
Copy link
Contributor

phac008 commented Jan 10, 2025

after upgrade provider-vault to v2.0.1

status seems to change from time to time, vault entries are valid, so no direct impact here
....

 status:
  atProvider: {}
  conditions:
  - lastTransitionTime: "2025-01-10T15:54:06Z"
    reason: Creating
    status: "False"
    type: Ready
  - lastTransitionTime: "2025-01-10T15:55:10Z"
    reason: ReconcileSuccess
    status: "True"
    type: Synced
  - lastTransitionTime: "2025-01-10T15:55:10Z"
    reason: Success
    status: "True"
    type: LastAsyncOperation

...

status:
  atProvider:
    customMetadata:
    - casRequired: false
      data:
        bar: "12345"
        foo: [email protected]
      deleteVersionAfter: 0
      maxVersions: 5
    deleteAllVersions: true
    disableRead: false
    id: sx-cnp-oss-kv/data/demo/minio
    metadata:
      created_time: "2025-01-10T15:55:10.296671256Z"
      custom_metadata: '{"bar":"12345","foo":"[email protected]"}'
      deletion_time: ""
      destroyed: "false"
      version: "1"
    mount: sx-cnp-oss-kv
    name: demo/minio
    path: sx-cnp-oss-kv/data/demo/minio
  conditions:
  - lastTransitionTime: "2025-01-10T15:56:10Z"
    reason: Available
    status: "True"
    type: Ready
  - lastTransitionTime: "2025-01-10T15:56:10Z"
    message: 'update failed: async update failed: failed to update the resource: [{0
      data_json "" syntax error: unexpected end of JSON input  []}]'
    reason: ReconcileError
    status: "False"
    type: Synced
  - lastTransitionTime: "2025-01-10T15:56:10Z"
    message: 'async update failed: failed to update the resource: [{0 data_json ""
      syntax error: unexpected end of JSON input  []}]'
    reason: AsyncUpdateFailure
    status: "False"
    type: LastAsyncOperation
@phac008 phac008 added bug Something isn't working area:security Related to security brick labels Jan 10, 2025
@phac008
Copy link
Contributor Author

phac008 commented Jan 10, 2025

may?
upbound/provider-vault#47

@phac008
Copy link
Contributor Author

phac008 commented Feb 14, 2025

update: with v.2.1.1 issue still persist - occurs also during creation of cluster, could lead to timeout during installation of apps, which rely on secrets from vault.
downgrade of provider to v1.0.0 could help here until update is available or even better #797 is implemented

@jkleinlercher
Copy link
Contributor

I tested with both provider versions and it seems it happens sometimes with both versions. Probably it is a race condition where it just takes longer in both versions.

V1 fails: https://github.com/suxess-it/kubriX/actions/runs/13344643571/job/37281438892?pr=1055

@jkleinlercher
Copy link
Contributor

I will also try to add health checks according to https://docs.crossplane.io/latest/guides/crossplane-with-argo-cd/ . Then the secretv2 resources in vault chart should not be healthy when „empty JSON“ error occurs. Then minio and velero chart don’t get synced because vault is still unhealthy.

In general, we then have a better insight if crossplane managed resources are synced and ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:security Related to security brick bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants