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

Please add apiVersion and Kind to volumeClaimTemplates (for trivy and wherever else used) #1661

Closed
prezhdarov opened this issue Dec 17, 2023 · 4 comments

Comments

@prezhdarov
Copy link

prezhdarov commented Dec 17, 2023

Please add the full spec of the volumeClaimTemplates when generating sts manifests as partial templates bug CD tools like ArgoCD. Here is the problem:

Helm generates sts manifest that says:

  volumeClaimTemplates:
  -  metadata:
      labels:
       ...
      name: data
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
      ...

However, after applying that manifest Kubernetes reports the sts as:

volumeClaimTemplates:
 - apiVersion: v1
   kind: PersistentVolumeClaim
   metadata:
     labels:
       ....
     name: data
   spec:
     accessModes:
     - ReadWriteOnce
     resources:
       ...

And that bugs the whole process.

A workaround for ArgoCD could be:

ignoreDifferences:
  - group: apps
    kind: StatefulSet
    name: harbor-trivy
    jqPathExpressions:
    - .spec.volumeClaimTemplates[]?.apiVersion
    - .spec.volumeClaimTemplates[]?.kind

but this isn't pretty..

Thank you,
Atanas

@Vad1mo
Copy link
Member

Vad1mo commented Jan 3, 2024

happy to accept PR!

@zyyw
Copy link
Collaborator

zyyw commented Jan 10, 2024

This PR may resolve this issue:

Copy link

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

@github-actions github-actions bot added the Stale label Mar 11, 2024
Copy link

This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants