k8s

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

README

k8s

import "github.com/deepthawtz/duncan/k8s"

Overview

Index

Package files

client.go deploy.go list.go

type KubeAPI

type KubeAPI struct {
    Client    kubernetes.Interface
    Namespace string
}

KubeAPI performs all the Kubernetes API operations

func NewClient
func NewClient() (*KubeAPI, error)

NewClient returns a new KubeAPI client

func (*KubeAPI) CurrentTag
func (k *KubeAPI) CurrentTag(app, env, repo string) (string, error)

CurrentTag fetches the currently deployed docker image tag for given app and env if it exists. First checks Kubernetes Deployment API and then Stateful Sets API

func (*KubeAPI) Deploy
func (k *KubeAPI) Deploy(app, env, tag, repo string) error

Deploy updates docker image tag for a given k8s deployment

func (*KubeAPI) List
func (k *KubeAPI) List(app, env string) error

List displays k8s pods matching given app/env


Generated by godoc2md

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeAPI

type KubeAPI struct {
	Client    kubernetes.Interface
	Namespace string
}

KubeAPI performs all the Kubernetes API operations

func NewClient

func NewClient() (*KubeAPI, error)

NewClient returns a new KubeAPI client

func (*KubeAPI) CurrentTag

func (k *KubeAPI) CurrentTag(app, env, repo string) (string, error)

CurrentTag fetches the currently deployed docker image tag for given app and env if it exists. First checks Kubernetes Deployment API and then Stateful Sets API

func (*KubeAPI) Deploy

func (k *KubeAPI) Deploy(app, env, tag, repo string) error

Deploy updates docker image tag for a given k8s deployment

func (*KubeAPI) List

func (k *KubeAPI) List(app, env string) error

List displays k8s pods matching given app/env

Jump to

Keyboard shortcuts

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