Documentation ¶
Index ¶
- Constants
- Variables
- func CreateProject(name, display, desc, basecmd string, out io.Writer) error
- func ErrOpenShiftFailedToStart(container string) error
- func ErrPortsNotAvailable(ports []int) error
- func ErrTimedOutWaitingForStart(container string) error
- func ImportObjects(f *clientcmd.Factory, ns, location string) error
- func IsPortsNotAvailableErr(err error) bool
- func Login(username, password, server, configDir string, f *clientcmd.Factory, ...) error
- func UnavailablePorts(err error) []int
- type Helper
- func (h *Helper) InstallRegistry(kubeClient kclient.Interface, f *clientcmd.Factory, configDir, images string, ...) error
- func (h *Helper) InstallRouter(kubeClient kclient.Interface, f *clientcmd.Factory, ...) error
- func (h *Helper) Master(ip string) string
- func (h *Helper) OtherIPs(excludeIP string) ([]string, error)
- func (h *Helper) ServerIP() (string, error)
- func (h *Helper) Start(opt *StartOptions, out io.Writer) (string, error)
- func (h *Helper) TestIP(ip string) error
- func (h *Helper) TestPorts(ports []int) error
- type StartOptions
Constants ¶
const ( DefaultDNSPort = 53 AlternateDNSPort = 8053 )
Variables ¶
var ( BasePorts = []int{80, 443, 4001, 7001, 8443, 10250} DefaultPorts = append(BasePorts, DefaultDNSPort) PortsWithAlternateDNS = append(BasePorts, AlternateDNSPort) )
Functions ¶
func CreateProject ¶
CreateProject creates a project
func ErrOpenShiftFailedToStart ¶
ErrOpenShiftFailedToStart is thrown when the OpenShift server failed to start
func ErrPortsNotAvailable ¶
func ErrTimedOutWaitingForStart ¶
ErrTimedOutWaitingForStart is thrown when the OpenShift server can't be pinged after reasonable amount of time.
func ImportObjects ¶
ImportObjects imports objects into OpenShift from a particular location into a given namespace
func IsPortsNotAvailableErr ¶
func Login ¶
func Login(username, password, server, configDir string, f *clientcmd.Factory, c *cobra.Command, out io.Writer) error
Login logs into the specified server using given credentials and CA file
func UnavailablePorts ¶
Types ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper contains methods and utilities to help with OpenShift startup
func NewHelper ¶
func NewHelper(client *docker.Client, hostHelper *host.HostHelper, image, containerName, publicHostname, routingSuffix string) *Helper
NewHelper creates a new OpenShift helper
func (*Helper) InstallRegistry ¶
func (h *Helper) InstallRegistry(kubeClient kclient.Interface, f *clientcmd.Factory, configDir, images string, out io.Writer) error
InstallRegistry checks whether a registry is installed and installs one if not already installed
func (*Helper) InstallRouter ¶
func (h *Helper) InstallRouter(kubeClient kclient.Interface, f *clientcmd.Factory, configDir, images, hostIP string, out io.Writer) error
InstallRouter installs a default router on the OpenShift server
func (*Helper) OtherIPs ¶
OtherIPs tries to find other IPs besides the argument IP for the Docker host