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

Handle images in HelmChartConfig #25

Open
Leobaillard opened this issue Feb 29, 2024 · 2 comments
Open

Handle images in HelmChartConfig #25

Leobaillard opened this issue Feb 29, 2024 · 2 comments

Comments

@Leobaillard
Copy link

For my use case, I have a HelmChartConfig template that edits the default configuration for the Traefik instance in my clusters. It seems that helm-images is not able to get the images inside of that object type.

Here is an example:

apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
  name: traefik
  namespace: kube-system
spec:
  valuesContent: |-
    deployment:
      kind: DaemonSet
      additionalContainers:
        - name: nxlog
          image: {{ tpl .Values.log.images.nxlog . | replace "//" "/" }}
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          env:
            - name: "PUID"
              value: "65532"
            - name: "GUID"
              value: "65532"
          volumeMounts:
            - name: fifo-logs
              mountPath: /logs
            - name: traefik-nxlog-config
              mountPath: /etc/nxlog/nxlog.conf
              subPath: nxlog.conf

In this case, the images in the valuesContent are not handled. Could this be added?

Thanks!

@nikhilsbhat
Copy link
Owner

@Leobaillard , at the moment the plugin doesn't support HelmChartConfig. Once I'm back, I'll check the feasibility of this and add support for the same.

@thejan2009
Copy link

A temporary workaround is to extract the valuesContent and pass them to helm, e.g.

override="$(mktemp)"
yq '.spec.ValuesContent' path/to/HelmChartConfig.yaml >"$override"
helm images get traefik path/to/traefik/chart -f "$override"

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

3 participants