om-kubernetes-2.3.1.8: om-kubernetes
Safe HaskellNone
LanguageHaskell2010

OM.Kubernetes

Description

This module provides functions that access and operate on the Kubernetes API. It is designed to be used from pods running within the K8s cluster itself and it won't work otherwise.

Synopsis

Creating a handle

newK8s :: MonadIO m => m K8s Source #

Create a new K8s.

data K8s Source #

A handle on the kubernetes service.

Operations

listPods :: MonadIO m => K8s -> Namespace -> m [PodName] Source #

List the pods, returning a list of names.

postPod :: MonadIO m => K8s -> Namespace -> PodSpec -> m () Source #

Create a new pod.

deletePod :: MonadIO m => K8s -> Namespace -> PodName -> m () Source #

Delete a pod.

getPodSpec :: MonadIO m => K8s -> Namespace -> PodName -> m PodSpec Source #

Get the spec of a specific pod.

patchService :: MonadIO m => K8s -> Namespace -> ServiceName -> JsonPatch -> m () Source #

Patch a service.

getServiceSpec :: MonadIO m => K8s -> Namespace -> ServiceName -> m ServiceSpec Source #

Get the service spec.

postService :: MonadIO m => K8s -> Namespace -> ServiceSpec -> m () Source #

Post a new service.

postRoleBinding :: MonadIO m => K8s -> Namespace -> RoleBindingSpec -> m () Source #

Post a role binding.

postRole :: MonadIO m => K8s -> Namespace -> RoleSpec -> m () Source #

Post a Role.

postServiceAccount :: MonadIO m => K8s -> Namespace -> ServiceAccountSpec -> m () Source #

Post a service account.

postNamespace :: MonadIO m => K8s -> NamespaceSpec -> m () Source #

Post a Namespace.

getPodTemplate :: MonadIO m => K8s -> Namespace -> PodTemplateName -> m PodTemplateSpec Source #

Get the pod template.

queryPods :: MonadIO m => K8s -> Namespace -> [(Text, Text)] -> m [Pod] Source #

Query the pods, returning the full JSON for each.

Types

newtype JsonPatch Source #

Specify how to patch the pod template spec.

Constructors

JsonPatch 

Fields

newtype PodName Source #

The name of a pod.

Constructors

PodName 

Fields

Instances

Instances details
FromJSON PodName Source # 
Instance details

Defined in OM.Kubernetes

FromJSONKey PodName Source # 
Instance details

Defined in OM.Kubernetes

ToJSON PodName Source # 
Instance details

Defined in OM.Kubernetes

ToJSONKey PodName Source # 
Instance details

Defined in OM.Kubernetes

IsString PodName Source # 
Instance details

Defined in OM.Kubernetes

Methods

fromString :: String -> PodName #

Show PodName Source # 
Instance details

Defined in OM.Kubernetes

Eq PodName Source # 
Instance details

Defined in OM.Kubernetes

Methods

(==) :: PodName -> PodName -> Bool #

(/=) :: PodName -> PodName -> Bool #

Ord PodName Source # 
Instance details

Defined in OM.Kubernetes

FromHttpApiData PodName Source # 
Instance details

Defined in OM.Kubernetes

ToHttpApiData PodName Source # 
Instance details

Defined in OM.Kubernetes

newtype PodSpec Source #

A pod specification.

Constructors

PodSpec 

Fields

Instances

Instances details
FromJSON PodSpec Source # 
Instance details

Defined in OM.Kubernetes

ToJSON PodSpec Source # 
Instance details

Defined in OM.Kubernetes

newtype ServiceName Source #

The name of a service.

Constructors

ServiceName 

Fields

newtype ServiceSpec Source #

The specification of a service.

Constructors

ServiceSpec 

Fields

newtype RoleSpec Source #

The representation of a Role.

Constructors

RoleSpec 

Fields

newtype NamespaceSpec Source #

The representation of a Namespace specification.

Constructors

NamespaceSpec 

newtype Namespace Source #

A Kubernetes namespace.

Constructors

Namespace 

Fields

Instances

Instances details
FromJSON Namespace Source # 
Instance details

Defined in OM.Kubernetes

FromJSONKey Namespace Source # 
Instance details

Defined in OM.Kubernetes

ToJSON Namespace Source # 
Instance details

Defined in OM.Kubernetes

ToJSONKey Namespace Source # 
Instance details

Defined in OM.Kubernetes

IsString Namespace Source # 
Instance details

Defined in OM.Kubernetes

Show Namespace Source # 
Instance details

Defined in OM.Kubernetes

Eq Namespace Source # 
Instance details

Defined in OM.Kubernetes

Ord Namespace Source # 
Instance details

Defined in OM.Kubernetes

FromHttpApiData Namespace Source # 
Instance details

Defined in OM.Kubernetes

ToHttpApiData Namespace Source # 
Instance details

Defined in OM.Kubernetes

newtype PodTemplateName Source #

The name of a pod template.

Constructors

PodTemplateName 

Instances

Instances details
FromJSON PodTemplateName Source # 
Instance details

Defined in OM.Kubernetes

FromJSONKey PodTemplateName Source # 
Instance details

Defined in OM.Kubernetes

ToJSON PodTemplateName Source # 
Instance details

Defined in OM.Kubernetes

ToJSONKey PodTemplateName Source # 
Instance details

Defined in OM.Kubernetes

IsString PodTemplateName Source # 
Instance details

Defined in OM.Kubernetes

Show PodTemplateName Source # 
Instance details

Defined in OM.Kubernetes

Eq PodTemplateName Source # 
Instance details

Defined in OM.Kubernetes

Ord PodTemplateName Source # 
Instance details

Defined in OM.Kubernetes

FromHttpApiData PodTemplateName Source # 
Instance details

Defined in OM.Kubernetes

ToHttpApiData PodTemplateName Source # 
Instance details

Defined in OM.Kubernetes

newtype Pod Source #

Constructors

Pod 

Fields

Instances

Instances details
FromJSON Pod Source # 
Instance details

Defined in OM.Kubernetes

ToJSON Pod Source # 
Instance details

Defined in OM.Kubernetes

Show Pod Source # 
Instance details

Defined in OM.Kubernetes

Methods

showsPrec :: Int -> Pod -> ShowS #

show :: Pod -> String #

showList :: [Pod] -> ShowS #