rancher

package
v0.0.0-...-92fbb66 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoginToken

func GetLoginToken(rancherURI string) (client.Token, error)

GetLoginToken returns a Rancher login token using a ADFS login flow

Types

type RancherClient

type RancherClient struct {
	Client   *cliclient.MasterClient
	Settings *config.ServerConfig
}

func GetClient

func GetClient(rancherURI string, token string) (*RancherClient, error)

GetClient imports a client

func (*RancherClient) CreateNamespace

func (c *RancherClient) CreateNamespace(namespaceName string, project *client.Project) (*clusterClient.Namespace, error)

func (*RancherClient) CreateProject

func (c *RancherClient) CreateProject(projectName string, description string, cluster *client.Cluster) (*client.Project, error)

func (*RancherClient) CreateToken

func (c *RancherClient) CreateToken() (*client.Token, error)

CreateToken generates a token for the cli

func (*RancherClient) EnsureNamespace

func (c *RancherClient) EnsureNamespace(namespaceName string, clusterName string, projectName string) (*clusterClient.Namespace, error)

func (*RancherClient) EnsureProject

func (c *RancherClient) EnsureProject(clusterName string, projectName string) (*client.Project, error)

func (*RancherClient) GetCluster

func (c *RancherClient) GetCluster(clusterName string) (*client.Cluster, error)

GetCluster returns Servers for the user

func (*RancherClient) GetKubeConfig

func (c *RancherClient) GetKubeConfig(cluster *client.Cluster) (string, error)

func (*RancherClient) GetNamespace

func (c *RancherClient) GetNamespace(namespaceName string, project *client.Project) (*clusterClient.Namespace, error)

func (*RancherClient) GetProject

func (c *RancherClient) GetProject(projectName string, cluster *client.Cluster) (*client.Project, error)

Jump to

Keyboard shortcuts

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