openshift

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectsCustomCol = "-o=custom-columns=NAME:.metadata.name"
)

Variables

View Source
var (
	MASTER = OpenShiftPatchTarget{
		"master",
		"/var/lib/origin/openshift.local.config/master/master-config.yaml",
		"/var/lib/minishift/openshift.local.config/master/master-config.yaml",
	}

	NODE = OpenShiftPatchTarget{
		"node",
		"/var/lib/origin/openshift.local.config/node-localhost/node-config.yaml",
		"/var/lib/minishift/openshift.local.config/node-localhost/node-config.yaml",
	}

	UNKNOWN = OpenShiftPatchTarget{
		"unkown",
		"",
		"",
	}
)

Functions

func GetDockerRegistryInfo

func GetDockerRegistryInfo(registryAddonEnabled bool) (string, error)

func IsRunning added in v1.2.0

func IsRunning(commander docker.DockerCommander) bool

IsRunning checks whether the origin container is in running state. This method returns true if the origin container is running, false otherwise

func Patch

func Patch(target OpenShiftPatchTarget, patch string, commander docker.DockerCommander) (bool, error)

func RestartOpenShift

func RestartOpenShift(commander docker.DockerCommander) (bool, error)

func ViewConfig

func ViewConfig(target OpenShiftPatchTarget, commander docker.DockerCommander) (string, error)

Types

type OpenShiftPatchTarget

type OpenShiftPatchTarget struct {
	// contains filtered or unexported fields
}

type Route added in v1.3.0

type Route struct {
	Items []struct {
		Spec struct {
			AlternateBackends []struct {
				Name   string `json:"name"`
				Weight int    `json:"weight"`
			} `json:"alternateBackends"`
			Host string `json:"host"`
			To   struct {
				Name   string `json:"name"`
				Weight int    `json:"weight"`
			} `json:"to"`
		} `json:"spec"`
	} `json:"items"`
}

type Service added in v1.3.0

type Service struct {
	Items []struct {
		Metadata struct {
			Name string `json:"name"`
		} `json:"metadata"`
		Spec struct {
			Ports []struct {
				NodePort int `json:"nodePort"`
			} `json:"ports"`
		} `json:"spec"`
	} `json:"items"`
}

type ServiceSpec added in v1.3.0

type ServiceSpec struct {
	Namespace string
	Name      string
	URL       []string
	NodePort  string
	Weight    []string
}

func GetServiceSpecs added in v1.3.0

func GetServiceSpecs(serviceNamespace string) ([]ServiceSpec, error)

GetServiceSpecs takes Namespace string and return route/nodeport/name/weight in a ServiceSpec structure

type ServiceWeight added in v1.3.0

type ServiceWeight struct {
	Name   string
	Weight string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL