appdynamics-charts icon indicating copy to clipboard operation
appdynamics-charts copied to clipboard

Add ability to set generic env entries that can refer to prior env entries

Open maximmold opened this issue 3 years ago • 0 comments

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 (https://github.com/CiscoDevNet/appdynamics-charts/blob/d266f357e1b202eb9667d6084d28782f1f37ad65/machine-agent/templates/daemonset.yaml#L50), but that doesn't seem to be supported by kubernetes.

maximmold avatar Mar 31 '22 19:03 maximmold