fix: Traefik | remove custom tls option
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
|||||||
RateLimitMiddleware,
|
RateLimitMiddleware,
|
||||||
IpAllowListMiddleware,
|
IpAllowListMiddleware,
|
||||||
IpAllowListMiddlewareTCP,
|
IpAllowListMiddlewareTCP,
|
||||||
TLSOptions,
|
|
||||||
} from "./traefik";
|
} from "./traefik";
|
||||||
import { ValkeyCluster } from "./valkey";
|
import { ValkeyCluster } from "./valkey";
|
||||||
import { InternalIngressRoute, PrivateCertificate } from "../utils";
|
import { InternalIngressRoute, PrivateCertificate } from "../utils";
|
||||||
@@ -68,11 +67,6 @@ export class NetworkSecurity extends TerraformStack {
|
|||||||
name: "rate-limit",
|
name: "rate-limit",
|
||||||
});
|
});
|
||||||
|
|
||||||
new TLSOptions(this, "tls-options", {
|
|
||||||
provider: kubernetes,
|
|
||||||
namespace,
|
|
||||||
});
|
|
||||||
|
|
||||||
new IpAllowListMiddleware(this, "internal-ip-allow-list", {
|
new IpAllowListMiddleware(this, "internal-ip-allow-list", {
|
||||||
provider: kubernetes,
|
provider: kubernetes,
|
||||||
namespace,
|
namespace,
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
export { RateLimitMiddleware } from "./rateLimit";
|
export { RateLimitMiddleware } from "./rateLimit";
|
||||||
export { IpAllowListMiddleware, IpAllowListMiddlewareTCP } from "./ipAllowList";
|
export { IpAllowListMiddleware, IpAllowListMiddlewareTCP } from "./ipAllowList";
|
||||||
export { TLSOptions } from "./tlsOpts";
|
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
import { Construct } from "constructs";
|
|
||||||
import { Manifest } from "@cdktf/provider-kubernetes/lib/manifest";
|
|
||||||
import { KubernetesProvider } from "@cdktf/provider-kubernetes/lib/provider";
|
|
||||||
|
|
||||||
export class TLSOptions extends Construct {
|
|
||||||
constructor(
|
|
||||||
scope: Construct,
|
|
||||||
id: string,
|
|
||||||
opts: { provider: KubernetesProvider; namespace: string },
|
|
||||||
) {
|
|
||||||
super(scope, id);
|
|
||||||
|
|
||||||
const { provider, namespace } = opts;
|
|
||||||
|
|
||||||
new Manifest(this, "traefik-tls-options", {
|
|
||||||
provider,
|
|
||||||
manifest: {
|
|
||||||
apiVersion: "traefik.io/v1alpha1",
|
|
||||||
kind: "TLSOption",
|
|
||||||
metadata: {
|
|
||||||
namespace,
|
|
||||||
name: "tls-options",
|
|
||||||
},
|
|
||||||
spec: {
|
|
||||||
minVersion: "VersionTLS13",
|
|
||||||
sniStrict: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -110,10 +110,6 @@ export class IngressRoute extends Construct {
|
|||||||
if (opts.tlsSecretName) {
|
if (opts.tlsSecretName) {
|
||||||
spec.tls = {
|
spec.tls = {
|
||||||
secretName: opts.tlsSecretName,
|
secretName: opts.tlsSecretName,
|
||||||
options: {
|
|
||||||
name: "tls-options",
|
|
||||||
namespace: "homelab",
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user