Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) AddEnvironmentVariablesToDeploymentConfig(envs []corev1.EnvVar, dc *appsv1.DeploymentConfig) error
- func (c *Client) AddPVCToDeploymentConfig(dc *appsv1.DeploymentConfig, pvc string, path string) error
- func (c *Client) CreateNewProject(name string) error
- func (c *Client) CreatePVC(name string, size string, labels map[string]string) (*corev1.PersistentVolumeClaim, error)
- func (c *Client) CreateRoute(service string, labels map[string]string) (*routev1.Route, error)
- func (c *Client) Delete(kind string, name string, labels map[string]string) (string, error)
- func (c *Client) DeletePVC(name string) error
- func (c *Client) DeleteProject(name string) error
- func (c *Client) DeleteRoute(name string) error
- func (c *Client) FollowBuildLog(buildName string) error
- func (c *Client) GetBuildConfig(name string, project string) (*buildv1.BuildConfig, error)
- func (c *Client) GetClusterServiceClassExternalNames() ([]string, error)
- func (c *Client) GetClusterServiceClasses() ([]scv1beta1.ClusterServiceClass, error)
- func (c *Client) GetCurrentProjectName() string
- func (c *Client) GetDeploymentConfigFromName(name string) (*appsv1.DeploymentConfig, error)
- func (c *Client) GetDeploymentConfigsFromSelector(selector string) ([]appsv1.DeploymentConfig, error)
- func (c *Client) GetImageStreams(namespace string) ([]imagev1.ImageStream, error)
- func (c *Client) GetImageStreamsNames(namespace string) ([]string, error)
- func (c *Client) GetLabelValues(project string, label string, selector string) ([]string, error)
- func (c *Client) GetLatestBuildName(buildConfigName string) (string, error)
- func (c *Client) GetOneDeploymentConfigFromSelector(selector string) (*appsv1.DeploymentConfig, error)
- func (c *Client) GetOnePodFromSelector(selector string) (*corev1.Pod, error)
- func (c *Client) GetOneServiceFromSelector(selector string) (*corev1.Service, error)
- func (c *Client) GetPVCNamesFromSelector(selector string) ([]string, error)
- func (c *Client) GetPVCsFromSelector(selector string) ([]corev1.PersistentVolumeClaim, error)
- func (c *Client) GetProjectNames() ([]string, error)
- func (c *Client) GetServicesFromSelector(selector string) ([]corev1.Service, error)
- func (c *Client) ListRouteNames(labelSelector string) ([]string, error)
- func (c *Client) ListRoutes(labelSelector string) ([]routev1.Route, error)
- func (c *Client) NewAppS2I(name string, builderImage string, gitUrl string, labels map[string]string, ...) error
- func (c *Client) RemoveVolumeFromDeploymentConfig(pvc string, dcName string) error
- func (c *Client) SetCurrentProject(project string) error
- func (c *Client) StartBinaryBuild(name string, dir string) error
- func (c *Client) StartBuild(name string) error
- func (c *Client) SyncPath(localPath string, targetPodName string, targetPath string) (string, error)
- func (c *Client) UpdateBuildConfig(buildConfigName string, projectName string, gitUrl string, ...) error
- type OcCommand
Constants ¶
const (
OpenShiftNameSpace = "openshift"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.0.3
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddEnvironmentVariablesToDeploymentConfig ¶ added in v0.0.4
func (c *Client) AddEnvironmentVariablesToDeploymentConfig(envs []corev1.EnvVar, dc *appsv1.DeploymentConfig) error
AddEnvironmentVariablesToDeploymentConfig adds the given environment variables to the only container in the Deployment Config and updates in the cluster
func (*Client) AddPVCToDeploymentConfig ¶ added in v0.0.4
func (c *Client) AddPVCToDeploymentConfig(dc *appsv1.DeploymentConfig, pvc string, path string) error
AddPVCToDeploymentConfig adds the given PVC to the given Deployment Config at the given path
func (*Client) CreateNewProject ¶ added in v0.0.3
func (*Client) CreatePVC ¶ added in v0.0.4
func (c *Client) CreatePVC(name string, size string, labels map[string]string) (*corev1.PersistentVolumeClaim, error)
CreatePVC creates a PVC resource in the cluster with the given name, size and labels
func (*Client) CreateRoute ¶ added in v0.0.3
CreateRoute creates a route object for the given service and with the given labels
func (*Client) Delete ¶ added in v0.0.3
Delete calls oc delete kind is always required (can be set to 'all') name can be omitted if labels are set, in that case set name to ” if you want to delete object just by its name set labels to nil
func (*Client) DeleteProject ¶ added in v0.0.3
func (*Client) DeleteRoute ¶ added in v0.0.3
DeleteRoute deleted the given route
func (*Client) FollowBuildLog ¶ added in v0.0.3
FollowBuildLog stream build log to stdout
func (*Client) GetBuildConfig ¶ added in v0.0.3
GetBuildConfig get BuildConfig by its name
func (*Client) GetClusterServiceClassExternalNames ¶ added in v0.0.3
GetClusterServiceClassExternalNames returns the names of all the cluster service classes in the cluster
func (*Client) GetClusterServiceClasses ¶ added in v0.0.3
func (c *Client) GetClusterServiceClasses() ([]scv1beta1.ClusterServiceClass, error)
GetClusterServiceClasses queries the service service catalog to get all the currently available cluster service classes
func (*Client) GetCurrentProjectName ¶ added in v0.0.3
func (*Client) GetDeploymentConfigFromName ¶ added in v0.0.4
func (c *Client) GetDeploymentConfigFromName(name string) (*appsv1.DeploymentConfig, error)
GetDeploymentConfigFromName returns the Deployment Config resource given the Deployment Config name
func (*Client) GetDeploymentConfigsFromSelector ¶ added in v0.0.4
func (c *Client) GetDeploymentConfigsFromSelector(selector string) ([]appsv1.DeploymentConfig, error)
GetDeploymentConfigsFromSelector returns an array of Deployment Config resources which match the given selector
func (*Client) GetImageStreams ¶ added in v0.0.3
func (c *Client) GetImageStreams(namespace string) ([]imagev1.ImageStream, error)
GetImageStreams returns the Image Stream objects in the given namespace
func (*Client) GetImageStreamsNames ¶ added in v0.0.3
GetImageStreamsNames returns the names of the image streams in a given namespace
func (*Client) GetLabelValues ¶ added in v0.0.3
GetLabelValues get label values of given label from objects in project that are matching selector returns slice of uniq label values
func (*Client) GetLatestBuildName ¶ added in v0.0.4
GetLatestBuildName gets the name of the latest build buildConfigName is the name of the buildConfig for which we are fetching the build name returns the name of the latest build or the error
func (*Client) GetOneDeploymentConfigFromSelector ¶ added in v0.0.4
func (c *Client) GetOneDeploymentConfigFromSelector(selector string) (*appsv1.DeploymentConfig, error)
GetOneDeploymentConfigFromSelector returns the Deployment Config object associated with the given selector. An error is thrown when exactly one Deployment Config is not found for the selector.
func (*Client) GetOnePodFromSelector ¶ added in v0.0.4
GetOnePodFromSelector returns the Pod object associated with the given selector. An error is thrown when exactly one Pod is not found.
func (*Client) GetOneServiceFromSelector ¶ added in v0.0.4
GetOneServiceFromSelector returns the Service object associated with the given selector. An error is thrown when exactly one Service is not found for the selector
func (*Client) GetPVCNamesFromSelector ¶ added in v0.0.4
GetPVCNamesFromSelector returns the PVC names for the given selector
func (*Client) GetPVCsFromSelector ¶ added in v0.0.4
func (c *Client) GetPVCsFromSelector(selector string) ([]corev1.PersistentVolumeClaim, error)
GetPVCsFromSelector returns the PVCs based on the given selector
func (*Client) GetProjectNames ¶ added in v0.0.4
GetProjectNames return list of existing projects that user has access to.
func (*Client) GetServicesFromSelector ¶ added in v0.0.4
GetServicesFromSelector returns an array of Service resources which match the given selector
func (*Client) ListRouteNames ¶ added in v0.0.3
ListRouteNames lists all the names of the routes based on the given label selector
func (*Client) ListRoutes ¶ added in v0.0.3
ListRoutes lists all the routes based on the given label selector
func (*Client) NewAppS2I ¶ added in v0.0.3
func (c *Client) NewAppS2I(name string, builderImage string, gitUrl string, labels map[string]string, annotations map[string]string) error
NewAppS2I create new application using S2I if gitUrl is "" than it creates binary build otherwise uses gitUrl as buildSource
func (*Client) RemoveVolumeFromDeploymentConfig ¶ added in v0.0.4
RemoveVolumeFromDeploymentConfig removes the volume associated with the given PVC from the Deployment Config. Both, the volume entry and the volume mount entry in the containers, are deleted.
func (*Client) SetCurrentProject ¶ added in v0.0.3
func (*Client) StartBinaryBuild ¶ added in v0.0.3
StartBinaryBuild starts new build and streams dir as source for build
func (*Client) StartBuild ¶ added in v0.0.3
StartBuild starts new build as it is
func (*Client) SyncPath ¶ added in v0.0.4
func (c *Client) SyncPath(localPath string, targetPodName string, targetPath string) (string, error)
SyncPath copies local directory to directory in running Pod.
func (*Client) UpdateBuildConfig ¶ added in v0.0.4
func (c *Client) UpdateBuildConfig(buildConfigName string, projectName string, gitUrl string, annotations map[string]string) error
UpdateBuildConfig updates the BuildConfig file buildConfigName is the name of the BuildConfig file to be updated projectName is the name of the project gitUrl equals to the git URL of the source and is equals to "" if the source is of type dir or binary annotations contains the annotations for the BuildConfig file