Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createPod(environment = 'production') {
return new Pod({
metadata: {
name: 'test-pod',
},
spec: {
containers: [
new Container({
name: 'test-container',
image: 'nginx',
env: [{ name: 'ENV', value: environment }],
}),
],
},
})
}
const { Pod } = require("kubernetes-models/v1");
module.exports = new Pod({
metadata: {
name: "foo"
},
spec: {}
});
const { Pod } = require("kubernetes-models/v1");
module.exports = new Pod({
metadata: {
name: "foo"
},
spec: {}
});
function createPod(environment = 'production') {
return new Pod({
metadata: {
name: 'test-pod',
},
spec: {
containers: [
new Container({
name: 'test-container',
image: 'nginx',
env: [{ name: 'ENV', value: environment }],
}),
],
},
})
}
const { Pod } = require("kubernetes-models/v1");
module.exports = new Pod({
metadata: {
name: "foo"
},
spec: {
containers: []
}
});
import { Deployment } from "kubernetes-models/apps/v1";
import { Service } from "kubernetes-models/v1";
import env from "@kosko/env";
const params = env.component("nginx");
const metadata = { name: "nginx" };
const labels = { app: "nginx" };
const deployment = new Deployment({
metadata,
spec: {
replicas: params.replicas,
selector: {
matchLabels: labels
},
template: {
metadata: {
labels
},
spec: {
containers: [
{
image: params.imageRegistry + "nginx",
name: "nginx",
ports: [{ containerPort: 80 }]
const { Deployment } = require("kubernetes-models/apps/v1");
const { Service } = require("kubernetes-models/v1");
const params = require("@kosko/env").component("nginx");
const labels = { app: "nginx" };
const deployment = new Deployment({
metadata: {
name: "nginx",
...params.metadata
},
spec: {
replicas: params.replicas,
selector: {
matchLabels: labels
},
template: {
metadata: {
labels
},
spec: {
containers: [
{
import { Deployment } from "kubernetes-models/apps/v1";
import { Service } from "kubernetes-models/v1";
const labels = { app: "nginx" };
const deployment = new Deployment({
metadata: {
name: "nginx"
},
spec: {
replicas: 1,
selector: {
matchLabels: labels
},
template: {
metadata: {
labels
},
spec: {
containers: [
{
name: "nginx",
"use strict";
const { Deployment } = require("kubernetes-models/apps/v1");
const { Service } = require("kubernetes-models/v1");
const env = require("@kosko/env").component("nginx");
const metadata = { name: "nginx" };
const labels = { app: "nginx" };
const deployment = new Deployment({
metadata,
spec: {
replicas: env.replicas,
selector: {
matchLabels: labels
},
template: {
metadata: {
labels
},
spec: {
containers: [
{
image: `${env.imageRegistry}/nginx:${env.imageTag}`,
name: "nginx",
ports: [
import { Deployment } from "kubernetes-models/apps/v1";
import { Service } from "kubernetes-models/v1";
const metadata = { name: "nginx" };
const labels = { app: "nginx" };
const deployment = new Deployment({
metadata,
spec: {
replicas: 1,
selector: {
matchLabels: labels
},
template: {
metadata: {
labels
},
spec: {
containers: [
{
image: "nginx",
name: "nginx",
ports: [