Skip to content

Commit

Permalink
refactor: remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
idoshamun committed Sep 14, 2022
1 parent 4922d7f commit 2f6e686
Showing 1 changed file with 0 additions and 116 deletions.
116 changes: 0 additions & 116 deletions .infra/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,118 +47,6 @@ const probe = {
initialDelaySeconds: 5,
};

// const deployKubernetesResources = (name: string, isPrimary: boolean, {
// provider,
// resourcePrefix = '',
// }: { provider?: ProviderResource; resourcePrefix?: string } = {}): void => {
// createKubernetesSecretFromRecord({
// data: envVars,
// resourceName: `${resourcePrefix}k8s-secret`,
// name,
// namespace,
// provider,
// });
// // Create K8S service account and assign it to a GCP service account
// const k8sServiceAccount = createK8sServiceAccountFromGCPServiceAccount(
// `${resourcePrefix}${name}-k8s-sa`,
// name,
// namespace,
// serviceAccount,
// provider
// );
// new gcp.serviceaccount.IAMBinding(`${resourcePrefix}${name}-k8s-iam-binding`, {
// role: 'roles/iam.workloadIdentityUser',
// serviceAccountId: serviceAccount.id,
// members: [k8sServiceAccountToIdentity(k8sServiceAccount)],
// });
//
// const deploymentDependsOn: Input<Resource>[] = [];
// if (isPrimary) {
// const migrationJob = createMigrationJob(
// `${name}-migration`,
// namespace,
// image,
// ['/main', 'migrate'],
// containerEnvVars,
// k8sServiceAccount,
// {provider, resourcePrefix},
// );
// deploymentDependsOn.push(migrationJob);
// }
//
// createAutoscaledApplication({
// resourcePrefix: `${resourcePrefix}bg-`,
// name: `${name}-bg`,
// namespace,
// version: imageTag,
// serviceAccount: k8sServiceAccount,
// containers: [
// {
// name: 'app',
// image,
// args: ['/main', 'background'],
// env: containerEnvVars,
// resources: {
// requests: bgLimits,
// limits: bgLimits,
// },
// },
// ],
// minReplicas: 1,
// maxReplicas: 4,
// metrics: [{
// external: {
// metric: {
// name: getPubSubUndeliveredMessagesMetric(),
// selector: {
// matchLabels: {
// [getFullSubscriptionLabel('app')]: name,
// },
// },
// },
// target: {
// type: 'Value',
// averageValue: '20',
// },
// },
// type: 'External',
// }],
// deploymentDependsOn,
// provider,
// });
//
// createAutoscaledExposedApplication({
// resourcePrefix,
// name,
// namespace: namespace,
// version: imageTag,
// serviceAccount: k8sServiceAccount,
// containers: [
// {
// name: 'app',
// image,
// ports: [{name: 'http', containerPort: 3000, protocol: 'TCP'}],
// readinessProbe: probe,
// livenessProbe: probe,
// env: [
// ...containerEnvVars,
// {name: 'PORT', value: '3000'},
// {name: 'ENV', value: 'PROD'},
// ],
// resources: {
// requests: apiLimits,
// limits: apiLimits,
// },
// lifecycle: gracefulTerminationHook(),
// },
// ],
// maxReplicas: 10,
// metrics: getMemoryAndCpuMetrics(),
// deploymentDependsOn,
// provider,
// });
// }

const jobs = createPubSubCronJobs(name, [{
name: 'delete-old-tags',
schedule: '6 10 * * 0',
Expand Down Expand Up @@ -201,10 +89,6 @@ new gcp.pubsub.Subscription(`${name}-sub-new-ad`, {
},
});

// const vpcNativeProvider = getVpcNativeCluster();
// deployKubernetesResources(name, true);
// deployKubernetesResources(name, false, {provider: vpcNativeProvider.provider, resourcePrefix: 'vpc-native-'});

deployApplicationSuite({
name,
namespace,
Expand Down

0 comments on commit 2f6e686

Please sign in to comment.