gitopscluster

package
v1.2.4-1-20220311-8eedb3f Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const ROLEBINDINGNAME = ROLENAME
View Source
const ROLENAME = "openshift-gitops-applicationset-controller-placement"

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new argocd cluster Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.

Types

type ReconcileGitOpsCluster

type ReconcileGitOpsCluster struct {
	client.Client
	// contains filtered or unexported fields
}

ReconcileGitOpsCluster reconciles a GitOpsCluster object.

func (*ReconcileGitOpsCluster) AddManagedClustersToArgo

func (r *ReconcileGitOpsCluster) AddManagedClustersToArgo(
	argoNamespace string,
	managedClusters []string,
	orphanSecretsList map[types.NamespacedName]string) error

AddManagedClustersToArgo copies a managed cluster secret from the managed cluster namespace to ArgoCD namespace

func (*ReconcileGitOpsCluster) CheckAndDisableInKlusterletAddonConfig

func (r *ReconcileGitOpsCluster) CheckAndDisableInKlusterletAddonConfig(clusterName string, checkOnly bool) (bool, error)

func (*ReconcileGitOpsCluster) CreateApplicationSetConfigMaps

func (r *ReconcileGitOpsCluster) CreateApplicationSetConfigMaps(namespace string) error

ApplyApplicationSetConfigMaps creates the required configMap to allow ArgoCD ApplicationSet to identify our two forms of placement

func (*ReconcileGitOpsCluster) CreateApplicationSetRbac

func (r *ReconcileGitOpsCluster) CreateApplicationSetRbac(namespace string) error

CreateApplicationSetRbac sets up required role and roleBinding so that the applicationset-controller can work with placementRules and placementDecisions

func (*ReconcileGitOpsCluster) CreateManagedClusterSecretInArgo

func (r *ReconcileGitOpsCluster) CreateManagedClusterSecretInArgo(argoNamespace string, managedClusterSecret v1.Secret) error

CreateManagedClusterSecretInArgo creates a managed cluster secret with specific metadata in Argo namespace

func (*ReconcileGitOpsCluster) CreateMigrationGitOpsCluster

func (r *ReconcileGitOpsCluster) CreateMigrationGitOpsCluster(argoNamespace string, clusterNames []string) error

func (*ReconcileGitOpsCluster) CreateMigrationPlacement

func (r *ReconcileGitOpsCluster) CreateMigrationPlacement(clusterNames []string) error

func (*ReconcileGitOpsCluster) FindServiceWithLabelsAndNamespace

func (r *ReconcileGitOpsCluster) FindServiceWithLabelsAndNamespace(namespace string, labels map[string]string) bool

FindServiceWithLabelsAndNamespace finds a list of services with provided labels from the specified namespace

func (*ReconcileGitOpsCluster) GetAllGitOpsClusters

GetAllGitOpsClusters returns all GitOpsCluster CRs

func (*ReconcileGitOpsCluster) GetAllManagedClusterSecretsInArgo

func (r *ReconcileGitOpsCluster) GetAllManagedClusterSecretsInArgo() (v1.SecretList, error)

GetAllManagedClusterSecretsInArgo returns list of secrets from all GitOps managed cluster

func (*ReconcileGitOpsCluster) GetManagedClusters

func (r *ReconcileGitOpsCluster) GetManagedClusters(namespace string, placementref v1.ObjectReference) ([]string, error)

GetManagedClusters retrieves managed cluster names from placement decision

func (*ReconcileGitOpsCluster) MigrateManagedClusterSecrets

func (r *ReconcileGitOpsCluster) MigrateManagedClusterSecrets(argoNamespace string) error

func (*ReconcileGitOpsCluster) Reconcile

func (*ReconcileGitOpsCluster) VerifyArgocdNamespace

func (r *ReconcileGitOpsCluster) VerifyArgocdNamespace(argoNamespace string) bool

VerifyArgocdNamespace verifies that the given argoNamespace is a valid namspace by verifying that ArgoCD is actually installed in that namespace

Jump to

Keyboard shortcuts

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