[PR #2132] [MERGED] Fix: Support public-resources and private-resources in Docker blueprint labels #26421

Closed
opened 2026-06-08 19:54:55 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/pangolin/pull/2132
Author: @djcrafts
Created: 12/21/2025
Status: Merged
Merged: 12/21/2025
Merged by: @oschwartz10612

Base: mainHead: fix/blueprint-public-private-resources


📝 Commits (1)

  • 736f249 Fix: Support public-resources and private-resources in Docker blueprint labels

📊 Changes

2 files changed (+37 additions, -3 deletions)

View changed files

📝 server/lib/blueprints/applyNewtDockerBlueprint.ts (+3 -1)
📝 server/lib/blueprints/parseDockerContainers.ts (+34 -2)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fosrl/pangolin/pull/2132 **Author:** [@djcrafts](https://github.com/djcrafts) **Created:** 12/21/2025 **Status:** ✅ Merged **Merged:** 12/21/2025 **Merged by:** [@oschwartz10612](https://github.com/oschwartz10612) **Base:** `main` ← **Head:** `fix/blueprint-public-private-resources` --- ### 📝 Commits (1) - [`736f249`](https://github.com/fosrl/pangolin/commit/736f2491f4aa4fd1488e3959cd0dcbbbf460067c) Fix: Support public-resources and private-resources in Docker blueprint labels ### 📊 Changes **2 files changed** (+37 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `server/lib/blueprints/applyNewtDockerBlueprint.ts` (+3 -1) 📝 `server/lib/blueprints/parseDockerContainers.ts` (+34 -2) </details> ### 📄 Description ### 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-08 19:54:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#26421