Documentation ¶
Overview ¶
kube defines interface for k8s object deployment API. The intent is to keep this interface as small as possible. This is work in progress and API may change.
Index ¶
- Constants
- func Cleanup(coders ...Coder) context.Context
- func Create(ctx context.Context, syncType SyncType, coders ...Coder) (context.Context, error)
- func Delete(ctx context.Context, syncType SyncType, coders ...Coder) (context.Context, error)
- func FanIn(ctxs ...context.Context) context.Context
- func GetDefaultClientSet() (*kubernetes.Clientset, error)
- func YAMLMarshal(obj interface{}) ([]byte, error)
- type Coder
- type Error
- type Kind
- type SyncType
Constants ¶
View Source
const ( DefaultNamespace = "default" NamedNamespace = "kube" )
Variables ¶
This section is empty.
Functions ¶
func GetDefaultClientSet ¶
func GetDefaultClientSet() (*kubernetes.Clientset, error)
GetDefaultClientSet returns k8s clientset based off of default config file
func YAMLMarshal ¶
Types ¶
type Coder ¶
type Coder interface { // Kind returns kind of the object Kind() Kind // SetConfig configures coder with provided config object // It returns type assertion error if the config object type // does not match the accepted type of interface implementor SetConfig(config configio.Config) error // GetConfig retrieves implementor's internal config object GetConfig() configio.Config //Context returns context of the object implementing this interface Context() context.Context // Error returns a channel on which internal errors are reported Error() <-chan error // Create deploys after receiving done signal from input context // It will output a context for downstream processes to use Create(ctx context.Context) context.Context // Delete deletes objects after receiving done signal from input context // It will output a context for downstream processes to use Delete(ctx context.Context) context.Context }
Coder defines an interface that is primarily to be implemented by kubernetes actions such as pv's, pvc's etc.
type Kind ¶
type Kind string
const ( KindOfSleep Kind = "sleep" // sleeper, a no op KindOfPod Kind = "pods" // pods KindOfPv Kind = "pv" // persistent volumes KindOfPvc Kind = "pvc" // persistent volume claims KindOfSvc Kind = "svc" // services KindOfJob Kind = "jobs" // jobs KindOfDs Kind = "ds" // daemon set KindOfNs Kind = "ns" // namespace KindOfSc Kind = "sc" // storage class KindOfDeployment Kind = "deployment" // deployment controller )
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
kube
|
|
cm
cm implements kube.Coder interface for configmap
|
cm implements kube.Coder interface for configmap |
deployment
pods implements kube.Coder interface for deployment of pods
|
pods implements kube.Coder interface for deployment of pods |
ds
ds implements kube.Coder interface for deployment of daemon set
|
ds implements kube.Coder interface for deployment of daemon set |
endpoints
pods implements kube.Coder interface for deployment of pods
|
pods implements kube.Coder interface for deployment of pods |
jobs
jobs implements kube.Coder interface for deployment of jobs
|
jobs implements kube.Coder interface for deployment of jobs |
net-policy
ns implements kube.Coder interface for deployment of namespaces
|
ns implements kube.Coder interface for deployment of namespaces |
nl
nl implements kube.Coder interface for nodelist
|
nl implements kube.Coder interface for nodelist |
ns
ns implements kube.Coder interface for deployment of namespaces
|
ns implements kube.Coder interface for deployment of namespaces |
pods
pods implements kube.Coder interface for deployment of pods
|
pods implements kube.Coder interface for deployment of pods |
pv
pv implements kube.Coder interface for deployment of persistent volumes
|
pv implements kube.Coder interface for deployment of persistent volumes |
pvc
pvc implements kube.Coder interface for deployment of persistent volume claims
|
pvc implements kube.Coder interface for deployment of persistent volume claims |
rbac
ds implements kube.Coder interface for deployment of daemon set
|
ds implements kube.Coder interface for deployment of daemon set |
sc
ds implements kube.Coder interface for deployment of daemon set
|
ds implements kube.Coder interface for deployment of daemon set |
statefulset
ds implements kube.Coder interface for deployment of daemon set
|
ds implements kube.Coder interface for deployment of daemon set |
svc
svc implements kube.Coder interface for deployment of services
|
svc implements kube.Coder interface for deployment of services |
opt
|
|
exec
exec implements kube.Coder interface for executing a shell command
|
exec implements kube.Coder interface for executing a shell command |
sleep
sleep implements kube.Coder interface for sleeping (this is a kube no op)
|
sleep implements kube.Coder interface for sleeping (this is a kube no op) |
Click to show internal directories.
Click to hide internal directories.