Documentation ¶
Index ¶
- type Cluster
- func (cluster *Cluster) ApplyEnvironment(currentEnvironment, newEnvironment *bitesize.Environment) error
- func (cluster *Cluster) ApplyIfChanged(newConfig *bitesize.Environment) error
- func (cluster *Cluster) ApplyService(service *bitesize.Service, gists *bitesize.Gists, namespace string) error
- func (cluster *Cluster) LoadPods(namespace string) ([]bitesize.Pod, error)
- func (cluster *Cluster) ScrapeResourcesForNamespace(namespace string) (*bitesize.Environment, error)
- type GistMap
- type ServiceMap
- func (s ServiceMap) AddCustomResourceDefinition(crd k8_extensions.PrsnExternalResource)
- func (s ServiceMap) AddDeployment(deployment apps_v1.Deployment)
- func (s ServiceMap) AddHPA(hpa autoscale_v2beta2.HorizontalPodAutoscaler)
- func (s ServiceMap) AddIngress(ingress netwk_v1beta1.Ingress)
- func (s ServiceMap) AddService(svc v1.Service)
- func (s ServiceMap) AddVolumeClaim(claim v1.PersistentVolumeClaim)
- func (s ServiceMap) CreateOrGet(name string) *bitesize.Service
- func (s ServiceMap) Services() bitesize.Services
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { kubernetes.Interface CRDClient rest.Interface }
Cluster wraps low level kubernetes api requests to an object easier to interact with
func (*Cluster) ApplyEnvironment ¶
func (cluster *Cluster) ApplyEnvironment(currentEnvironment, newEnvironment *bitesize.Environment) error
ApplyEnvironment executes kubectl apply against ingresses, services, deployments etc.
func (*Cluster) ApplyIfChanged ¶
func (cluster *Cluster) ApplyIfChanged(newConfig *bitesize.Environment) error
ApplyIfChanged compares bitesize Environment passed as an argument to the current client environment. If there are any changes, c is applied to the current config
func (*Cluster) ApplyService ¶
func (cluster *Cluster) ApplyService(service *bitesize.Service, gists *bitesize.Gists, namespace string) error
ApplyService applies a single service to the namespace
func (*Cluster) ScrapeResourcesForNamespace ¶
func (cluster *Cluster) ScrapeResourcesForNamespace(namespace string) (*bitesize.Environment, error)
ScrapeResourcesForNamespace returns BitesizeEnvironment object loaded from Kubernetes API
type GistMap ¶
GistMap holds a list of bitesize.Gist objects, representing the bitesize config gist path
func (GistMap) AddConfigMap ¶
AddConfigMap adds imported ConfigMap resource to GistMap
func (GistMap) AddCronJob ¶
AddCronJob adds imported v1beta1.CronJob Gist to GistMap
type ServiceMap ¶
ServiceMap holds a list of bitesize.Service objects, representing the whole environment. Actions on it allow to fill in respective bits of information, from kubernetes objects to bitesize objects
func (ServiceMap) AddCustomResourceDefinition ¶
func (s ServiceMap) AddCustomResourceDefinition(crd k8_extensions.PrsnExternalResource)
AddCustomResourceDefinition adds Kubernetes CRD to biteservice
func (ServiceMap) AddDeployment ¶
func (s ServiceMap) AddDeployment(deployment apps_v1.Deployment)
AddDeployment adds kubernetes deployment object to biteservice
func (ServiceMap) AddHPA ¶
func (s ServiceMap) AddHPA(hpa autoscale_v2beta2.HorizontalPodAutoscaler)
AddHPA adds Kubernetes HPA to biteservice
func (ServiceMap) AddIngress ¶
func (s ServiceMap) AddIngress(ingress netwk_v1beta1.Ingress)
AddIngress adds Kubernetes ingress fields to biteservice
func (ServiceMap) AddService ¶
func (s ServiceMap) AddService(svc v1.Service)
AddService adds Kubernetes service object to biteservice
func (ServiceMap) AddVolumeClaim ¶
func (s ServiceMap) AddVolumeClaim(claim v1.PersistentVolumeClaim)
AddVolumeClaim adds Kubernetes PVC to biteservice
func (ServiceMap) CreateOrGet ¶
func (s ServiceMap) CreateOrGet(name string) *bitesize.Service
CreateOrGet initializes new biteservice or returns an existing one (by name)
func (ServiceMap) Services ¶
func (s ServiceMap) Services() bitesize.Services
Services extracts a sorted list of bitesize.Services type out from ServiceMap type