@kumori/aurora-backend-handler 1.0.98 → 1.0.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/deploy-service-helper.ts +34 -9
- package/package.json +1 -1
|
@@ -646,9 +646,6 @@ export async function generateServiceSpec(
|
|
|
646
646
|
config: {
|
|
647
647
|
parameters: [
|
|
648
648
|
{ name: "type", value: "https", type: "string" },
|
|
649
|
-
...(channel.withMtls && channel.caResource
|
|
650
|
-
? [{ name: "mtls", value: "true", type: "bool" as const }]
|
|
651
|
-
: []),
|
|
652
649
|
// { name: "websocket", value: "true", type: "bool", configParam: "websocket" },
|
|
653
650
|
],
|
|
654
651
|
resources: [
|
|
@@ -670,7 +667,7 @@ export async function generateServiceSpec(
|
|
|
670
667
|
? [
|
|
671
668
|
{
|
|
672
669
|
ca: {
|
|
673
|
-
name: "
|
|
670
|
+
name: "clientcertca",
|
|
674
671
|
configResource: `${channel.channelName}_ca`,
|
|
675
672
|
},
|
|
676
673
|
},
|
|
@@ -892,7 +889,11 @@ export async function generateServiceSpec(
|
|
|
892
889
|
resource: withDefaultValue(channel.domain, ""),
|
|
893
890
|
},
|
|
894
891
|
}));
|
|
895
|
-
|
|
892
|
+
|
|
893
|
+
const hasDefaultCertChannelDeployment = form.channels.some(
|
|
894
|
+
(ch) => ch.protocol === "HTTPS" && ch.isPublic && !ch.certificateResource
|
|
895
|
+
);
|
|
896
|
+
if (hasDefaultCertChannelDeployment) {
|
|
896
897
|
deploymentConfigDomain.push({
|
|
897
898
|
certificate: {
|
|
898
899
|
name: "main_inbound_servercert",
|
|
@@ -900,6 +901,29 @@ export async function generateServiceSpec(
|
|
|
900
901
|
},
|
|
901
902
|
});
|
|
902
903
|
}
|
|
904
|
+
|
|
905
|
+
const customCertDeploymentResources: DeploymentResource[] = form.channels
|
|
906
|
+
.filter(
|
|
907
|
+
(ch) => ch.protocol === "HTTPS" && ch.isPublic && ch.certificateResource
|
|
908
|
+
)
|
|
909
|
+
.map((ch) => ({
|
|
910
|
+
certificate: {
|
|
911
|
+
name: `${ch.channelName}_cert`,
|
|
912
|
+
resource: ch.certificateResource!,
|
|
913
|
+
},
|
|
914
|
+
}));
|
|
915
|
+
|
|
916
|
+
const customCaDeploymentResources: DeploymentResource[] = form.channels
|
|
917
|
+
.filter(
|
|
918
|
+
(ch) =>
|
|
919
|
+
ch.protocol === "HTTPS" && ch.isPublic && ch.withMtls && ch.caResource
|
|
920
|
+
)
|
|
921
|
+
.map((ch) => ({
|
|
922
|
+
ca: {
|
|
923
|
+
name: `${ch.channelName}_ca`,
|
|
924
|
+
resource: ch.caResource!,
|
|
925
|
+
},
|
|
926
|
+
}));
|
|
903
927
|
const deploymentConfigPort: DeploymentResource[] = form.channels
|
|
904
928
|
.filter((channel) => channel.protocol === "TCP" && channel.isPublic)
|
|
905
929
|
.map((channel) => ({
|
|
@@ -1077,6 +1101,8 @@ export async function generateServiceSpec(
|
|
|
1077
1101
|
parameters: [...deploymentConfigParameters],
|
|
1078
1102
|
resources: [
|
|
1079
1103
|
...deploymentConfigDomain,
|
|
1104
|
+
...customCertDeploymentResources,
|
|
1105
|
+
...customCaDeploymentResources,
|
|
1080
1106
|
...deploymentConfigPort,
|
|
1081
1107
|
...deploymentConfigResources,
|
|
1082
1108
|
],
|
|
@@ -1241,9 +1267,6 @@ async function generateServiceSpecDSL(
|
|
|
1241
1267
|
config: {
|
|
1242
1268
|
parameters: [
|
|
1243
1269
|
{ name: "type", value: "https", type: "string" as const },
|
|
1244
|
-
...(channel.withMtls && channel.caResource
|
|
1245
|
-
? [{ name: "mtls", value: "true", type: "bool" as const }]
|
|
1246
|
-
: []),
|
|
1247
1270
|
],
|
|
1248
1271
|
resources: [
|
|
1249
1272
|
{
|
|
@@ -1264,7 +1287,7 @@ async function generateServiceSpecDSL(
|
|
|
1264
1287
|
? [
|
|
1265
1288
|
{
|
|
1266
1289
|
ca: {
|
|
1267
|
-
name: "
|
|
1290
|
+
name: "clientcertca",
|
|
1268
1291
|
configResource: `${channel.channelName}_ca`,
|
|
1269
1292
|
},
|
|
1270
1293
|
},
|
|
@@ -1600,6 +1623,8 @@ async function generateServiceSpecDSL(
|
|
|
1600
1623
|
parameters: [...deploymentConfigParameters],
|
|
1601
1624
|
resources: [
|
|
1602
1625
|
...deploymentConfigDomain,
|
|
1626
|
+
...customCertDeploymentResources,
|
|
1627
|
+
...customCaDeploymentResources,
|
|
1603
1628
|
...deploymentConfigPort,
|
|
1604
1629
|
...deploymentConfigResources,
|
|
1605
1630
|
],
|