controllers

package
v1.13.1-rc.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 63 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GitSecretConfigKeySSH is the key at which an ssh cert is stored
	GitSecretConfigKeySSH = "ssh"
	// GitSecretConfigKeyCookieFile is the key at which the git cookiefile is stored
	GitSecretConfigKeyCookieFile = "cookie_file"
	// GitSecretConfigKeyToken is the key at which a token's value is stored
	GitSecretConfigKeyToken = "token"
	// GitSecretConfigKeyTokenUsername is the key at which a token's username is stored
	GitSecretConfigKeyTokenUsername = "username"
)

Git secret configmap key names

View Source
const (
	// HelmSecretKeyToken is the key at which a token's value is stored
	HelmSecretKeyPassword = "password"
	// HelmSecretKeyUsername is the key at which a token's username is stored
	HelmSecretKeyUsername = "username"
)

Helm secret data key names

View Source
const (

	// DefaultSyncRev is the default git revision.
	DefaultSyncRev = "HEAD"
	// DefaultSyncBranch is the default git branch.
	DefaultSyncBranch = "master"
	// DefaultSyncDir is the default sync directory.
	DefaultSyncDir = "."
	// DefaultSyncWaitSecs is the default wait seconds.
	DefaultSyncWaitSecs = 15
	// SyncDepthNoRev is the default git depth if syncing with default sync revision (`HEAD`).
	SyncDepthNoRev = "1"
	// SyncDepthRev is the default git depth if syncing with a specific sync revision (tag or hash).
	SyncDepthRev = "500"
)
View Source
const (
	// RootReconcilerType defines the type for a root reconciler
	RootReconcilerType = ReconcilerType("root")
	// NamespaceReconcilerType defines the type for a namespace reconciler
	NamespaceReconcilerType = ReconcilerType("namespace")
)
View Source
const CACertPath = "/etc/ca-cert"

CACertPath is the path where the certificate is mounted.

View Source
const CACertSecretKey = "cert"

CACertSecretKey is the name of the key in the Secret's data map whose value holds the CA cert

View Source
const CACertVolume = "ca-cert"

CACertVolume is the volume name of the CA certificate.

View Source
const (
	// GCPSAAnnotationKey is used to annotate RepoSync/RootSync controller SA when
	// spec.git.auth: gcpserviceaccount is used with Workload Identity enabled on a
	// GKE cluster.
	// https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
	GCPSAAnnotationKey = "iam.gke.io/gcp-service-account"
)
View Source
const (

	// GceNodeAskpassSidecarName is the container name of gcenode-askpass-sidecar.
	GceNodeAskpassSidecarName = "gcenode-askpass-sidecar"
)
View Source
const GitCredentialVolume = "git-creds"

GitCredentialVolume is the volume name of the git credentials.

View Source
const HelmCredentialVolume = "helm-creds"

HelmCredentialVolume is the volume name of the git credentials.

Variables

This section is empty.

Functions

func ComputeDeploymentStatus

func ComputeDeploymentStatus(depObj *appsv1.Deployment) (*kstatus.Result, error)

ComputeDeploymentStatus uses kstatus to compute the deployment status based on its conditions and other status fields.

func GetSecretKeys

func GetSecretKeys(ctx context.Context, c client.Client, sRef types.NamespacedName) map[string]bool

GetSecretKeys returns the keys that are contained in the Secret.

func PollingPeriod

func PollingPeriod(envName string, defaultValue time.Duration) time.Duration

PollingPeriod parses the polling duration from the environment variable. If the variable is not present, it returns the default value.

func ReconcilerResourceName

func ReconcilerResourceName(reconcilerName, resourceName string) string

ReconcilerResourceName returns resource name in the format <reconciler-name>-<resource-name>.

func RepoSyncPermissionsName

func RepoSyncPermissionsName() string

RepoSyncPermissionsName returns namespace reconciler permissions name. e.g. configsync.gke.io:ns-reconciler

func RootSyncPermissionsName

func RootSyncPermissionsName() string

RootSyncPermissionsName returns root reconciler permissions name. e.g. configsync.gke.io:root-reconciler

func SkipForAuth

func SkipForAuth(auth configsync.AuthType) bool

SkipForAuth returns true if the passed auth is either 'none' or 'gcenode' or 'gcpserviceaccount'.

Types

type OtelReconciler

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

OtelReconciler reconciles OpenTelemetry ConfigMaps.

func NewOtelReconciler

func NewOtelReconciler(clusterName string, client client.Client, log logr.Logger, scheme *runtime.Scheme) *OtelReconciler

NewOtelReconciler returns a new OtelReconciler.

func (*OtelReconciler) Reconcile

Reconcile the otel ConfigMap and update the Deployment annotation.

func (*OtelReconciler) SetupWithManager

func (r *OtelReconciler) SetupWithManager(mgr controllerruntime.Manager) error

SetupWithManager registers otel controller with reconciler-manager.

type ReconcilerType

type ReconcilerType string

ReconcilerType defines the type of a reconciler

type RepoSyncReconciler

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

RepoSyncReconciler reconciles a RepoSync object.

func NewRepoSyncReconciler

func NewRepoSyncReconciler(clusterName string, reconcilerPollingPeriod, hydrationPollingPeriod time.Duration, client client.Client, log logr.Logger, scheme *runtime.Scheme, allowVerticalScale bool) *RepoSyncReconciler

NewRepoSyncReconciler returns a new RepoSyncReconciler.

func (*RepoSyncReconciler) Reconcile

Reconcile the RepoSync resource.

func (*RepoSyncReconciler) SetupWithManager

func (r *RepoSyncReconciler) SetupWithManager(mgr controllerruntime.Manager, watchFleetMembership bool) error

SetupWithManager registers RepoSync controller with reconciler-manager.

type RootSyncReconciler

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

RootSyncReconciler reconciles a RootSync object

func NewRootSyncReconciler

func NewRootSyncReconciler(clusterName string, reconcilerPollingPeriod, hydrationPollingPeriod time.Duration, client client.Client, log logr.Logger, scheme *runtime.Scheme, allowVerticalScale bool) *RootSyncReconciler

NewRootSyncReconciler returns a new RootSyncReconciler.

func (*RootSyncReconciler) Reconcile

Reconcile the RootSync resource.

func (*RootSyncReconciler) SetupWithManager

func (r *RootSyncReconciler) SetupWithManager(mgr controllerruntime.Manager, watchFleetMembership bool) error

SetupWithManager registers RootSync controller with reconciler-manager.

Jump to

Keyboard shortcuts

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