feat: Media | use single certificate for all services
This commit is contained in:
@@ -2,11 +2,7 @@ import { Construct } from "constructs";
|
||||
import { DeploymentV1 } from "@cdktf/provider-kubernetes/lib/deployment-v1";
|
||||
import { ServiceV1 } from "@cdktf/provider-kubernetes/lib/service-v1";
|
||||
|
||||
import {
|
||||
InternalIngressRoute,
|
||||
LonghornPvc,
|
||||
PrivateCertificate,
|
||||
} from "../../utils";
|
||||
import { InternalIngressRoute, LonghornPvc } from "../../utils";
|
||||
import {
|
||||
BaseMediaServiceOptions,
|
||||
getAamil3NodeSelector,
|
||||
@@ -20,6 +16,8 @@ type RadarrServerOptions = BaseMediaServiceOptions & {
|
||||
downloadsPvcName: string;
|
||||
/** Hostname for the ingress */
|
||||
host: string;
|
||||
/** Secret name for the TLS certificate */
|
||||
certificateSecretName: string;
|
||||
};
|
||||
|
||||
export class RadarrServer extends Construct {
|
||||
@@ -136,15 +134,6 @@ export class RadarrServer extends Construct {
|
||||
},
|
||||
});
|
||||
|
||||
new PrivateCertificate(this, "certificate", {
|
||||
provider,
|
||||
namespace,
|
||||
name,
|
||||
commonName: host,
|
||||
dnsNames: [host],
|
||||
secretName: `${name}-tls`,
|
||||
});
|
||||
|
||||
// Ingress
|
||||
new InternalIngressRoute(this, "ingress", {
|
||||
provider,
|
||||
@@ -153,7 +142,7 @@ export class RadarrServer extends Construct {
|
||||
host,
|
||||
serviceName: name,
|
||||
servicePort: 80,
|
||||
tlsSecretName: `${name}-tls`,
|
||||
tlsSecretName: options.certificateSecretName,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user