werf / nelm

Nelm is a Helm 3 alternative and werf deployment engine
Apache License 2.0
264 stars 1 forks source link

Cannot install demo #118

Closed aronneagu closed 3 months ago

aronneagu commented 3 months ago

Hi all,

Trying to run the example from the Readme (https://github.com/werf/nelm?tab=readme-ov-file#getting-started-with-nelm-via-werf) page returns a bunch of errors

$ werf plan --env dev
Version: v2.6.1
Using werf config render file: /tmp/werf-config-render-2773531097
Planning release "myproject-dev" (namespace: "myproject-dev")
Constructing release history
Constructing chart tree
Using cached chart dependencies directory: /home/aneagu/.werf/local_cache/helm_chart_dependencies/1/bb6285092e98d8a887225fe51c37f0de3ef1638d33445f998bd1221190273a0a
Processing resources
Running time 9.10 seconds
Error: error processing deployable resources: error validating adoptable resources: adoption validation failed: 6 errors occurred:
        * resource "CustomResourceDefinition/certificaterequests.cert-manager.io" is not adoptable: annotation "meta.helm.sh/release-name=cert-manager" must have value "myproject-dev", annotation "meta.helm.sh/release-namespace=cert-manager" must have value "myproject-dev"
        * resource "CustomResourceDefinition/certificates.cert-manager.io" is not adoptable: annotation "meta.helm.sh/release-name=cert-manager" must have value "myproject-dev", annotation "meta.helm.sh/release-namespace=cert-manager" must have value "myproject-dev"
        * resource "CustomResourceDefinition/challenges.acme.cert-manager.io" is not adoptable: annotation "meta.helm.sh/release-name=cert-manager" must have value "myproject-dev", annotation "meta.helm.sh/release-namespace=cert-manager" must have value "myproject-dev"
        * resource "CustomResourceDefinition/clusterissuers.cert-manager.io" is not adoptable: annotation "meta.helm.sh/release-name=cert-manager" must have value "myproject-dev", annotation "meta.helm.sh/release-namespace=cert-manager" must have value "myproject-dev"
        * resource "CustomResourceDefinition/issuers.cert-manager.io" is not adoptable: annotation "meta.helm.sh/release-name=cert-manager" must have value "myproject-dev", annotation "meta.helm.sh/release-namespace=cert-manager" must have value "myproject-dev"
        * resource "CustomResourceDefinition/orders.acme.cert-manager.io" is not adoptable: annotation "meta.helm.sh/release-name=cert-manager" must have value "myproject-dev", annotation "meta.helm.sh/release-namespace=cert-manager" must have value "myproject-dev"

Getting the same error when running the werf converge --env dev command

Does anyone know what am I missing?

ilya-lesikov commented 3 months ago

Looks like the mentioned CRDs were already installed in the cluster before werf converge. But they weren't installed as a part of a Helm release, thus they miss the Helm release labels/annotations. Probably you installed cert-manager CRDs earlier either manually or with a different Helm chart.

As of now it's probably easier to disable CRDs installation and re-run werf converge:

cat > .helm/values.yaml <<EOF
cert-manager:
  installCRDs: false
  startupapicheck:
    enabled: false
EOF