agent

package
v0.1.83 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CredentialsRBACPrefix = "cluster-api-agent"
	CAPIProviderRoleName  = "capi-provider-role"
)

Variables

This section is empty.

Functions

func ReconcileCAPIProviderRole added in v0.1.80

func ReconcileCAPIProviderRole(ctx context.Context, c client.Client, createOrUpdate upsert.CreateOrUpdateFN,
	hcluster *hyperv1.HostedCluster,
	controlPlaneNamespace string) error

ReconcileCAPIProviderRole creates the RBAC Role and RoleBinding in the agent namespace so the CAPI provider can manage Agent resources. Each HostedCluster creates its own Role (named per control plane namespace) to enable proper lifecycle management and watch-based reconciliation.

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

func New added in v0.1.82

func New(payloadVersion *semver.Version) *Agent

func (Agent) CAPIProviderDeploymentSpec

func (p Agent) CAPIProviderDeploymentSpec(hcluster *hyperv1.HostedCluster, hcp *hyperv1.HostedControlPlane) (*appsv1.DeploymentSpec, error)

func (Agent) CAPIProviderPolicyRules

func (Agent) CAPIProviderPolicyRules() []rbacv1.PolicyRule

func (Agent) DeleteCredentials

func (Agent) DeleteCredentials(ctx context.Context, c client.Client,
	hc *hyperv1.HostedCluster,
	controlPlaneNamespace string) error

DeleteCredentials removes this HostedCluster's CAPI provider Role and RoleBinding. Each cluster has its own Role, so both can be safely deleted without affecting other clusters. Also cleans up legacy shared Role (without -<cpNamespace> suffix) if it exists.

func (Agent) ReconcileCAPIInfraCR

func (p Agent) ReconcileCAPIInfraCR(ctx context.Context, c client.Client, createOrUpdate upsert.CreateOrUpdateFN,
	hcluster *hyperv1.HostedCluster,
	controlPlaneNamespace string, apiEndpoint hyperv1.APIEndpoint,
) (client.Object, error)

func (Agent) ReconcileCredentials

func (p Agent) ReconcileCredentials(ctx context.Context, c client.Client, createOrUpdate upsert.CreateOrUpdateFN,
	hcluster *hyperv1.HostedCluster,
	controlPlaneNamespace string) error

func (Agent) ReconcileSecretEncryption

func (Agent) ReconcileSecretEncryption(ctx context.Context, c client.Client, createOrUpdate upsert.CreateOrUpdateFN,
	hcluster *hyperv1.HostedCluster,
	controlPlaneNamespace string,
) error

Jump to

Keyboard shortcuts

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