Giter Site home page Giter Site logo

kube-tpl-manager's Introduction

Kube TPL Manager

Environment configs to optimize your K8s CI/CD workflow

Prerequisites node 8+ kubectl cli

Getting Started

npm install -g kube-tpl-manager

deployment.yml

---
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata:
  name: "[DEPLOYMENT_NAME]"
  annotations:
    kubernetes.io/change-cause: "[ROLLOUT_NOTE]"
  namespace: "[NAMESPACE]"
spec:
  progressDeadlineSeconds: 120
  replicas: 1
  template:
    metadata:
      labels:
        name: "[DEPLOYMENT_LABEL]"
    spec:
      containers:
        - image: "[DOCKER_IMAGE]"
          name: "[DEPLOYMENT_NAME]"
          env:
            -
              name: "NODE_ENV"
              value: "[NODE_ENV]"
          resources:
            requests:
              cpu: [REQUEST_CPU]
          ports:
            - containerPort: 3000

config.yml

---
defaults:
  name: my-application
  cluster: sites-cluster
  zone: us-central1-a
  replace:
    "[ROLLOUT_NOTE]": ["$CI_COMMITTER", "(", "$CI_COMMIT", "): ", "$CI_COMMIT_MESSAGE"]
    "[DEPLOYMENT_NAME]": ["%name"]
    "[DEPLOYMENT_LABEL]": ["%name"]
    "[NAMESPACE]": ["%namespace"]
    "[DOCKER_IMAGE]": ["repo/image:", "$CI_BRANCH", ".", "$CI_TIMESTAMP"]
    "[REQUEST_CPU]": "100m"
  status:
    - deployment/my-application
branches:
  "stage":
    - namespace: stage
      configs: ["deployment.yml"]
      replace:
        "[NODE_ENV]": "stage"
#ktm [path to kube yml] [path to config yml] [options]
ktm deployment.yml config.yml -b stage -k service_account.json
ktm -H # for manual

More docs coming soon...

kube-tpl-manager's People

Contributors

ericuldall avatar

Watchers

James Cloos avatar  avatar

Forkers

isabella232

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.