V3 - Conditional based profiles for workers #8475
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #8184
Design doc: https://dev.azure.com/msazure/One/_git/AAPT-Antares-Docs/pullrequest/5715621?_a=files
Issue describing the changes in this PR
Profiles enable workers to change how the worker is configured based on certain conditions, for example a worker may want to configure
itself differently for a consumption application vs a dedicated application. The profiles will be defined in the
worker.config.jsonfileand will essentially override the default worker description based on a set of conditions.
The Java worker team is working on a prototype where an Application Insights (AI) agent is deployed along side the Java worker
to handle telemetry and logging to AI. Depending on the SKU and environment variables, the AI agent should be used.
Profiles will be used to add arguments required to enable the agent.
Sample
worker.config.jsonwith profiles{ "description": { ... }, // this will always be the default worker configuration "profiles": [ { "profileName": "profile1", "conditions": [ { "conditionType": "environment", "conditionName": "APP_SETTING_NAME", "conditionExpression": "app_setting_value" } ], "description": { "arguments": ["-DmyNewArg"] } }, { "profileName": "profile2", "conditions": [ { "conditionType": "hostProperty", "conditionName": "sku", "conditionExpression": "consumption" } ], "description": { "defaultWorkerPath": "", "arguments": [] } } ] }Pull request checklist
release_notes.md