drone_kube

package module
v0.0.0-...-87cf9b2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2021 License: MIT Imports: 3 Imported by: 0

README

drone-kube

drone-kube is drone k8s continuous delivery plugin.

Usage

deliver one resource

...
- name: delivery
  image: gladmo/drone-kube:1
  settings:
    master_url: https://192.168.0.1:6443 # you k8s master url
    resource: deployment                 # what resource you want delivery
    namespace: default                   # delivery namespace
    name: nginx                          # resource name
    container_name: nginx                # need update image container_name, default: deploy.Spec.Template.Spec.Containers[0]
...

deliver multiple resources

...
- name: delivery
  image: gladmo/drone-kube:1
  settings:
    master_url: https://192.168.0.1:6443
    namespace: default
    multiple:
      - resource: deployment
        name: nginx
        container_name: nginx
      - resource: cronjob
        name: publish-github
        container_name: publish-github
...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DroneKube

type DroneKube struct {
	MasterURL string // k8s集群主节点地址

	UpdateConfig

	MultipleConfig string // 配置数组
}

func (DroneKube) ParseMultipleConfig

func (th DroneKube) ParseMultipleConfig() (uc []UpdateConfig, er error)

ParseMultipleConfig 使用默认配置解析配置数组

func (DroneKube) Print

func (th DroneKube) Print()

type UpdateConfig

type UpdateConfig struct {
	// deployment (deploy)
	// cronjob (cj)
	Resource string

	resources.UpdateInfo
}

func (UpdateConfig) Print

func (th UpdateConfig) Print()

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL