library-charts
library-charts copied to clipboard
Add `hostPort` support to the common chart
Details
Helm chart name: common
Describe the solution you'd like:
Add possibility to specify a hostPort
Anything else you would like to add: It can be useful
Additional Information: none
Until this gets added, it is possible to get it done when using FluxCD - use postRenderers on your HelmRelease like the following (example for Samba):
postRenderers:
- kustomize:
patchesStrategicMerge:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: samba
spec:
template:
spec:
containers:
- name: samba
ports:
- containerPort: 139
protocol: TCP
hostPort: 139
- containerPort: 445
protocol: TCP
hostPort: 445
Alternatively, using JSON Patch:
patchesJson6902:
- target:
group: apps
version: v1
kind: Deployment
name: samba
patch:
- op: add
path: "/spec/template/spec/containers/0/ports/0/hostPort"
value: 139
- op: add
path: "/spec/template/spec/containers/0/ports/1/hostPort"
value: 445
Both will give the same result.