Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClients ¶
func GetClients() (client.Client, *kubernetes.Clientset, error)
GetClients is the function to get Host Kubernetes (where install and controller pods scheduled) clients with in cluster config. This function is called regardless of hosted mode being enabled: Hosted Mode Off (Standard Installation): - resource (tenant) kube client => in cluster config - host kube clients => in cluster config Hosted Mode On: - resource (tenant) kube client => via EnvTenantKubeconfig - host kube clients => in cluster config
Types ¶
type Config ¶
type Config struct { // HostControllerNamespace is the namespace on Host Cluster where install and controller jobs/deployments will be // deployed. HostControllerNamespace string // TenantAPIServiceHost is Kubernetes Apiserver Host for custom resources (a.k.a Tenant Kubernetes) TenantAPIServiceHost string // TenantAPIServicePort is Kubernetes Apiserver Port for custom resources (a.k.a Tenant Kubernetes) TenantAPIServicePort string }
Config is the configuration for Host Aware Mode where different Kubernetes API's are used for pod scheduling and custom resources.
func NewConfig ¶
func NewConfig(hostControllerNamespace, tenantAPIServiceHost, tenantAPIServicePort string) (*Config, error)
NewConfig returns a new host aware config based on the input parameters.
func NewConfigForHost ¶
NewConfigForHost returns a host aware config given a controller namespace and a Host string, assumed to be in the format accepted by rest.Config. It returns a nil Config if either the supplied namespace or host are empty. https://pkg.go.dev/k8s.io/client-go/rest?tab=doc#Config
func (*Config) ObjectReferenceOnHost ¶
func (c *Config) ObjectReferenceOnHost(name, namespace string) corev1.ObjectReference
ObjectReferenceOnHost maps object with given name and namespace into single controller namespace on Host Cluster.