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

allow agent to pull its metadata from environment #156

Merged
merged 4 commits into from
Apr 2, 2024
Merged

Conversation

autodidaddict
Copy link
Contributor

In order to eventually support the no-sandbox mode, agents will need a way to get the NATS internal IP and port and the workloadId that it's been assigned from the node.

This PR makes it so that if the NEX_SANDBOX environment variable both exists and contains the value "false", then the agent will skip the MMDS query. When the agent is running in a sandbox (firecracker + rootfs), the agent is running as an openrc service and so won't have that env var.

@autodidaddict autodidaddict requested a review from a team as a code owner April 2, 2024 12:29
agent/agent.go Outdated Show resolved Hide resolved
agent/agent.go Outdated Show resolved Hide resolved
agent/metadata.go Outdated Show resolved Hide resolved
kthomas
kthomas previously approved these changes Apr 2, 2024
Copy link
Contributor

@kthomas kthomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few suggestions but LGTM otherwise. We can clean those items up later if you prefer.

@autodidaddict
Copy link
Contributor Author

I left a few suggestions but LGTM otherwise. We can clean those items up later if you prefer.

Addressed your items

@autodidaddict autodidaddict merged commit 65d37a0 into main Apr 2, 2024
3 checks passed
@autodidaddict autodidaddict deleted the feat/agentenv branch April 2, 2024 13:11
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

Successfully merging this pull request may close these issues.

2 participants