Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Not all ways of loading manifests skip over chart files #1067

Closed
squaremo opened this issue May 8, 2018 · 0 comments
Closed

Not all ways of loading manifests skip over chart files #1067

squaremo opened this issue May 8, 2018 · 0 comments

Comments

@squaremo
Copy link
Member

squaremo commented May 8, 2018

From @stefanprodan in #993:

I discovered that not all files inside the templates dir are ignored. For example a PodDisruptionBudget gets applied even if it's part of a chart.

apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  name: {{ template "memcached.fullname" . }}
spec:
  selector:
    matchLabels:
      app: {{ template "memcached.fullname" . }}
      chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
      release: "{{ .Release.Name }}"
      heritage: "{{ .Release.Service }}"
  minAvailable: {{ .Values.pdbMinAvailable }}

With the above file, Flux will run into this error:

ts=2018-05-07T08:44:46.764045009Z caller=loop.go:89 component=sync-loop err="loading resources from repo: parsing file at "/tmp/flux-working640881799/repo/charts/memcached/templates/pdb.yaml": parsing YAML doc from "charts/memcached/templates/pdb.yaml": yaml: unmarshal errors:\n line 4: cannot unmarshal !!map into string"

A chart example can be found here: https://github.com/stefanprodan/weave-flux-helm-demo/tree/master/charts/memcached

squaremo added a commit that referenced this issue May 18, 2018
Fix #1067 by filtering out chart dirs from manifest loading of changed files
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant