vmc

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: UPL-1.0 Imports: 61 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIGroupRancherManagement        = "management.cattle.io"
	APIGroupVersionRancherManagement = "v3"
	ClusterRoleTemplateBindingKind   = "ClusterRoleTemplateBinding"
	UserListKind                     = "UserList"
	UserKind                         = "User"

	ClusterRoleTemplateBindingAttributeClusterName      = "clusterName"
	ClusterRoleTemplateBindingAttributeUserName         = "userName"
	ClusterRoleTemplateBindingAttributeRoleTemplateName = "roleTemplateName"

	UserUsernameAttribute = "username"
)
View Source
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

func GetAgentSecretName(vmcName string) string

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

func GetManifestSecretName(vmcName string) string

GetManifestSecretName returns the manifest secret name

func GetRegistrationSecretName

func GetRegistrationSecretName(vmcName string) string

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 ClusterRegistrationTokens struct {
	ClusterID string `json:"clusterId"`
	State     string `json:"state"`
	Token     string `json:"token"`
}

type RancherCluster

type RancherCluster struct {
	Name string
	ID   string
}

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 TLSClientConfig struct {
	CaData   string `json:"caData"`
	Insecure bool   `json:"insecure"`
}

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) Reconcile

func (*VerrazzanoManagedClusterReconciler) SetupWithManager

func (r *VerrazzanoManagedClusterReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager creates a new controller and adds it to the manager

Jump to

Keyboard shortcuts

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