Documentation
¶
Index ¶
Constants ¶
View Source
const (
ProxierTypeKey = "kubernetes-port-forward"
)
View Source
const ( // ProxyConfigMapKey the key to use in the configmap made for the proxy to // describe the config key ProxyConfigMapKey = "config" )
Variables ¶
This section is empty.
Functions ¶
func CreateControllerProxy ¶
func CreateControllerProxy( config ControllerProxyConfig, labels labels.Set, configI core.ConfigMapInterface, roleI rbac.RoleInterface, roleBindingI rbac.RoleBindingInterface, saI core.ServiceAccountInterface, ) error
CreateControllerProxy establishes the Kubernetes resources needed for proxying to a Juju controller. The end result of this function is a service account with a set of permissions that the Juju client can use for proxying to a controller.
func HasControllerProxy ¶
func HasControllerProxy( name string, configI core.ConfigMapInterface, ) (bool, error)
Types ¶
type ControllerProxyConfig ¶
type ControllerProxyConfig struct { // Name to apply to kubernetes resources created for the controller // proxy. This name is also used later on for discovery of the proxy config. Name string `json:"name"` // Namespace to create the proxy kubernetes resources in. This is ultimately // used for discovery of the proxy settings. Namespace string `json:"namespace"` // RemotePort the remote port of the service to use when proxying RemotePort string `json:"remote-port"` // TargetService the service to target for proxying TargetService string `json:"target-service"` }
ControllerProxyConfig is used to configure the kubernetes resources made for the controller proxy objects.
type Proxier ¶
type Proxier struct {
// contains filtered or unexported fields
}
func GetControllerProxy ¶
func GetControllerProxy( name, apiHost string, configI core.ConfigMapInterface, saI core.ServiceAccountInterface, secretI core.SecretInterface, ) (*Proxier, error)
func NewProxier ¶
func NewProxier(config ProxierConfig) *Proxier
func NewProxierFromRawConfig ¶
func (*Proxier) MarshalYAML ¶
func (*Proxier) SetAPIHost ¶
SetAPIHost updates the proxy info to use a different host address.
type ProxierConfig ¶
type ProxierConfig struct { APIHost string `yaml:"api-host"` CAData string `yaml:"ca-cert"` Namespace string `yaml:"namespace"` RemotePort string `yaml:"remote-port"` Service string `yaml:"service"` ServiceAccountToken string `yaml:"service-account-token"` }
func NewProxierConfig ¶
func NewProxierConfig() *ProxierConfig
Click to show internal directories.
Click to hide internal directories.