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

Agent adding instance suffix to additional brokerProperties #708

Closed
kate-goldenring opened this issue Oct 22, 2024 · 0 comments · Fixed by #710
Closed

Agent adding instance suffix to additional brokerProperties #708

kate-goldenring opened this issue Oct 22, 2024 · 0 comments · Fixed by #710
Labels
bug Something isn't working

Comments

@kate-goldenring
Copy link
Contributor

Describe the bug

Configuration brokerProperties provides a way for users to supply additional env vars to an akri broker, independent of the ones provided by a discovery handler. They should not be modified with a suffix like ones set by a discovery handler.

The result is that a broker env var provided in the Configuration as RANDOM=value is now mounted as RANDOM_AKRI-DEBUG-ECHO-489660=value instead of staying RANDOM=value. This is done here in the agent:

fn cdi_device_to_car(instance_name: &str, device: &cdi::Device) -> ContainerAllocateResponse {

To Reproduce
Install release (old) helm chart with older agent:

helm repo add akri-helm-charts https://project-akri.github.io/akri/
helm install akri akri-helm-charts/akri \
    --set agent.allowDebugEcho=true \
    --set debugEcho.discovery.enabled=true \
    --set debugEcho.configuration.enabled=true \
    --set debugEcho.configuration.brokerPod.image.repository=nginx \
    --set debugEcho.configuration.brokerPod.image.tag=stable-alpine \
    --set debugEcho.configuration.shared=false

Once broker pods are running, get foo device env

kubectl exec -it akri-debug-echo-489660-pod -- /bin/sh -c "printenv | grep RANDOM"
RANDOM=value

Uninstall akri helm uninstall akri

Repeat for dev chart (latest akri):
Install release (old) helm chart with older agent:

helm repo add akri-helm-charts https://project-akri.github.io/akri/
helm install akri akri-helm-charts/akri-dev \
    --set agent.allowDebugEcho=true \
    --set debugEcho.discovery.enabled=true \
    --set debugEcho.configuration.enabled=true \
    --set debugEcho.configuration.brokerPod.image.repository=nginx \
    --set debugEcho.configuration.brokerPod.image.tag=stable-alpine \
    --set debugEcho.configuration.shared=false

Once broker pods are running, get foo device env

kubectl exec -it akri-debug-echo-123456-pod -- /bin/sh -c "printenv | grep RANDOM"
RANDOM_AKRI-DEBUG-ECHO-489660=value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant