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

helm-controller Install fails, but works fine with standard Helm install #152

Closed
rmccright-ms3 opened this issue Nov 16, 2020 · 2 comments · Fixed by #172
Closed

helm-controller Install fails, but works fine with standard Helm install #152

rmccright-ms3 opened this issue Nov 16, 2020 · 2 comments · Fixed by #172
Assignees

Comments

@rmccright-ms3
Copy link

When attempting to make a release of this Kong Chart the helm-controller errors out when running a _helpers template. However, this Chart installs just fine via standard Helm commands.

The error:
helm-controller Helm install failed: template: kong/templates/migrations.yaml:41:10: executing "kong/templates/migrations.yaml" at <include "kong.wait-for-postgres" .>: error calling include: template: kong/templates/_helpers.tpl: │ │ 630:6: executing "kong.wait-for-postgres" at <include "kong.no_daemon_env" .>: error calling include: template: kong/templates/_helpers.tpl:599:15: executing "kong.renderEnv" at <.>: wrong type for value; expected map[string]interface {}; got string

The Source/HelmRelease used:

---
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
  name: konghq
  namespace: flux-system
spec:
  interval: 1m
  url: https://charts.konghq.com
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: kong
  namespace: kong
spec:
  targetNamespace: kong
  interval: 1m
  chart:
    spec:
      #https://github.com/Kong/charts/tree/main/charts/kong
      chart: kong
      version: 1.11.0
      sourceRef:
        kind: HelmRepository
        name: konghq
        namespace: flux-system
  install:
    remediation:
      retries: 5
  upgrade:
    remediation:
      retries: 5
@rmccright-ms3 rmccright-ms3 changed the title helm-controller Install of Kong Chart Release fails, but works fine with standard Helm commands helm-controller Install fails, but works fine with standard Helm install Nov 16, 2020
@sebafo
Copy link

sebafo commented Nov 16, 2020

Same problem here. There is a workaround for the chart - but I don't know what really causes this issue :(
Kong/charts#224

@stefanprodan stefanprodan transferred this issue from fluxcd/flux2 Nov 21, 2020
@drewwalters96
Copy link

We're observing a similar error on a chart that we deploy successfully with the helm-operator and Helm CLI.

2020-11-19 15:45:02.074719 | primary | helmrelease.helm.toolkit.fluxcd.io/memcached is InProgress: reconciliation in progress
2020-11-19 15:45:02.074865 | primary | helmrelease.helm.toolkit.fluxcd.io/memcached is InProgress: Helm install failed: template: memcached/templates/deployment.yaml:55:36: executing "memcached/templates/deployment.yaml" at <include "helm-toolkit.snippets.kubernetes_entrypoint_init_container">: error calling include: template: memcached/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl:170:109: executing "helm-toolkit.snippets.kubernetes_entrypoint_init_container" at <include "helm-toolkit.snippets.kubernetes_container_security_context">: error calling include: template: memcached/charts/helm-toolkit/templates/snippets/_kubernetes_container_security_context.tpl:40:21: executing "helm-toolkit.snippets.kubernetes_container_security_context" at <$envAll.Values.pod>: can't evaluate field Values in type string
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  annotations:
    config.kubernetes.io/path: openstack/helmrelease_memcached.yaml
  name: memcached
  namespace: openstack
spec:
  chart:
    spec:
      chart: memcached
      interval: 1m
      sourceRef:
        kind: HelmRepository
        name: memcached
      version: 0.1.1
  interval: 5m
  test:
    enable: false
  timeout: 10m
  values:
    labels:
      prometheus_memcached_exporter:
        node_selector_key: kubernetes.io/os
        node_selector_value: linux
      server:
        node_selector_key: kubernetes.io/os
        node_selector_value: linux
    monitoring:
      prometheus:
        enabled: false
---
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
  annotations:
    config.kubernetes.io/path: openstack/helmrepository_memcached.yaml
  name: memcached
  namespace: openstack
spec:
  interval: 10m
  url: https://tarballs.opendev.org/openstack/openstack-helm-infra

Helper

Chart

@seaneagan seaneagan self-assigned this Dec 3, 2020
seaneagan added a commit to seaneagan/helm-controller that referenced this issue Dec 3, 2020
Replace mergo version used by controller-runtime which is broken [0],
until we can move to controller-runtime 0.7.0 which no longer uses this version.

Fixes fluxcd#152

[0]: darccio/mergo#139
seaneagan added a commit to seaneagan/helm-controller that referenced this issue Dec 4, 2020
Replace mergo version used by controller-runtime which is broken [0],
until we can move to controller-runtime 0.7.0 which no longer uses this version.

Fixes fluxcd#152

[0]: darccio/mergo#139

Signed-off-by: Sean Eagan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants