Browse Source

Replace cluster options variable

Anuj Bansal 3 years ago
parent
commit
662f75c945
1 changed files with 6 additions and 10 deletions
  1. 6 10
      devops/infrastructure/storage-node/index.ts

+ 6 - 10
devops/infrastructure/storage-node/index.ts

@@ -45,11 +45,11 @@ export const colossusImage = repo.buildAndPushImage({
   context: '../../../',
 })
 
-// Create a Kubernetes Namespace
-const ns = new k8s.core.v1.Namespace(name, {}, { provider: cluster.provider })
-
 const resourceOptions = { provider: cluster.provider }
 
+// Create a Kubernetes Namespace
+const ns = new k8s.core.v1.Namespace(name, {}, resourceOptions)
+
 // Export the Namespace name
 export const namespaceName = ns.metadata.name
 
@@ -72,7 +72,7 @@ const pvc = new k8s.core.v1.PersistentVolumeClaim(
       },
     },
   },
-  { provider: cluster.provider }
+  resourceOptions
 )
 
 volumes.push({
@@ -209,9 +209,7 @@ const deployment = new k8s.apps.v1.Deployment(
       },
     },
   },
-  {
-    provider: cluster.provider,
-  }
+  resourceOptions
 )
 
 // Create a LoadBalancer Service for the Deployment
@@ -228,9 +226,7 @@ const service = new k8s.core.v1.Service(
       selector: appLabels,
     },
   },
-  {
-    provider: cluster.provider,
-  }
+  resourceOptions
 )
 
 // Export the Service name