pegasystems / pega-helm-charts

Orchestrate a Pega Platform™ deployment by using Docker, Kubernetes, and Helm to take advantage of Pega Platform Cloud Choice flexibility.
https://community.pega.com/knowledgebase/articles/cloud-choice
Apache License 2.0
124 stars 198 forks source link

For helm 3.0.0 getting "unknown object type "nil"" error on pega chart install #34

Closed Emilio-Pega closed 4 years ago

Emilio-Pega commented 4 years ago

When installing the pega chart I am seeing the following error when using helm 3.0.0

Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: [unknown object type "nil" in Secret.data.DB_PASSWORD, unknown object type "nil" in Secret.data.DB_USERNAME]

Same works fine with helm 2.14.3

rajshrimohanks commented 4 years ago

I came across this too.

This probably is because of this: https://github.com/helm/helm/issues/5750 Helm v3 expects a default value for all keys. YAML spec defines empty values as null/nil so the error you see is expected behaviour. The chart should be updated to conform to the spec.

Meanwhile if you want to get rid of this, pass a dummy value to the variable if you are not using it. But seeing that you are getting hit by the error on DB_USERNAME, have you left the username field in global.jdbc empty?

Emilio-Pega commented 4 years ago

Yes that is definitely the cause, empty/null values being treated differently for helm 3.0.0

dcasavant commented 4 years ago

@Emilio-Pega Try #33 . I drafted up some changes to support Helm 3 and the latest Kubernetes version.

Emilio-Pega commented 4 years ago

Thanks @dcasavant I was just telling my team about that PR :) will take a look either today or tomorrow

rajshrimohanks commented 4 years ago

This PR doesn't have this issue. Thanks. 👍🏾

dcasavant commented 4 years ago

Merged

jayaprakash369 commented 2 years ago

hello i also tried to install deis workflow using hem chart. helm install deis hephy/workflow --create-namespace --namespace deis --set global.use_cni=true -f deis-install.yml and code is,

# This is the global configuration file for Workflow
global:
  # Change to s3
  storage: s3
  database_location: "on-cluster"
  logger_redis_location: "on-cluster"
  influxdb_location: "on-cluster"
  grafana_location: "on-cluster"

  # Change to ecr
  registry_location: "ecr"
  host_port: 5555
  secret_prefix: "private-registry"
  experimental_native_ingress: false
  use_rbac: true

  s3:
    # Add access key and secret to user with read/write access to buckets
    accesskey: "*******"
    secretkey: "********"
    region: "eu-west-1"
    # Buckets you already created
    database_bucket: "*********"
    builder_bucket: "***********"

  controller:
    app_pull_policy: "IfNotPresent"
    registration_mode: "admin_only"
    platform_domain: "********"

  database:
    username: "deis"
    password: "*******"
    postgres:
      name: "********"
      username: "deis"
      password: "*************"
      host: "*************"
      port: "5432"

  #redis:
  #  db: "0"
    # host: "redis host"
    # port: "redis port"
    # password: "redis password" # "" == no password

  # fluentd:
  #   syslog:
  #     host: ""
  #     port: ""

  monitor:
    grafana:
    user: "admin"
    password: "************"
    persistence:
      enabled: false # Set to true to enable persistence
      size: 5Gi # PVC size
    influxdb:
      url: "**************"
      database: "admin"
      user: "deis"
      password: "***********"
      persistence:
        enabled: true # Set to true to enable persistence
        size: 200Gi # PVC size

  registry-token-refresher:
    token_refresh_time: ""
    # off_cluster_registry:
    #   hostname: ""
    #   organization: ""
    #   username: ""
    #   password: ""
    ecr:
      # Access key and secret for user with access to ECR registry
     accesskey: "*******"
     secretkey: "**********"
      # Hostname of ECR registry
     hostname: "**********"
      # Region where registry is located
     region: eu-north-1
      # Registry id (same as start in hostname)
     registryid: "**********"

    # gcr:
    #   key_json: <base64-encoded JSON data>
    #   hostname: ""

  router:
    dhparam: ""
    deployment_annotations:
      # Max body of requests for router
      router.deis.io/nginx.bodySize: "50m"

  #   service_annotations:
  #   #<example-key>: <example-value>

    host_port:
      enabled: false

    workflow-manager:
      versions_api_url: https://versions.teamhephy.info
      doctor_api_url: https://doctor.teamhephy.info

but I am getting error like,

Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: [unknown object type "nil" in Secret.data.accesskey, unknown object type "nil" in Secret.data.hostname, unknown object type "nil" in Secret.data.registryid, unknown object type "nil" in Secret.data.secretkey]

I tried with empty string, and attached I am policy to user full access for ECR and changed kubeconfig file. but none of them helped me source link: https://github.com/deis/workflow/blob/master/charts/workflow/values.yaml can anyone tell me what could be wrong here?