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

Chart v4 fails to handle an array of assets #3060

Closed
EronWright opened this issue Jun 13, 2024 · 1 comment · Fixed by #3061
Closed

Chart v4 fails to handle an array of assets #3060

EronWright opened this issue Jun 13, 2024 · 1 comment · Fixed by #3061
Assignees
Labels
area/helm kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@EronWright
Copy link
Contributor

What happened?

Chart v4 supports the use of assets as chart values, for example to populate the extraDeploy parameter (which takes an array of yaml manifests) of a Bitnami chart. For some reason, the value isn't used as expected.

Example

Pulumi.yaml:

resources:
  cert-manager:
    type: kubernetes:helm.sh/v4:Chart
    properties:
      namespace: cert-manager
      chart: oci://registry-1.docker.io/bitnamicharts/cert-manager
      version: "1.3.1"
      values:
        extraDeploy:
        - fn::fileAsset: manifest.yaml

manifest.yaml:

{{- define "certmanager.extra.fullname" -}}
{{- printf "%s-extra" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "certmanager.extra.fullname" . }}
  namespace: {{ .Release.Namespace | quote }}
  labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
    app.kubernetes.io/component: extra
  {{- if .Values.commonAnnotations }}
  annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  {{- end }}

If you run this example, we expect to see a ConfigMap named cert-manager-extra in the set of child resources, as defined by the manifest.

Output of pulumi about

❯ p about
CLI          
Version      3.117.0
Go Version   go1.22.3
Go Compiler  gc

Plugins
KIND      NAME        VERSION
resource  kubernetes  unknown
language  yaml        unknown

Host     
OS       darwin
Version  14.4.1
Arch     arm64

Additional context

The root cause seems to be that values of type array aren't processed correctly.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@EronWright EronWright added kind/bug Some behavior is incorrect or out of spec area/helm needs-triage Needs attention from the triage team labels Jun 13, 2024
@EronWright EronWright self-assigned this Jun 13, 2024
@rquitales rquitales removed the needs-triage Needs attention from the triage team label Jun 14, 2024
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Jun 17, 2024
@pulumi-bot
Copy link
Contributor

This issue has been addressed in PR #3061 and shipped in release v4.14.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants