mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
34 lines
766 B
TypeScript
34 lines
766 B
TypeScript
import * as k8s from '@pulumi/kubernetes';
|
|
import { ServiceDeployment } from '../utils/service-deployment';
|
|
|
|
export type Docs = ReturnType<typeof deployDocs>;
|
|
|
|
export function deployDocs({
|
|
release,
|
|
image,
|
|
rootDns,
|
|
imagePullSecret,
|
|
}: {
|
|
release: string;
|
|
image: string;
|
|
rootDns: string;
|
|
imagePullSecret: k8s.core.v1.Secret;
|
|
}) {
|
|
const deployment = new ServiceDeployment('docs', {
|
|
image,
|
|
imagePullSecret,
|
|
readinessProbe: '/api/health',
|
|
livenessProbe: '/api/health',
|
|
env: [
|
|
{ name: 'RELEASE', value: release },
|
|
{ name: 'DEPLOYED_DNS', value: rootDns },
|
|
{ name: 'NODE_ENV', value: 'production' },
|
|
],
|
|
port: 3000,
|
|
}).deploy();
|
|
|
|
return {
|
|
...deployment,
|
|
endpoint: `https://docs.${rootDns}/`,
|
|
};
|
|
}
|