Documentation
¶
Index ¶
- Constants
- Variables
- func AddClusterRole(authorizationClient authorizationtypedclient.ClusterRoleBindingsGetter, ...) error
- func AddSCCToServiceAccount(securityClient securitytypedclient.SecurityContextConstraintsGetter, ...) error
- func CheckSocat() error
- func CreateProject(f *clientcmd.Factory, name, display, desc, basecmd string, out io.Writer) error
- func ErrPortsNotAvailable(ports []int) error
- func IsPortsNotAvailableErr(err error) bool
- func KillExistingSocat() error
- func LoggedInUserFactory() (*clientcmd.Factory, error)
- func Login(username, password, server, configDir string, ...) error
- func SaveSocatPid(pid int) error
- func UnavailablePorts(err error) []int
- type Helper
- func (h *Helper) CheckNodes(kclient kclientset.Interface) error
- func (h *Helper) DetermineNodeHost(hostConfigDir string, names ...string) (string, error)
- func (h *Helper) GetConfigFromLocalDir(configDir string) (*configapi.MasterConfig, string, error)
- func (h *Helper) Master(ip string) string
- func (h *Helper) OriginLog() string
- func (h *Helper) OtherIPs(excludeIP string) ([]string, error)
- func (h *Helper) RegisterTemplateServiceBroker(baseDir, configDir string, logdir string) error
- func (h *Helper) ServerIP() (string, error)
- func (h *Helper) SetupPersistentStorage(restConfig *rest.Config, hostPersistentVolumesDir string) error
- func (h *Helper) StartSocatTunnel(bindIP string) error
- func (h *Helper) TestContainerNetworking(ip string) error
- func (h *Helper) TestForwardedIP(ip string) error
- func (h *Helper) TestIP(ip string) error
- func (h *Helper) TestPorts(ports []int) error
Constants ¶
const ( DefaultDNSPort = 8053 DefaultSvcCIDR = "172.30.0.0/16" // TODO: Figure out why cluster up relies on this name ContainerName = "origin" Namespace = "openshift" )
const (
DefaultNamespace = "default"
)
Variables ¶
var ( BasePorts = []int{4001, 7001, 8443, 10250, DefaultDNSPort} RouterPorts = []int{80, 443} AllPorts = append(RouterPorts, BasePorts...) SocatPidFile = filepath.Join(homedir.HomeDir(), clientconfig.OpenShiftConfigHomeDir, "socat-8443.pid") )
Functions ¶
func AddClusterRole ¶
func AddClusterRole(authorizationClient authorizationtypedclient.ClusterRoleBindingsGetter, role, user string) error
func AddSCCToServiceAccount ¶
func AddSCCToServiceAccount(securityClient securitytypedclient.SecurityContextConstraintsGetter, scc, sa, namespace string, out io.Writer) error
func CheckSocat ¶
func CheckSocat() error
func CreateProject ¶
CreateProject creates a project
func ErrPortsNotAvailable ¶
func IsPortsNotAvailableErr ¶
func KillExistingSocat ¶
func KillExistingSocat() error
func LoggedInUserFactory ¶
func Login ¶
func Login(username, password, server, configDir string, clientConfig kclientcmdapi.Config, c *cobra.Command, out, errOut io.Writer) error
Login logs into the specified server using given credentials and CA file
func SaveSocatPid ¶
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(dockerHelper *dockerhelper.Helper, image, containerName string) *Helper
NewHelper creates a new OpenShift helper
func (*Helper) CheckNodes ¶
func (h *Helper) CheckNodes(kclient kclientset.Interface) error
CheckNodes determines if there is more than one node that corresponds to the current machine and removes the one that doesn't match the default node name
func (*Helper) DetermineNodeHost ¶
func (*Helper) GetConfigFromLocalDir ¶
func (*Helper) OtherIPs ¶
OtherIPs tries to find other IPs besides the argument IP for the Docker host
func (*Helper) RegisterTemplateServiceBroker ¶
TODO this should be a controller based on the actual cluster state RegisterTemplateServiceBroker registers the TSB with the SC by creating the broker resource
func (*Helper) SetupPersistentStorage ¶
func (h *Helper) SetupPersistentStorage(restConfig *rest.Config, hostPersistentVolumesDir string) error
SetupPersistentStorage sets up persistent storage
func (*Helper) StartSocatTunnel ¶
func (*Helper) TestContainerNetworking ¶
TestContainerNetworking launches a container that will check whether the container can communicate with the master API and DNS endpoints.