mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-25 06:16:40 +00:00
Merge dev into fix/log-analytics-adjustments
This commit is contained in:
@@ -34,7 +34,10 @@ export async function applyNewtDockerBlueprint(
|
||||
return;
|
||||
}
|
||||
|
||||
if (isEmptyObject(blueprint["proxy-resources"]) && isEmptyObject(blueprint["client-resources"])) {
|
||||
if (
|
||||
isEmptyObject(blueprint["proxy-resources"]) &&
|
||||
isEmptyObject(blueprint["client-resources"])
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,12 +84,20 @@ export function processContainerLabels(containers: Container[]): {
|
||||
|
||||
// Process proxy resources
|
||||
if (Object.keys(proxyResourceLabels).length > 0) {
|
||||
processResourceLabels(proxyResourceLabels, container, result["proxy-resources"]);
|
||||
processResourceLabels(
|
||||
proxyResourceLabels,
|
||||
container,
|
||||
result["proxy-resources"]
|
||||
);
|
||||
}
|
||||
|
||||
// Process client resources
|
||||
if (Object.keys(clientResourceLabels).length > 0) {
|
||||
processResourceLabels(clientResourceLabels, container, result["client-resources"]);
|
||||
processResourceLabels(
|
||||
clientResourceLabels,
|
||||
container,
|
||||
result["client-resources"]
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -161,8 +169,7 @@ function processResourceLabels(
|
||||
const finalTarget = { ...target };
|
||||
if (!finalTarget.hostname) {
|
||||
finalTarget.hostname =
|
||||
container.name ||
|
||||
container.hostname;
|
||||
container.name || container.hostname;
|
||||
}
|
||||
if (!finalTarget.port) {
|
||||
const containerPort =
|
||||
|
||||
@@ -1086,10 +1086,8 @@ async function getDomainId(
|
||||
|
||||
// remove the base domain of the domain
|
||||
let subdomain = null;
|
||||
if (domainSelection.type == "ns" || domainSelection.type == "wildcard") {
|
||||
if (fullDomain != baseDomain) {
|
||||
subdomain = fullDomain.replace(`.${baseDomain}`, "");
|
||||
}
|
||||
if (fullDomain != baseDomain) {
|
||||
subdomain = fullDomain.replace(`.${baseDomain}`, "");
|
||||
}
|
||||
|
||||
// Return the first valid domain
|
||||
|
||||
@@ -312,7 +312,7 @@ export const ConfigSchema = z
|
||||
};
|
||||
delete (data as any)["public-resources"];
|
||||
}
|
||||
|
||||
|
||||
// Merge private-resources into client-resources
|
||||
if (data["private-resources"]) {
|
||||
data["client-resources"] = {
|
||||
@@ -321,10 +321,13 @@ export const ConfigSchema = z
|
||||
};
|
||||
delete (data as any)["private-resources"];
|
||||
}
|
||||
|
||||
|
||||
return data as {
|
||||
"proxy-resources": Record<string, z.infer<typeof ResourceSchema>>;
|
||||
"client-resources": Record<string, z.infer<typeof ClientResourceSchema>>;
|
||||
"client-resources": Record<
|
||||
string,
|
||||
z.infer<typeof ClientResourceSchema>
|
||||
>;
|
||||
sites: Record<string, z.infer<typeof SiteSchema>>;
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user