Documentation
¶
Index ¶
- Variables
- func BuildDefaultConfig(host, token string) clientcmd.ClientConfig
- func MarkServices(ts []*deploy.Template, services []kapi.Service)
- func NewTemplateLoaderDecoder(templateDir string) *templateLoaderDecoder
- type Client
- func (c Client) BuildConfigLogURL(ns, bc string) string
- func (c Client) BuildURL(ns, bc, id string) string
- func (c Client) CreateBuildConfigInNamespace(ns string, b *bc.BuildConfig) (*bc.BuildConfig, error)
- func (c Client) CreateConfigMap(ns string, cm *api.ConfigMap) (*api.ConfigMap, error)
- func (c Client) CreateDeployConfigInNamespace(ns string, d *dc.DeploymentConfig) (*dc.DeploymentConfig, error)
- func (c Client) CreateImageStream(ns string, i *ioapi.ImageStream) (*ioapi.ImageStream, error)
- func (c Client) CreateJobToWatch(j *batch.Job, ns string) (watch.Interface, error)
- func (c Client) CreatePersistentVolumeClaim(namespace string, claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
- func (c Client) CreatePod(ns string, p *api.Pod) (*api.Pod, error)
- func (c Client) CreateRouteInNamespace(ns string, r *roapi.Route) (*roapi.Route, error)
- func (c Client) CreateSecretInNamespace(ns string, s *api.Secret) (*api.Secret, error)
- func (c Client) CreateServiceInNamespace(ns string, svc *api.Service) (*api.Service, error)
- func (c Client) DeployLogURL(ns, dc string) string
- func (c Client) FindBuildConfigByLabel(ns string, searchLabels map[string]string) (*bc.BuildConfig, error)
- func (c Client) FindConfigMapByName(ns, name string) (*api.ConfigMap, error)
- func (c Client) FindDeploymentConfigsByLabel(ns string, searchLabels map[string]string) ([]dc.DeploymentConfig, error)
- func (c Client) FindJobByName(ns, name string) (*batch.Job, error)
- func (c Client) FindRouteByName(ns, name string) (*roapi.Route, error)
- func (c Client) FindServiceByLabel(ns string, searchLabels map[string]string) ([]api.Service, error)
- func (c Client) GetDeployLogs(ns, deployName string) (string, error)
- func (c Client) GetDeploymentConfigByName(ns, deploymentName string) (*dc.DeploymentConfig, error)
- func (c Client) InstantiateBuild(ns, buildName string) (*bc.Build, error)
- func (c Client) ListBuildConfigs(ns string) (*bcv1.BuildConfigList, error)
- func (c Client) PodLogs(ns, name string, lines int64) ([]byte, error)
- func (c Client) UpdateBuildConfigInNamespace(ns string, b *bc.BuildConfig) (*bc.BuildConfig, error)
- func (c Client) UpdateConfigMap(ns string, cm *api.ConfigMap) (*api.ConfigMap, error)
- func (c Client) UpdateDeployConfigInNamespace(ns string, d *dc.DeploymentConfig) (*dc.DeploymentConfig, error)
- func (c Client) UpdateRouteInNamespace(ns string, r *roapi.Route) (*roapi.Route, error)
- type ClientFactory
Constants ¶
This section is empty.
Variables ¶
var PackagedTemplates = map[string]string{}
PackagedTemplates map of locally stored templates
var ServiceTemplates = map[string]string{}
ServiceTemplates map of locally stored templates without job templates
Functions ¶
func BuildDefaultConfig ¶
func BuildDefaultConfig(host, token string) clientcmd.ClientConfig
BuildDefaultConfig setups a kube config with the given host and token
func MarkServices ¶
MarkServices mark services that are deployed to true
func NewTemplateLoaderDecoder ¶
func NewTemplateLoaderDecoder(templateDir string) *templateLoaderDecoder
NewTemplateLoaderDecoder creates a template loader that loads templates from the supplied directory Todo: Don't return an unexported type
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an external type that wraps both kubernetes and oc
func ClientFromConfig ¶
func ClientFromConfig(conf clientcmd.ClientConfig) (Client, error)
ClientFromConfig returns a client that wraps both kubernetes and openshift operations
func (Client) BuildConfigLogURL ¶
BuildConfigLogURL returns the URL that can be polled for the build log of the specified dc in the specified namespace
func (Client) BuildURL ¶
BuildURL returns the URL that can be polled for the build log of the specified build id for the specified dc in the specified namespace
func (Client) CreateBuildConfigInNamespace ¶
func (c Client) CreateBuildConfigInNamespace(ns string, b *bc.BuildConfig) (*bc.BuildConfig, error)
CreateBuildConfigInNamespace creates the supplied build config in the supplied namespace and returns the buildconfig, or any errors that occurred
func (Client) CreateConfigMap ¶
CreateConfigMap creates a ConfigMap in the given namespace
func (Client) CreateDeployConfigInNamespace ¶
func (c Client) CreateDeployConfigInNamespace(ns string, d *dc.DeploymentConfig) (*dc.DeploymentConfig, error)
CreateDeployConfigInNamespace creates the supplied deploy config in the supplied namespace and returns the deployconfig, or any errors that occurred
func (Client) CreateImageStream ¶
func (c Client) CreateImageStream(ns string, i *ioapi.ImageStream) (*ioapi.ImageStream, error)
CreateImageStream creates the specified imagestream in the specified namespace
func (Client) CreateJobToWatch ¶
CreateJobToWatch creates a job and returns a watch on that Job
func (Client) CreatePersistentVolumeClaim ¶
func (c Client) CreatePersistentVolumeClaim(namespace string, claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
CreatePersistentVolumeClaim uses the k8s api to setup the given claim
func (Client) CreateRouteInNamespace ¶
CreateRouteInNamespace creates the specified route in the specified namespace
func (Client) CreateSecretInNamespace ¶
CreateSecretInNamespace creates the specified secret in the specified namespace
func (Client) CreateServiceInNamespace ¶
CreateServiceInNamespace creates the specified service in the specified namespace
func (Client) DeployLogURL ¶
DeployLogURL returns the URL that can be polled for the deploy log of the specified dc in the specified namespace
func (Client) FindBuildConfigByLabel ¶
func (c Client) FindBuildConfigByLabel(ns string, searchLabels map[string]string) (*bc.BuildConfig, error)
FindBuildConfigByLabel searches for a build config by a label selector
func (Client) FindConfigMapByName ¶
FindConfigMapByName returns a config map for name
func (Client) FindDeploymentConfigsByLabel ¶
func (c Client) FindDeploymentConfigsByLabel(ns string, searchLabels map[string]string) ([]dc.DeploymentConfig, error)
FindDeploymentConfigsByLabel searches for a deployment config by a label selector
func (Client) FindJobByName ¶
FindJobByName return nil if not found or the Job object
func (Client) FindRouteByName ¶
FindRouteByName returns a route by name from the namespace
func (Client) FindServiceByLabel ¶
func (c Client) FindServiceByLabel(ns string, searchLabels map[string]string) ([]api.Service, error)
FindServiceByLabel finds services deployed to the namespace based on searchLabels
func (Client) GetDeployLogs ¶
GetDeployLogs returns the logs for the supplied deployName in the supplied namespace
func (Client) GetDeploymentConfigByName ¶
func (c Client) GetDeploymentConfigByName(ns, deploymentName string) (*dc.DeploymentConfig, error)
GetDeploymentConfigByName returns the DeploymentConfig for the name passed
func (Client) InstantiateBuild ¶
InstantiateBuild will kick off a build in OSCP
func (Client) ListBuildConfigs ¶
func (c Client) ListBuildConfigs(ns string) (*bcv1.BuildConfigList, error)
ListBuildConfigs will return all build configs for the given namespace
func (Client) UpdateBuildConfigInNamespace ¶
func (c Client) UpdateBuildConfigInNamespace(ns string, b *bc.BuildConfig) (*bc.BuildConfig, error)
UpdateBuildConfigInNamespace updates the supplied build config in the supplied namespace and returns the buildconfig, or any errors that occurred
func (Client) UpdateConfigMap ¶
UpdateConfigMap updates the ConfigMap in the given namespace
func (Client) UpdateDeployConfigInNamespace ¶
func (c Client) UpdateDeployConfigInNamespace(ns string, d *dc.DeploymentConfig) (*dc.DeploymentConfig, error)
UpdateDeployConfigInNamespace updates the supplied deploy config in the supplied namespace and returns the deployconfig and any errors that occurred
type ClientFactory ¶
type ClientFactory struct{}
ClientFactory will create and return an openshift client
func (ClientFactory) DefaultDeployClient ¶
func (ClientFactory) DefaultDeployClient(host, token string) (deploy.Client, error)
DefaultDeployClient will return a sane default client configured for the given host and token