Right now, I have a values.yaml with a section that looks a bit like this:
...
imageName:
ports:
- containerPort: 7980
name: db0
protocol: TCP
- containerPort: 7981
name: db1
protocol: TCP
- containerPort: 7982
name: db2
protocol: TCP
- containerPort: 7983
name: db3
protocol: TCP
- containerPort: 7984
name: db4
protocol: TCP
- containerPort: 7985
name: db5
protocol: TCP
- containerPort: 7986
name: db6
protocol: TCP
- containerPort: 7987
name: db7
protocol: TCP
- containerPort: 7988
name: db8
protocol: TCP
- containerPort: 7989
name: db9
protocol: TCP
- containerPort: 7990
name: db10
protocol: TCP
...
I'd like to clean this up by creating a function in _helpers.tpl that will take the min port value (7980) and the max port value (7990) and create the structure for each one in that format.
I am wondering: Is this possible? I am having a lot of trouble with this and using the helpers file in general so if anyone can nudge me in the right direction with how to accomplish this, I would appreciate that too!
Thanks :)