zalf-rdm / geonode-k8s

A Kubernetes helm chart for the geospacial webapplication Geonode
https://geonode-k8s.readthedocs.io/en/latest/
GNU General Public License v2.0
12 stars 7 forks source link

Bug: unable to upgrade application on k8s #116

Closed AlexGacon closed 7 months ago

AlexGacon commented 7 months ago

Bug Description

helm upgrade --install fails with the following message:

Error: UPGRADE FAILED: [resource mapping not found for name: "oh-geonode-postgres-operator" namespace: "open-hypervision-dev" from "": no matches for kind "OperatorConfiguration" in version "acid.zalan.do/v1"
ensure CRDs are installed first, resource mapping not found for name: "oh-geonode-postgresql" namespace: "" from "": no matches for kind "postgresql" in version "acid.zalan.do/v1"
ensure CRDs are installed first]

Reproduction Steps

Version 1.0.5

Provider: Azure AKS Kubernetes Version: v1.25.11

values.yaml:

geonode-k8s:
  global:
    storageClassName: azurefile
  geonode:
    accesscontrol:
      lockdown: "True"
    general:
      externalDomain: geonode.oh.egis-group.dev
      externalScheme: https
    image:
      name: registry-gitdoit.egis.fr/go3e-eau/open-hypervision/oh-geonode
      tag: "v0.0.4-django"
    ingress:
      ingressClassName: nginx
      annotations:
        cert-manager.io/cluster-issuer: letsencrypt-prod
        kubernetes.io/ingress.class: nginx
        nginx.ingress.kubernetes.io/proxy-body-size: 600m
        nginx.org/client-max-body-size: 600m
        nginx.org/proxy-connect-timeout: 3600s
        nginx.org/proxy-read-timeout: 3600s
        nginx.org/proxy-send-timeout: 3600s
      tlsSecret: "secret-geonode"
    # à remplacer par un secret quand ok
 #   secret:
      # existingSecretName: 
  #geoserver:
    # à remplacer par un secret quand ok
   # secret:
      # existingSecretName: 
  nginx:
    external_cors:
      # -- Add Access-Control-Allow-Origin directive to allow integration from an external domain
      enabled: true
      # -- Target domain for CORS
      domain: "https://myworld.egis.com"

Behavior

A description of what you expected to happen and what actually happened.

Additional Information

Any additional information or context that may be helpful in resolving the bug.

ridoo commented 7 months ago

@AlexGacon what is the ecaxt helm command you are running? Did you forget to add the --namespace option?

AlexGacon commented 7 months ago
    - kubectl config use-context go3e-eau/open-hypervision/oh-kubernetes:openhypervision-p1d-01-aks
    - helm version
    - helm repo add bitnami https://charts.bitnami.com/bitnami/
    - helm repo add kartoza https://kartoza.github.io/charts
    - helm repo add geonode https://zalf-rdm.github.io/geonode-k8s/
    - helm repo update
    - helm dependency build ./egis-geonode
    - |
      helm upgrade --install \
        --kube-insecure-skip-tls-verify \
        --namespace open-hypervision-dev \
        oh-geonode \
        ./egis-geonode
ridoo commented 7 months ago

From your comment I cannot get what Helm version your are running.

However, did you try to install CRDs via --set installCRDs=true ?

AlexGacon commented 7 months ago

I am waiting for the customer approval to install the CRDs into its cluster: perhaps it could be interesting to add the option in the documentation of the project ?

ridoo commented 7 months ago

In my case I never had to install CRDs explicitly even when invoking helm upgrade or helm upgrade --install. So not sure, if this is the root of the problem. However, the error message states, they are missing -- so why not installing them :)

But you are right, such case could be worth a comment in the installation section -- in any case, I would like to understand why this behaves differently on different environments. Before adding anything, though, we should wait for feedback if this resolves the problem at all.

AlexGacon commented 7 months ago

The customer is afraid of using zalando operator so I will deploy a postgres database with another method.