helm-charts
helm-charts copied to clipboard
[fluentd] add support to nodePort
Provide ability to define specific nodePort value in the service.yaml file
Closes: https://github.com/fluent/helm-charts/issues/233
Hello @shurikg,
Do you mind to rebsae and update the chart version?
Hello @shurikg,
Do you mind to rebase and update the chart version?
Done
You need to bump chart version under Chart.yaml!
You need to bump chart version under Chart.yaml!
version bumped
Your contribution is not working. For me, at least. Can you review?
You need to replace {{- if and ( eq .Values.service.type "NodePort" ) $port.nodePort }}
with {{- if and ( eq $.Values.service.type "NodePort" ) $port.nodePort }}
and then test with
helm template fluentd ../fluentd -n kube-system --set service.type="NodePort" -s templates/service.yaml
@dioguerra you are right, my bad.
Fixed now.
I did the below test:
- Create the custom values file with the content
service:
type: "NodePort"
ports:
- name: "test_1"
protocol: TCP
containerPort: 24224
nodePort: 22222
- name: "test_2"
protocol: TCP
containerPort: 32000
- Run the
helm template fluentd ../fluentd -s templates/service.yaml -f /tmp/cust_values.yaml
command and verify that I see nodePort definition under thetest_1
port andtest_2
port created without nodePort definition as expected.
Output of template command is
---
# Source: fluentd/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: fluentd
labels:
helm.sh/chart: fluentd-0.3.10
app.kubernetes.io/name: fluentd
app.kubernetes.io/instance: fluentd
app.kubernetes.io/version: "v1.14.6"
app.kubernetes.io/managed-by: Helm
spec:
type: NodePort
ports:
- port: 24231
targetPort: metrics
protocol: TCP
name: metrics
- name: test_1
port: 24224
targetPort: 24224
protocol: TCP
nodePort: 22222
- name: test_2
port: 32000
targetPort: 32000
protocol: TCP
selector:
app.kubernetes.io/name: fluentd
app.kubernetes.io/instance: fluentd
Ok, for me we can merge.
I was thinking we might actually want to split the services into type? so not to expose everything @naseemkullah
+1 really required feature (to create for example a Fluent gateway)