@crossdelta/infrastructure 0.2.20 → 0.2.21
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 +11 -2
- package/dist/index.js +11 -2
- package/dist/runtimes/doks/types.d.ts +12 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -338028,6 +338028,15 @@ function deployK8sService(provider, namespace, config2) {
|
|
|
338028
338028
|
if (config2.ingress.tls?.enabled) {
|
|
338029
338029
|
ingressAnnotations["cert-manager.io/cluster-issuer"] = config2.ingress.tls.issuerName ?? "letsencrypt-production";
|
|
338030
338030
|
}
|
|
338031
|
+
let ingressPath = config2.ingress.path;
|
|
338032
|
+
let ingressPathType = config2.ingress.pathType ?? "Prefix";
|
|
338033
|
+
const shouldStripPrefix = config2.ingress.path !== "/" && !config2.ingress.keepPrefix;
|
|
338034
|
+
if (shouldStripPrefix) {
|
|
338035
|
+
ingressPath = `${config2.ingress.path}(/|$)(.*)`;
|
|
338036
|
+
ingressPathType = "ImplementationSpecific";
|
|
338037
|
+
ingressAnnotations["nginx.ingress.kubernetes.io/use-regex"] = "true";
|
|
338038
|
+
ingressAnnotations["nginx.ingress.kubernetes.io/rewrite-target"] = "/$2";
|
|
338039
|
+
}
|
|
338031
338040
|
const tlsSecretName = config2.ingress.tls?.secretName ?? `${config2.name}-tls`;
|
|
338032
338041
|
const ingressRules = [];
|
|
338033
338042
|
const createRule = (host) => ({
|
|
@@ -338035,8 +338044,8 @@ function deployK8sService(provider, namespace, config2) {
|
|
|
338035
338044
|
http: {
|
|
338036
338045
|
paths: [
|
|
338037
338046
|
{
|
|
338038
|
-
path:
|
|
338039
|
-
pathType:
|
|
338047
|
+
path: ingressPath,
|
|
338048
|
+
pathType: ingressPathType,
|
|
338040
338049
|
backend: {
|
|
338041
338050
|
service: {
|
|
338042
338051
|
name: config2.name,
|
package/dist/index.js
CHANGED
|
@@ -337953,6 +337953,15 @@ function deployK8sService(provider, namespace, config2) {
|
|
|
337953
337953
|
if (config2.ingress.tls?.enabled) {
|
|
337954
337954
|
ingressAnnotations["cert-manager.io/cluster-issuer"] = config2.ingress.tls.issuerName ?? "letsencrypt-production";
|
|
337955
337955
|
}
|
|
337956
|
+
let ingressPath = config2.ingress.path;
|
|
337957
|
+
let ingressPathType = config2.ingress.pathType ?? "Prefix";
|
|
337958
|
+
const shouldStripPrefix = config2.ingress.path !== "/" && !config2.ingress.keepPrefix;
|
|
337959
|
+
if (shouldStripPrefix) {
|
|
337960
|
+
ingressPath = `${config2.ingress.path}(/|$)(.*)`;
|
|
337961
|
+
ingressPathType = "ImplementationSpecific";
|
|
337962
|
+
ingressAnnotations["nginx.ingress.kubernetes.io/use-regex"] = "true";
|
|
337963
|
+
ingressAnnotations["nginx.ingress.kubernetes.io/rewrite-target"] = "/$2";
|
|
337964
|
+
}
|
|
337956
337965
|
const tlsSecretName = config2.ingress.tls?.secretName ?? `${config2.name}-tls`;
|
|
337957
337966
|
const ingressRules = [];
|
|
337958
337967
|
const createRule = (host) => ({
|
|
@@ -337960,8 +337969,8 @@ function deployK8sService(provider, namespace, config2) {
|
|
|
337960
337969
|
http: {
|
|
337961
337970
|
paths: [
|
|
337962
337971
|
{
|
|
337963
|
-
path:
|
|
337964
|
-
pathType:
|
|
337972
|
+
path: ingressPath,
|
|
337973
|
+
pathType: ingressPathType,
|
|
337965
337974
|
backend: {
|
|
337966
337975
|
service: {
|
|
337967
337976
|
name: config2.name,
|
|
@@ -116,8 +116,18 @@ export interface K8sHealthCheck {
|
|
|
116
116
|
export interface K8sIngressConfig {
|
|
117
117
|
/** Path prefix for routing (e.g., '/', '/api') */
|
|
118
118
|
path: string;
|
|
119
|
-
/** Path type: 'Prefix' (default) or '
|
|
120
|
-
pathType?: 'Prefix' | 'Exact';
|
|
119
|
+
/** Path type: 'Prefix' (default), 'Exact', or 'ImplementationSpecific' (for regex) */
|
|
120
|
+
pathType?: 'Prefix' | 'Exact' | 'ImplementationSpecific';
|
|
121
|
+
/**
|
|
122
|
+
* Keep the path prefix when forwarding to the service (default: false).
|
|
123
|
+
*
|
|
124
|
+
* By default, the path prefix is stripped:
|
|
125
|
+
* path='/api': /api/health -> /health
|
|
126
|
+
*
|
|
127
|
+
* With keepPrefix=true:
|
|
128
|
+
* path='/api': /api/health -> /api/health
|
|
129
|
+
*/
|
|
130
|
+
keepPrefix?: boolean;
|
|
121
131
|
/** Custom annotations for the ingress */
|
|
122
132
|
annotations?: Record<string, string>;
|
|
123
133
|
/** Hostname for the ingress (required for TLS) */
|