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

Simplify Helm Charts for Maximum Flexibility #116

Open
washcycle opened this issue Apr 12, 2023 · 0 comments
Open

Simplify Helm Charts for Maximum Flexibility #116

washcycle opened this issue Apr 12, 2023 · 0 comments

Comments

@washcycle
Copy link
Contributor

washcycle commented Apr 12, 2023

Right now, folks are hardcoding their specific use cases into the helm charts creating spaghetti code.

I propose a refactoring to pull all parameters into the values.yaml

e.g.

possible values.yaml definition

container:
  args:
    - "--endpoint=$(CSI_ENDPOINT)"
    - "--filer=$(SEAWEEDFS_FILER)"
    - "--nodeid=$(NODE_ID)"
    - "--cacheDir=/var/cache/seaweedfs"
    - "--concurrentWriters=10"
    - "--cacheSizeMB=2024"

helm template simplifies from

          args:
           - "--endpoint=$(CSI_ENDPOINT)"
           - "--filer=$(SEAWEEDFS_FILER)"
           - "--nodeid=$(NODE_ID)"
           - "--cacheDir=/var/cache/seaweedfs"
           - "--dataLocality={{ .Values.dataLocality }}"
           - "--concurrentWriters=10"
           # {{- if .Values.node.injectTopologyInfoFromNodeLabel.enabled }}
           # - "--dataCenter=$(DATACENTER)"
           # {{- end }}

to

          args:
            {{- toYaml .Values.container.args | nindent 12 }}        

Then each individual can add things like data locality without breaking the base helm templates for others. This also makes it forward compatible with any parameter additions. Just update the image and the values.yaml with the new parameter you want to use.

Would need to do this modification for annotations, labels, envs, persistence storage etc.

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

1 participant