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 ability to set generic env entries that can refer to prior env entries #28

Open
maximmold opened this issue Mar 31, 2022 · 0 comments

Comments

@maximmold
Copy link

Kubernetes provides the ability for environment entries to reference any defined earlier in the list per this link... https://kubernetes.io/docs/tasks/inject-data-application/define-interdependent-environment-variables/#define-an-environment-dependent-variable-for-a-container.

I would like to be able to utilize this feature to set the APPDYNAMICS_AGENT_UNIQUE_HOST_ID like so...

In the values.yaml

  daemonset:
    envValueFrom:
      MY_HOST_IP:
        fieldRef:
          fieldPath: status.hostIP
    additionalEnv:
      - name: APPDYNAMICS_AGENT_UNIQUE_HOST_ID
        value: "dev-$(MY_HOST_IP)"

This will allow to prefix the name of the resources in the appd console and more easily find things with a more human readable option than the node name currently being assigned.

I've tried this method using a config map reference (

{{- range $value := .Values.daemonset.envFromConfigMap }}
), but that doesn't seem to be supported by kubernetes.

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

No branches or pull requests

1 participant