Documentation ¶
Index ¶
- Constants
- Variables
- func Register(ctx context.Context, management *config.Management, options config.Options) error
- type Handler
- func (h *Handler) PatchCAPIDeployment(_ string, deployment *appsv1.Deployment) (*appsv1.Deployment, error)
- func (h *Handler) PodResourcesOnChanged(_ string, node *corev1.Node) (*corev1.Node, error)
- func (h *Handler) RancherSettingOnChange(_ string, setting *rancherv3api.Setting) (*rancherv3api.Setting, error)
- func (h *Handler) RancherTokenOnChange(_ string, token *v3.Token) (*v3.Token, error)
- func (h *Handler) TLSSecretOnChange(_ string, secret *corev1.Secret) (*corev1.Secret, error)
- type VIPConfig
Constants ¶
const ( RequestsAnnotation = "management.cattle.io/pod-requests" LimitsAnnotation = "management.cattle.io/pod-limits" )
const (
VipConfigmapName = "vip"
)
Variables ¶
var UpdateRancherUISettings = map[string]string{
"ui-pl": "Harvester",
"ui-brand": "harvester",
}
Functions ¶
Types ¶
type Handler ¶
type Handler struct { RancherSettings rancherv3.SettingClient RancherSettingCache rancherv3.SettingCache RancherSettingController rancherv3.SettingController RancherUserCache rancherv3.UserCache Services ctlcorev1.ServiceClient Configmaps ctlcorev1.ConfigMapClient Secrets ctlcorev1.SecretClient SecretCache ctlcorev1.SecretCache Deployments ctlappsv1.DeploymentClient Namespace string RancherTokenController rancherv3.TokenController // contains filtered or unexported fields }
func (*Handler) PatchCAPIDeployment ¶ added in v1.2.2
func (h *Handler) PatchCAPIDeployment(_ string, deployment *appsv1.Deployment) (*appsv1.Deployment, error)
PatchCAPIDeployment is used to patch env variables for capi-deployment created by rancher. This ensures that capi-controller reconciles the local rancher cluster using the kubeconfig in the local-kubeconfig secret in fleet-local namespace. Without this patch, capi-controller identifies itself as running on the workload cluster and patches the config, to use in-cluster api endpoint (kubernetes default) service, which does not recognize the rancher generated token in the local-kubeconfig secret
func (*Handler) PodResourcesOnChanged ¶ added in v1.0.3
func (*Handler) RancherSettingOnChange ¶ added in v0.3.0
func (h *Handler) RancherSettingOnChange(_ string, setting *rancherv3api.Setting) (*rancherv3api.Setting, error)
func (*Handler) RancherTokenOnChange ¶ added in v1.4.1
RancherTokenOnChange updates the expiresAt field of the token. Although we have embedded rancher, we don't start the rancher's token controller. So, we should have our own handler to update the token.