configuration

package
v0.1.88 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Hosted cluster configuration

The configuration owner reconciles foundation and global configuration policy. Shared manifest constructors and globalconfig helper APIs remain in their original packages.

Foundation Reconcile retains its four stages and narrow ReconcileParams. Global objects and image policy use ReconcileGlobal and ReconcileImagePolicy. GlobalConfigParams contains only the facts consumed by shared policy helpers; its private HCP compatibility snapshot is copied and never acts as a controller context. Proxy and observed configuration have independent inputs. Install metadata accepts a lazy component-version accessor so existing installed versions do not require a lookup.

HostedCluster and ControlPlane are distinct adapters over existing clients and upsert. They share only transport mechanics: resource selection and mutation stay in this package. Observed Build/Project flow from the hosted cluster to owned control-plane ConfigMaps; proxy CA data flows in the opposite direction, preserving existing cleanup semantics.

The root retains shared HCP, pull-secret and release loading, logging, error aggregation, HCP reconciliation status, and these nonadjacent phase positions:

  • Foundation CRDs, endpoints, admission policies, install metadata, alerts.
  • Foundation ClusterVersion and ClusterOperators, global configuration, foundation namespaces, RBAC.
  • Proxy user CA after pull-secret propagation and before OAuth CA in networking/secrets.
  • Observed configuration after kubelet, storage, CSI and recycler resources in storage/misc.

Global ordering is Infrastructure, DNS, Image, Ingress, Network, TrustedCA, Proxy, image policy, install-config YAML, CloudCredential, Authentication and APIServer. Failures preserve existing wrappers and continuation; observed errors remain individual entries in the root aggregate. Infrastructure status belongs to object policy, while HCP status and watch registration stay in the root. No policy is added for unrelated domains.

Direct policy tests live here; root phase/error/status regression tests remain in resources.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reconcile

func Reconcile(ctx context.Context, hostedClusterClient client.Client, createOrUpdate upsert.CreateOrUpdateFN, params ReconcileParams, stage Stage) error

func ReconcileGlobal added in v0.1.88

func ReconcileGlobal(ctx context.Context, hosted HostedCluster, controlPlane ControlPlane, hcp *hyperv1.HostedControlPlane) error

func ReconcileImagePolicy added in v0.1.88

func ReconcileImagePolicy(ctx context.Context, hosted HostedCluster, sources []hyperv1.ImageContentSource) error

func ReconcileInstallMetadata added in v0.1.88

func ReconcileInstallMetadata(ctx context.Context, hosted HostedCluster, componentVersions func() (map[string]string, error)) error

ReconcileInstallMetadata reconciles the install metadata ConfigMap, recording the invoker and, when the version is not yet set, the release version.

Callers must provide a callable componentVersions accessor whenever initial version population can occur. The lookup is deliberately lazy: an existing "version" key avoids calling the accessor. A nil accessor is not valid when that key is absent; no eager lookup or alternative nil/error policy is provided.

func ReconcileObserved added in v0.1.88

func ReconcileObserved(ctx context.Context, hosted HostedCluster, controlPlane ControlPlane, params ObservedConfigParams) error

func ReconcileProxyCABundle added in v0.1.88

func ReconcileProxyCABundle(ctx context.Context, hosted HostedCluster, controlPlane ControlPlane, params ProxyParams) error

func ReconcileProxyTrustedCA added in v0.1.88

func ReconcileProxyTrustedCA(ctx context.Context, hosted HostedCluster, controlPlane ControlPlane, params ProxyParams) error

Types

type ControlPlane added in v0.1.88

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

func NewControlPlane added in v0.1.88

func NewControlPlane(target client.Client, createOrUpdate upsert.CreateOrUpdateFN) ControlPlane

type HostedCluster added in v0.1.88

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

func NewHostedCluster added in v0.1.88

func NewHostedCluster(target client.Client, createOrUpdate upsert.CreateOrUpdateFN) HostedCluster

type ObservedConfigParams added in v0.1.88

type ObservedConfigParams struct {
	Namespace string
	OwnerRef  config.OwnerRef
}

type ProxyParams added in v0.1.88

type ProxyParams struct {
	Namespace string
	TrustedCA string
}

func ProxyParamsFor added in v0.1.88

func ProxyParamsFor(namespace string, configuration *hyperv1.ClusterConfiguration) ProxyParams

type ReconcileParams

type ReconcileParams struct {
	ClusterID                  string
	UpdateService              configv1.URL
	Channel                    string
	Capabilities               *hyperv1.Capabilities
	Versions                   map[string]string
	ControlPlaneReleaseVersion semver.Version
}

type Stage

type Stage int
const (
	CRDs Stage = iota
	ClusterVersion
	ClusterOperators
	Namespaces
)

Jump to

Keyboard shortcuts

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