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

function "lookup" not defined #5032

Closed
davejhahn opened this issue Jan 14, 2021 · 22 comments
Closed

function "lookup" not defined #5032

davejhahn opened this issue Jan 14, 2021 · 22 comments

Comments

@davejhahn
Copy link

Which chart:
Latest (1/14/2021)

Describe the bug
Error: parse error at (zookeeper/charts/common/templates/_secrets.tpl:82): function "lookup" not defined

To Reproduce
Deploy helm chart

Additional context
I just deployed yesterday and didn't have any issues. After getting this error, I forced version 6.0.0 of the Helm Chart and it worked. Not sure if something is wrong with the helm chart or if there are some breaking changes?

@rafariossaa
Copy link
Contributor

Hi,
I could not reproduce the issue.
Could you indicate how you deployed the chart ?
I tried using directly the bitnami chart and also cloning the repo and I couldn't get the issue reproduced.

Using the repo:

$ git clone https://github.com/bitnami/charts
$ cd charts/bitnami/zookeeper/
$ helm dependency update
$ helm install myzk -f values.yaml .

Using the chart:

$ helm install myzk2 bitnami/zookeeper

Deployed charts:

$ helm list
NAME    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART           APP VERSION
myzk    default         1               2021-01-15 10:13:49.840385116 +0100 CET deployed        zookeeper-6.3.1 3.6.2      
myzk2   default         1               2021-01-15 10:14:52.623498088 +0100 CET deployed        zookeeper-6.3.1 3.6.2    ```

@travisjeffery
Copy link

I'm getting the same issue with external-dns, I'm using microk8s' helm3 which is this version:

; microk8s.helm3 version
version.BuildInfo{Version:"v3.0.2", GitCommit:"19e47ee3283ae98139d98460de796c1be1e3975f", GitTreeState:"clean", GoVersion:"go1.13.5"}

Trying to install the latest 4.5.3 version which supposedly fixes a breaking change with backwards compability: https://github.com/bitnami/charts/tree/master/bitnami/common.

@travisjeffery
Copy link

Ah, looks like this it's this 14a0042#r46011226

@rafariossaa
Copy link
Contributor

Hi,
It seems that PR #5056 by @Cellebyte was mereged yesterday. Could you give it a try ?

@FraPazGal
Copy link
Contributor

Hello @travisjeffery @davejhahn,

After investigating the error, we found out that it should be related to the used Helm version. It seems Helm 3.0 is reporting issues with the lookup function even if it isn't being used by the chart. While we work on a fix, could you try installing the chart with Helm version 3.1 or a superior one?

@travisjeffery
Copy link

travisjeffery commented Jan 18, 2021

@FraPazGal in my situation I can't because it's the version microk8s uses, they'd have to upgrade.

@travisjeffery
Copy link

Yeah looks like I'm still getting the lookup issue with latest external-dns.

@Cellebyte
Copy link
Contributor

Cellebyte commented Jan 18, 2021

@travisjeffery could you try to manually update?
Currently version 1.3.2 is used. The fix is available in 1.3.5 of the common lib

@travisjeffery
Copy link

travisjeffery commented Jan 19, 2021

I'm pretty sure I had the lock saying 1.3.5 at one point and it still wasn't working, I could be wrong but I can't check now. I had to pin to 4.5.1 and move on.

@FraPazGal
Copy link
Contributor

Hello,

Yes, the issue comes from the current Helm version used. We have decided to bump the minimum Helm version to 3.1 so that new functionalities can be added to our charts. We understand this may inconvenience some users but opted for this solution to maintain our products up-to-date and benefitting from the newer features. For more information, please check #5091

@donofriov
Copy link

donofriov commented Feb 18, 2021

I'm on helm 3.5.2 and still getting the error:

external-dns.yaml
---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
  name: external-dns
  namespace: kube-system
  annotations:
    fluxcd.io/ignore: "false"
spec:
  releaseName: external-dns
  chart:
    repository: https://charts.bitnami.com/bitnami
    name: external-dns
    version: 4.8.0
...

❯ kubectl apply -f clusters/eks-useast1-nonprod-02/kube-system/external-dns.yaml
helmrelease.helm.fluxcd.io/external-dns configured

❯ kubectl get helmrelease
NAME           RELEASE        STATUS     MESSAGE                                                                                                                                                    AGE
external-dns   external-dns   deployed   failed to upgrade chart for release [external-dns]: parse error at (external-dns/charts/common/templates/_secrets.tpl:84): function "lookup" not defined   308d

❯ helm version
version.BuildInfo{Version:"v3.5.2", GitCommit:"167aac70832d3a384f65f9745335e9fb40169dc2", GitTreeState:"dirty", GoVersion:"go1.15.7"}

❯ fluxctl version
1.21.2

Is there anything else that I need to update?

@Cellebyte
Copy link
Contributor

@donofriov just check which common version is deployed.

@donofriov
Copy link

donofriov commented Feb 18, 2021

@Cellebyte How can I do that? I thought common was included with the external-dns install as a dependency?

I tried adding the latest common dependency but still getting an error

❯ kubectl get helmrelease
NAME           RELEASE   STATUS   MESSAGE                                                                                                                                                    AGE
external-dns                      failed to upgrade chart for release [external-dns]: parse error at (external-dns/charts/common/templates/_secrets.tpl:84): function "lookup" not defined   62s
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
  name: external-dns
  namespace: kube-system
  annotations:
    fluxcd.io/ignore: "false"
spec:
  releaseName: external-dns
  chart:
    repository: https://charts.bitnami.com/bitnami
    name: external-dns
    version: 4.8.0
    dependencies:
    - name: common
      version: 1.3.9
      repository: https://charts.bitnami.com/bitnami

@Cellebyte
Copy link
Contributor

Cellebyte commented Feb 18, 2021

@donofriov just download the helm chart manually from here -> https://charts.bitnami.com/bitnami/external-dns-4.8.0.tgz
and verify that the common version is greater than 1.3.5 also verify that your helm version is greater than 3.1

@rafariossaa
Copy link
Contributor

rafariossaa commented Feb 19, 2021

Hi,
@Cellebyte , thanks for helping other users with the issue !
@donofriov Did that worked for you ?

@donofriov
Copy link

Yea definitely thanks for the help @Cellebyte unfortunately I wasn't able just to update the bitnami versions because we are also using flux (v1). I just updated to the latest flux deployment (1.21.2) and flux helm-operator deployment (1.2.0) and that actually resolved the issue. Now i'm able to use external-dns 4.8.0 and common 1.3.9 without any errors, specifically the lookup function missing.

Thanks for following up @rafariossaa

@Cellebyte
Copy link
Contributor

@donofriov Nice that it is now working :)

@rafariossaa
Copy link
Contributor

Should I process to close this issue ?

@Dhinesh-ATCI
Copy link

Hello ,
I am facing the same Issue for deploying the external-dns through flux . With the Error message as

Warning FailedReleaseSync 3s (x3 over 4m35s) helm-operator synchronization of release 'external-dns' in namespace 'clust-mgmt' failed: installation failed: parse error in "external-dns/charts/common/templates/_secrets.tpl": template: external-dns/charts/common/templates/_secrets.tpl:84: function "lookup" not defined

I have external-dns - 4.8.4 and common - 1.4.1

Is this issue resolve for lookup function .

@Cellebyte
Copy link
Contributor

@Dhinesh-ATCI <- please update your flux it is using probably an old helm version.

@Dhinesh-ATCI
Copy link

Thanks @Cellebyte . My flux was deploying a helm-operator with version v2 as default and when I changed to v3 it is working good and I able to view the external-dns deployment now .

@marcosbc
Copy link
Contributor

marcosbc commented Mar 2, 2021

Since it seems to be working now, I'm closing this issue.

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

No branches or pull requests

8 participants