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

Add InstanceID in the ENV for fluentd helm charts #352

Open
vkadi opened this issue Oct 31, 2022 · 1 comment
Open

Add InstanceID in the ENV for fluentd helm charts #352

vkadi opened this issue Oct 31, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@vkadi
Copy link
Contributor

vkadi commented Oct 31, 2022

Is your feature request related to a problem? Please describe.

I want to add new ENV to the KFO helm charts for INSTANCE_ID and I did not see a way to configure that via values.yaml.
I cannot add it like secrets as the instance_id will be dynamic based on the n number of nodes.

Tried like below under fluentd -

fluentd:
extraEnv:
- name: INSTANCE_ID
valueFrom:
fieldRef:
fieldPath: spec.providerID

or

fluentd:
extraEnv:
INSTANCE_ID: "spec.providerID | cut -d '/' -f 5"

Is there any other way I can add the ENV in the helm chart? Please suggest if there is an alternative.

Describe the solution you'd like

There should be a way to introduce new env like - https://github.com/vmware/kube-fluentd-operator/blob/main/charts/log-router/templates/daemonset.yaml#L48

Describe alternatives you've considered

N/A

Additional context

N/A

@vkadi vkadi added the enhancement New feature or request label Oct 31, 2022
@vkadi
Copy link
Contributor Author

vkadi commented Oct 31, 2022

@Cryptophobia @javiercri any suggestions for this issue? Is there a way to add INSTANCE_ID to ENV for pods same like K8S_NODE_NAME via values.yaml .
spec.providerID gives the output as aws:///eu-west-3c/i-0a79903e0d1904f4 and I thought using some hacks I can extract the instanceid and use it further to pass to the fluentd pod but did not have a success that route :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant