RestServer - add image regex to limit the valid image - #107
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a configurable option to control whether container images must be pulled from Azure Container Registry (ACR). The feature allows administrators to enforce or relax ACR-only image requirements based on deployment needs.
Key changes:
- Added
forceAcrconfiguration option that can be set via environment variable - Made ACR validation conditional based on the new configuration flag
- Set default value to
falsefor backward compatibility
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/rest-server/src/middlewares/v2/quota.js | Wrapped existing ACR validation logic in conditional check based on forceAcr config |
| src/rest-server/src/config/launcher.js | Added forceAcr configuration property parsed from FORCE_ACR environment variable |
| src/rest-server/deploy/rest-server.yaml.template | Added FORCE_ACR environment variable to deployment template with conditional logic |
| src/rest-server/config/rest-server.yaml | Added default force_acr: false configuration value |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Rui Gao (hippogr)
left a comment
There was a problem hiding this comment.
Overall it is good to merge except one of my little questions. I will approve it.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Major Revision