Fix: Support public-resources and private-resources in Docker blueprint labels #452

Closed
opened 2026-04-05 17:10:54 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @djcrafts on 12/21/2025

Summary

Fixes #2125 by adding support for public-resources and private-resources as aliases in Docker blueprint labels, matching the functionality already available in YAML blueprints.

Problem

When using Docker container labels with pangolin.public-resources.* or pangolin.private-resources.* prefixes, the blueprint updater would fail silently and output an empty list [], never creating or updating resources. The issue had two causes:

  1. The label parser only looked for pangolin.proxy-resources.* and pangolin.client-resources.* prefixes
  2. An early-exit check only validated the canonical key names before the schema transformation could run

Solution

  • parseDockerContainers.ts: Extended label parsing to recognize and process pangolin.public-resources.* and pangolin.private-resources.* labels
  • applyNewtDockerBlueprint.ts: Updated early-exit validation to check all four resource type keys before returning
  • Existing ConfigSchema.transform() logic handles merging aliases into canonical keys (no changes needed)

Testing

  • TypeScript compilation successful (no type errors)
  • Static analysis passed (no linting errors)
  • Code flow verified through execution path tracing
  • Maintains backward compatibility with existing labels

Changes

+ Support pangolin.public-resources.* Docker labels (alias for proxy-resources)
+ Support pangolin.private-resources.* Docker labels (alias for client-resources)
+ Extended early-exit check to consider all four resource types

Expected Behavior (from issue)

Before:

Received blueprint: {"public-resources":{"testss-resource":{...}}}
Successfully updated proxy resources for org example: []

After:

Received blueprint: {"public-resources":{"testss-resource":{...}}}
Created resource 4
Successfully updated proxy resources for org example: [{"proxyResource":{...}}]
  • Aligns Docker label behavior with YAML blueprint behavior
  • Matches UI terminology (public vs private resources)
  • Leverages existing transformation logic in ConfigSchema
*Originally created by @djcrafts on 12/21/2025* ### Summary Fixes #2125 by adding support for `public-resources` and `private-resources` as aliases in Docker blueprint labels, matching the functionality already available in YAML blueprints. ### Problem When using Docker container labels with `pangolin.public-resources.*` or `pangolin.private-resources.*` prefixes, the blueprint updater would fail silently and output an empty list `[]`, never creating or updating resources. The issue had two causes: 1. The label parser only looked for `pangolin.proxy-resources.*` and `pangolin.client-resources.*` prefixes 2. An early-exit check only validated the canonical key names before the schema transformation could run ### Solution - **parseDockerContainers.ts**: Extended label parsing to recognize and process `pangolin.public-resources.*` and `pangolin.private-resources.*` labels - **applyNewtDockerBlueprint.ts**: Updated early-exit validation to check all four resource type keys before returning - Existing `ConfigSchema.transform()` logic handles merging aliases into canonical keys (no changes needed) ### Testing - ✅ TypeScript compilation successful (no type errors) - ✅ Static analysis passed (no linting errors) - ✅ Code flow verified through execution path tracing - ✅ Maintains backward compatibility with existing labels ### Changes ```diff + Support pangolin.public-resources.* Docker labels (alias for proxy-resources) + Support pangolin.private-resources.* Docker labels (alias for client-resources) + Extended early-exit check to consider all four resource types ``` ### Expected Behavior (from issue) **Before**: ``` Received blueprint: {"public-resources":{"testss-resource":{...}}} Successfully updated proxy resources for org example: [] ``` **After**: ``` Received blueprint: {"public-resources":{"testss-resource":{...}}} Created resource 4 Successfully updated proxy resources for org example: [{"proxyResource":{...}}] ``` ### Related - Aligns Docker label behavior with YAML blueprint behavior - Matches UI terminology (public vs private resources) - Leverages existing transformation logic in ConfigSchema
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#452