feat: add Azure Container Apps support - #228
Conversation
|
| Filename | Overview |
|---|---|
| src/main/java/io/floci/az/services/containerapps/ContainerAppsHandler.java | Implements ARM and ingress orchestration; the latest authorization ordering addresses the previously reported cold-start and unauthorized-start failures. |
| src/main/java/io/floci/az/services/containerapps/ContainerAppRuntimeManager.java | Manages Docker revision replicas and scopes internal caller recognition to exact same-environment container addresses. |
| src/main/java/io/floci/az/services/containerapps/ContainerAppIngressProxy.java | Proxies ingress while preserving the transport-level encoded path, resolving the prior decoding defect. |
| src/main/java/io/floci/az/core/AzureRoutingFilter.java | Captures the encoded path and transport peer before blocking dispatch so ingress can preserve routing semantics and enforce peer-based authorization. |
| src/main/java/io/floci/az/core/docker/ContainerLifecycleManager.java | Adds exact container-address discovery and label-filtered lookup used by internal ingress authorization. |
Sequence Diagram
sequenceDiagram
participant Client
participant Router as AzureRoutingFilter
participant Handler as ContainerAppsHandler
participant Runtime as ContainerAppRuntimeManager
participant Docker
participant App as Revision Replica
Client->>Router: Request to app FQDN
Router->>Handler: AzureRequest with rawPath and peer IP
Handler->>Runtime: Validate internal caller when required
Runtime->>Docker: Resolve exact labeled-container addresses
Docker-->>Runtime: Same-environment replica addresses
Runtime-->>Handler: Allowed or denied
alt Allowed and revision is cold
Handler->>Runtime: Start active revision
Runtime->>Docker: Create replica containers
end
Handler->>App: Proxy encoded path to selected endpoint
App-->>Client: HTTP response
Reviews (11): Last reviewed commit: "fix(containerapps): align regression tes..." | Re-trigger Greptile
5ca3b5b to
3cad5c1
Compare
|
Addressed the encoded Container Apps resource-path feedback in f1e07ef and pushed the update. |
|
Thank you, this is a lot of service in one PR and the wire behaviour holds up well. I checked the status codes, the read-only synthesis, the enum vocabularies and azurerm's read-back requirements against the 2025-07-01 spec and the provider source, and they line up; the compat test genuinely runs against Microsoft's generated client in CI, which is the evidence that matters most. The four Greptile findings are all properly fixed at head, and the encoded-path test standing up a real server is a nice touch. (blocking) (blocking) Neither resource type implements (blocking) Two smaller things worth folding in: environment |
|
Addressed in e6c9741: mocked mode now defaults on, managed environments and apps contribute to the ARM resource index, name availability uses the managed-environment-scoped endpoint, response secrets are redacted, and the PR description now follows the template. Focused tests: 17 passed. |
e6c9741 to
ca25bc2
Compare
hectorvent
left a comment
There was a problem hiding this comment.
Thank you, all three points are cleared and I checked each one in source rather than taking the summary for it. mocked defaults to true, both resource types now contribute to the resource group index with subscription and group filtering, and name availability is scoped under managedEnvironments/{env} which is the only place that operation actually exists. The environment sharedKey and daprAI values are stripped too, and the description now carries the full template.
(follow-up, separate PR) The default flip has one cost worth closing: ContainerAppsCompatibilityTest only asserts ARM state, so it passes under mocked mode and the Docker backed runtime path now has no CI coverage. The Service Bus precedent handles it, set FLOCI_AZ_SERVICES_CONTAINER_APPS_MOCKED=false in the java suite env and the matching workflow entry, and leave the shipped default alone.
No blockers from my side.
|
Since the approval, two of my merges landed under this branch: #268 (host-style routing in |
Implement Azure-compatible managed environments, Container Apps, revisions, scaling, and Docker-backed ingress. Closes floci-io#62
Authorize internal ingress only when transport peer exactly matches a running managed replica address. Network-wide CIDRs let unrelated containers trigger cold starts and reach internal apps.
Bind caller addresses to managed-environment Docker labels. This preserves cold-start authorization across manager restarts while preventing containers outside the target environment from reaching internal apps.
085e83d to
aa3493d
Compare
|
Thank you, cleared. The rebase is content faithful: (follow-up, separate PR) Two things I am tracking rather than asking you to change here. The handler still carries its own private No blockers from my side. |
Summary
Microsoft.App/managedEnvironmentsandMicrosoft.App/containerAppsARM resourcesType of change
fix:)feat:)feat!:orfix!:)Azure Compatibility
Implements the
Microsoft.App2025-07-01 ARM shapes used by Microsoft's generated Java management client. Name availability uses the managed-environment-scoped endpoint; GET responses redact write-only environment and app secrets; both resource types participate in ARM resource-group indexing.Checklist
./mvnw testpasses locallyValidation
./mvnw.cmd test— 827 passedgit diff --check— cleanCloses #62