feat: add templating for twistlock-init init container resource values
The resources of the init job are not currently configurable. Additionally the name of this job doesn't lend to the use of postRenderers to patch these values.
This change adds init.resources
values and templates them in.
Interesting output of helm template twistlock chart
containers:
- name: twistlock-init
image: registry1.dso.mil/ironbank/big-bang/base:2.0.0
imagePullPolicy: IfNotPresent
command: ["/bin/bash", "/opt/twistlock/twistlock-init.sh"]
env:
- name: TWISTLOCK_CONFIG_DIR
value: /etc/opt/twistlock
resources:
limits:
cpu: 0.5
memory: 128Mi
requests:
cpu: 0.5
memory: 128Mi
Interesting output of helm template twistlock chart --set init.resources.requests.cpu="50m"
containers:
- name: twistlock-init
image: registry1.dso.mil/ironbank/big-bang/base:2.0.0
imagePullPolicy: IfNotPresent
command: ["/bin/bash", "/opt/twistlock/twistlock-init.sh"]
env:
- name: TWISTLOCK_CONFIG_DIR
value: /etc/opt/twistlock
resources:
limits:
cpu: 0.5
memory: 128Mi
requests:
cpu: 50m
memory: 128Mi