Documentation ¶
Index ¶
- Constants
- func DeleteClusterFromRancher(rc *rancherutil.RancherConfig, clusterID string, log vzlog.VerrazzanoLogger) (bool, error)
- func GetAgentSecretName(vmcName string) string
- func GetCACertFromManagedClusterSecret(rc *rancherutil.RancherConfig, ...) (string, error)
- func GetClusterIDFromRancher(rc *rancherutil.RancherConfig, clusterName string, log vzlog.VerrazzanoLogger) (string, error)
- func GetManifestSecretName(vmcName string) string
- func GetRegistrationSecretName(vmcName string) string
- func ImportClusterToRancher(rc *rancherutil.RancherConfig, clusterName string, labels map[string]string, ...) (string, error)
- func RegisterManagedClusterWithRancher(rc *rancherutil.RancherConfig, clusterName string, rancherClusterID string, ...) (string, string, error)
- type ArgoCDRancherConfig
- type ClusterRegistrationTokens
- type RancherCluster
- type TLSClientConfig
- type VerrazzanoManagedClusterReconciler
Constants ¶
const ( APIGroupRancherManagement = "management.cattle.io" APIGroupVersionRancherManagement = "v3" ClusterRoleTemplateBindingKind = "ClusterRoleTemplateBinding" UserListKind = "UserList" UserKind = "User" ClusterRoleTemplateBindingAttributeClusterName = "clusterName" ClusterRoleTemplateBindingAttributeUserName = "userName" ClusterRoleTemplateBindingAttributeRoleTemplateName = "roleTemplateName" UserUsernameAttribute = "username" )
const ThanosManagedClusterEndpointsConfigMap = "verrazzano-thanos-endpoints"
Variables ¶
This section is empty.
Functions ¶
func DeleteClusterFromRancher ¶
func DeleteClusterFromRancher(rc *rancherutil.RancherConfig, clusterID string, log vzlog.VerrazzanoLogger) (bool, error)
DeleteClusterFromRancher uses the Rancher API to delete a cluster in Rancher.
func GetAgentSecretName ¶
GetAgentSecretName returns the admin secret name
func GetCACertFromManagedClusterSecret ¶ added in v1.7.0
func GetCACertFromManagedClusterSecret(rc *rancherutil.RancherConfig, clusterID, namespace, secretName, secretKey string, log vzlog.VerrazzanoLogger) (string, error)
GetCACertFromManagedClusterSecret attempts to get the CA cert from a secret on the managed cluster using the Rancher API proxy
func GetClusterIDFromRancher ¶
func GetClusterIDFromRancher(rc *rancherutil.RancherConfig, clusterName string, log vzlog.VerrazzanoLogger) (string, error)
GetClusterIDFromRancher attempts to fetch the cluster from Rancher by name and pull out the cluster ID
func GetManifestSecretName ¶
GetManifestSecretName returns the manifest secret name
func GetRegistrationSecretName ¶
GetRegistrationSecretName returns the registration secret name
func ImportClusterToRancher ¶
func ImportClusterToRancher(rc *rancherutil.RancherConfig, clusterName string, labels map[string]string, log vzlog.VerrazzanoLogger) (string, error)
ImportClusterToRancher uses the Rancher API to import the cluster. The cluster will show as "pending" until the registration YAML is applied on the managed cluster.
func RegisterManagedClusterWithRancher ¶ added in v1.6.6
func RegisterManagedClusterWithRancher(rc *rancherutil.RancherConfig, clusterName string, rancherClusterID string, log vzlog.VerrazzanoLogger) (string, string, error)
RegisterManagedClusterWithRancher registers a managed cluster with Rancher and returns a chunk of YAML that must be applied on the managed cluster to complete the registration.
Types ¶
type ArgoCDRancherConfig ¶
type ArgoCDRancherConfig struct { BearerToken string `json:"bearerToken"` TLSClientConfig `json:"tlsClientConfig"` }
type ClusterRegistrationTokens ¶ added in v1.5.1
type RancherCluster ¶
func GetAllClustersInRancher ¶
func GetAllClustersInRancher(rc *rancherutil.RancherConfig, log vzlog.VerrazzanoLogger) ([]RancherCluster, []byte, error)
GetAllClustersInRancher returns cluster information for every cluster registered with Rancher
type TLSClientConfig ¶
type VerrazzanoManagedClusterReconciler ¶
type VerrazzanoManagedClusterReconciler struct { client.Client Scheme *runtime.Scheme RancherIngressHost string // contains filtered or unexported fields }
VerrazzanoManagedClusterReconciler reconciles a VerrazzanoManagedCluster object. The reconciler will create a ServiceAcount, RoleBinding, and a Secret which contains the kubeconfig to be used by the Multi-Cluster Agent to access the admin cluster.
func (*VerrazzanoManagedClusterReconciler) SetupWithManager ¶
func (r *VerrazzanoManagedClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager creates a new controller and adds it to the manager