Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test("should set component path", () => {
expect(env.paths.component).toEqual(config.paths!.environment!.component);
});
test("should set global path", () => {
expect(env.paths.global).toEqual(config.paths!.environment!.global);
});
test("should set cwd", () => {
expect(env.cwd).toEqual(tmpDir.path);
});
test("should not set env", () => {
expect(env.env).toBeUndefined();
});
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
"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: {
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: {