@crossdelta/infrastructure 0.12.0 → 0.12.2
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/dist/index.cjs +3 -7
- package/dist/index.js +3 -7
- package/dist/runtimes/doks/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1170,11 +1170,8 @@ var generateHandleBlock = (handle, level, basicAuth) => {
|
|
|
1170
1170
|
${inner}
|
|
1171
1171
|
}`, level);
|
|
1172
1172
|
};
|
|
1173
|
-
var generateRouteBlock = (route, encode
|
|
1173
|
+
var generateRouteBlock = (route, encode) => {
|
|
1174
1174
|
const body = [];
|
|
1175
|
-
if (useOnDemandTls) {
|
|
1176
|
-
body.push(" tls {", " on_demand", " }");
|
|
1177
|
-
}
|
|
1178
1175
|
if (!route.redirect && encode?.length) {
|
|
1179
1176
|
body.push(` encode ${encode.join(" ")}`);
|
|
1180
1177
|
}
|
|
@@ -1233,10 +1230,9 @@ var generateCaddyfile = (config) => {
|
|
|
1233
1230
|
const healthCheckBlock = `:${healthCheck.port} {
|
|
1234
1231
|
respond ${healthCheck.path} 200
|
|
1235
1232
|
}`;
|
|
1236
|
-
const useOnDemandTls = config.onDemandTls != null;
|
|
1237
1233
|
const blocks = [
|
|
1238
1234
|
generateGlobalBlock(config),
|
|
1239
|
-
...config.routes.map((route) => generateRouteBlock(route, config.encode
|
|
1235
|
+
...config.routes.map((route) => generateRouteBlock(route, config.encode)),
|
|
1240
1236
|
healthCheckBlock,
|
|
1241
1237
|
...config.catchAllUpstream && config.onDemandTls ? [generateCatchAllBlock(config.catchAllUpstream, config.encode)] : []
|
|
1242
1238
|
];
|
|
@@ -1325,7 +1321,7 @@ var deployCaddy = (provider, namespace, config) => {
|
|
|
1325
1321
|
namespace,
|
|
1326
1322
|
labels,
|
|
1327
1323
|
annotations: {
|
|
1328
|
-
"service.beta.kubernetes.io/do-loadbalancer-tls-passthrough": "true",
|
|
1324
|
+
...config.tlsPassthrough && { "service.beta.kubernetes.io/do-loadbalancer-tls-passthrough": "true" },
|
|
1329
1325
|
"service.beta.kubernetes.io/do-loadbalancer-healthcheck-path": healthCheck.path,
|
|
1330
1326
|
"service.beta.kubernetes.io/do-loadbalancer-healthcheck-protocol": "http",
|
|
1331
1327
|
"service.beta.kubernetes.io/do-loadbalancer-healthcheck-port": String(healthCheck.port),
|
package/dist/index.js
CHANGED
|
@@ -1074,11 +1074,8 @@ var generateHandleBlock = (handle, level, basicAuth) => {
|
|
|
1074
1074
|
${inner}
|
|
1075
1075
|
}`, level);
|
|
1076
1076
|
};
|
|
1077
|
-
var generateRouteBlock = (route, encode
|
|
1077
|
+
var generateRouteBlock = (route, encode) => {
|
|
1078
1078
|
const body = [];
|
|
1079
|
-
if (useOnDemandTls) {
|
|
1080
|
-
body.push(" tls {", " on_demand", " }");
|
|
1081
|
-
}
|
|
1082
1079
|
if (!route.redirect && encode?.length) {
|
|
1083
1080
|
body.push(` encode ${encode.join(" ")}`);
|
|
1084
1081
|
}
|
|
@@ -1137,10 +1134,9 @@ var generateCaddyfile = (config) => {
|
|
|
1137
1134
|
const healthCheckBlock = `:${healthCheck.port} {
|
|
1138
1135
|
respond ${healthCheck.path} 200
|
|
1139
1136
|
}`;
|
|
1140
|
-
const useOnDemandTls = config.onDemandTls != null;
|
|
1141
1137
|
const blocks = [
|
|
1142
1138
|
generateGlobalBlock(config),
|
|
1143
|
-
...config.routes.map((route) => generateRouteBlock(route, config.encode
|
|
1139
|
+
...config.routes.map((route) => generateRouteBlock(route, config.encode)),
|
|
1144
1140
|
healthCheckBlock,
|
|
1145
1141
|
...config.catchAllUpstream && config.onDemandTls ? [generateCatchAllBlock(config.catchAllUpstream, config.encode)] : []
|
|
1146
1142
|
];
|
|
@@ -1229,7 +1225,7 @@ var deployCaddy = (provider, namespace, config) => {
|
|
|
1229
1225
|
namespace,
|
|
1230
1226
|
labels,
|
|
1231
1227
|
annotations: {
|
|
1232
|
-
"service.beta.kubernetes.io/do-loadbalancer-tls-passthrough": "true",
|
|
1228
|
+
...config.tlsPassthrough && { "service.beta.kubernetes.io/do-loadbalancer-tls-passthrough": "true" },
|
|
1233
1229
|
"service.beta.kubernetes.io/do-loadbalancer-healthcheck-path": healthCheck.path,
|
|
1234
1230
|
"service.beta.kubernetes.io/do-loadbalancer-healthcheck-protocol": "http",
|
|
1235
1231
|
"service.beta.kubernetes.io/do-loadbalancer-healthcheck-port": String(healthCheck.port),
|
|
@@ -461,6 +461,8 @@ export interface CaddyConfig {
|
|
|
461
461
|
};
|
|
462
462
|
/** Response encoding (e.g., ['zstd', 'gzip']). Omit to disable. */
|
|
463
463
|
encode?: string[];
|
|
464
|
+
/** Pass raw TLS to the backend without LB termination. Only needed when the LB itself manages HTTPS. Defaults to false. */
|
|
465
|
+
tlsPassthrough?: boolean;
|
|
464
466
|
}
|
|
465
467
|
export interface CaddyResult {
|
|
466
468
|
/** The Kubernetes Deployment */
|