sigstore / helm-charts

Helm charts for sigstore project
Apache License 2.0
62 stars 88 forks source link

helm install --skip-crds doesn't work with policy-controller chart #740

Open dszakallas opened 2 months ago

dszakallas commented 2 months ago

Description

I am trying to install a release of policy-controller helm chart with externally managed CRDs. First, I tried to set installCRDs: false, but that has no effect. In fact, there's no template branch using this value. Then, I tried to set --skip-crds with Helm but that doesn't work as the CRDs have to be put in crds directory (not templates/crds), and as a consequence, cannot be templated, which is a problem for clusterimagepolicy

Please provide a way to skip installing the CRDs. Version

policy-controller 0.6.8

dszakallas commented 2 months ago

the original functionality was removed here: https://github.com/sigstore/helm-charts/commit/e6373935be6adeb521b516c1db394f474b23b81b

dszakallas commented 2 months ago

As a work around for anyone using the kustomize postrenderer, the CRDs can be removed with applying these patches to the templated output:

patches:
  - patch: |-
      $patch: delete
      apiVersion: apiextensions.k8s.io/v1
      kind: CustomResourceDefinition
      metadata:
        name: clusterimagepolicies.policy.sigstore.dev
  - patch: |-
      $patch: delete
      apiVersion: apiextensions.k8s.io/v1
      kind: CustomResourceDefinition
      metadata:
        name: trustroots.policy.sigstore.dev