Sign inSign up

simcu/k8s-deploy

By simcu

•Updated over 6 years ago

A simple way to deploy web or tcp application with drone ci

Image
0

2.4K

simcu/k8s-deploy repository overview

⁠Kubernetes Deploy for DroneCI

A simple way to deploy web or tcp application with drone ci.

You can use it with other ci yet~~

⁠Enviroment Description
NameDefaultValueDescription
PLUGIN_NAMESPACEDRONE_REPO_NAMESPACEk8s namespace, if not exists, will create
PLUGIN_NAMEDRONE_REPO without DRONE_REPO_NAMESPACEdeployname attr
PLUGIN_ENVIRONMENT-deployname attr
PLUGIN_IMAGE-the deploy image
PLUGIN_CPUunlimitedk8s limit cpu
PLUGIN_MEMunlimitedk8s limit memory
PLUGIN_RSVPfalseif set true,will add resource request to deployment with limit cpu/memory
PLUGIN_PORT0deployment port , if set to <=0, will not create service
PLUGIN_SERVICE_TYPEClusterIPservice type, supported values: "ClusterIP", "ExternalName", "LoadBalancer", "NodePort"
PLUGIN_URL-if set , will create ingress with the url, not include http/https e.g. test.simcu.com
PLUGIN_ACMEfalseneed cert-manager, will use https to serve url. not support Wildcard Domain
PLUGIN_K8S_URL-k8s api server url
PLUGIN_K8S_TOKEN-k8s service account
PLUGIN_REGISTRY_SECRETsimcumust create a secret for pull image
⁠Drone CI Usage:
kind: pipeline
name: default
steps:
  - name: notify
    image: simcu/k8s-deploy
    settings:
      namespace: deploytest
      name: test
      environment: staging
      image: nginx:alpine
      cpu: 1000m
      mem: 1024Mi
      rsvp: false
      port: 80
      url: test.simcu.com
      acme: true
      k8s_url: https://xx.xx.xx.xx:8443/
      k8s_token: abcdefghijklmn12345678
      registry_secret: simcu

If you want to use it as simple docker container, only set -e with the Enviroment. e.g.

docker run -d --rm -e PLUGIN_NAMESPACE=test -e ..... simcu/k8s-deploy

Tag summary

Content type

Image

Digest

Size

73.9 MB

Last updated

over 6 years ago

docker pull simcu/k8s-deploy