You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in order to assert templates making use of the lookup function
I need hcunit to support this keyword
To Reproduce
With the following serviceinstance.yml template
apiVersion: servicecatalog.k8s.io/v1beta1kind: ServiceInstance{{ $serviceInstance:= ( lookup "servicecatalog.k8s.io/v1beta1" "ServiceInstance" .Release.Namespace $fullName) -}}metadata:
namespace: {{ .Release.Namespace }}name: {{ include "p-mysql.fullname" . }}labels:
{{- include "p-mysql.labels" . | nindent 4 }}spec:
#Let svcat reference service class and service plans from external names (i.e. OSB names)#See https://github.com/kubernetes-sigs/service-catalog/blob/a204c0d26c60b42121aa608c39a179680e499d2a/contrib/examples/walkthrough/mini-instance.yaml#L1-L11clusterServiceClassExternalName: {{ .Values.serviceClassName }}clusterServicePlanExternalName: {{ .Values.servicePlanName }}
when running
helm unit eval -t templates/ -c values.yaml -p my_assert.rego
then
error while rendering: parse error in "hcunit/templates/serviceinstance.yaml": template: hcunit/templates/serviceinstance.yaml:3: function "lookup" not defined
Error: plugin "unit" exited with error
helm.go:81: [debug] plugin "unit" exited with error
on version 0.7.5
The text was updated successfully, but these errors were encountered:
Describe the bug
As a hcunit user
To Reproduce
With the following
serviceinstance.yml
templatewhen running
then
on version 0.7.5
The text was updated successfully, but these errors were encountered: