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 install failed: template: unifi-video/templates/service-udp.yaml:15:6: executing "unifi-video/templates/service-udp.yaml" at <(.Values.service.loadBalancerIP) and eq .Values.service.type "LoadBalancer">: can't give argument to non-function .Values.service.loadBalancerIP #134

Open
Eagleman7 opened this issue Jan 29, 2021 · 2 comments
Assignees

Comments

@Eagleman7
Copy link

Eagleman7 commented Jan 29, 2021

Hello!

I just tried to install unifi-video using your helm chart! Thanks for making this helm chart!

I do however have 1 problem with it, that it wont install :) I am getting the following error:
Helm install failed: template: unifi-video/templates/service-udp.yaml:15:6: executing "unifi-video/templates/service-udp.yaml" at <(.Values.service.loadBalancerIP) and eq .Values.service.type "LoadBalancer">: can't give argument to non-function .Values.service.loadBalancerIP

This is the config I used:

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: unifi-video
  namespace: unifi
spec:
  interval: 5m
  chart:
    spec:
      chart: unifi-video
      version: 1.0.0
      sourceRef:
        kind: HelmRepository
        name: t3n-charts
        namespace: flux-system
      interval: 5m
  values:
    image:
      repository: pducharme/unifi-video-controller
      tag: 3.10.10
      pullPolicy: IfNotPresent

    persistence:
      config:
        enabled: true
        mountPath: /config
        storageClass: vsphere
        accessMode: ReadWriteOnce
        persistentVolumeReclaimPolicy: Retain
        size: 5Gi

    service:
      type: LoadBalancer
      loadBalancerIP: 192.168.1.201
      
    securityContext:
      allowPrivilegeEscalation: true
      privileged: true
      capabilities:
        add: ["SYS_ADMIN", "DAC_READ_SEARCH"]

Did I do anything wrong, or might this be a bug?

@mschmidt291 mschmidt291 self-assigned this Feb 2, 2021
@mschmidt291
Copy link
Contributor

@Eagleman7 I tried installing the chart and got no issues. When searching for your error message, I found out that this might be due to flux operator. We're not using Flux and I have no experience with it. Maybe
rook/rook#5378 (comment) helps with your issue?

@Eagleman7
Copy link
Author

Hello!

I was able to fix this issue by changing the following line:

{{ if (.Values.service.loadBalancerIP) and eq .Values.service.type "LoadBalancer" }}

to:
{{ if .Values.service.loadBalancerIP }}

I then cloned your repo and deployed it from the local file system with /var/lib/snapd/snap/bin/helm install unifi-video unifi-video/ --values unifi-video/values.yaml

I did however switch to frigate because it was to much effort to redeploy your chart with above fix to another repo. Also unifi-video is end-of-life, and I switched to frigate because of that.

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

2 participants