How to use @kosko/env - 7 common examples

To help you get started, we’ve selected a few @kosko/env examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tommy351 / kosko / packages / cli / src / commands / __tests__ / generate.ts View on Github external
test("should set component path", () => {
      expect(env.paths.component).toEqual(config.paths!.environment!.component);
    });
github tommy351 / kosko / packages / cli / src / commands / __tests__ / generate.ts View on Github external
test("should set global path", () => {
      expect(env.paths.global).toEqual(config.paths!.environment!.global);
    });
github tommy351 / kosko / packages / cli / src / commands / __tests__ / generate.ts View on Github external
test("should set cwd", () => {
      expect(env.cwd).toEqual(tmpDir.path);
    });
github tommy351 / kosko / packages / cli / src / commands / __tests__ / generate.ts View on Github external
test("should not set env", () => {
    expect(env.env).toBeUndefined();
  });
github tommy351 / kosko / integration / kosko-generate / without-require / components / nginx.js View on Github external
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
github tommy351 / kosko / examples / alternative-folder-structure / components / nginx / index.js View on Github external
"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: {
github tommy351 / kosko / examples / typescript / components / nginx.ts View on Github external
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: {

@kosko/env

Manage environemnts in kosko.

MIT
Latest version published 13 days ago

Package Health Score

75 / 100
Full package analysis