Documentation
¶
Index ¶
- Constants
- func ComputeDeploymentStatus(depObj *appsv1.Deployment) (*kstatus.Result, error)
- func GetSecretKeys(ctx context.Context, c client.Client, sRef types.NamespacedName) map[string]bool
- func PollingPeriod(envName string, defaultValue time.Duration) time.Duration
- func ReconcilerResourceName(reconcilerName, resourceName string) string
- func RepoSyncPermissionsName() string
- func RootSyncPermissionsName() string
- func SkipForAuth(auth configsync.AuthType) bool
- type OtelReconciler
- type ReconcilerType
- type RepoSyncReconciler
- type RootSyncReconciler
Constants ¶
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
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
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" )
const ( // RootReconcilerType defines the type for a root reconciler RootReconcilerType = ReconcilerType("root") // NamespaceReconcilerType defines the type for a namespace reconciler NamespaceReconcilerType = ReconcilerType("namespace") )
const CACertPath = "/etc/ca-cert"
CACertPath is the path where the certificate is mounted.
const CACertSecretKey = "cert"
CACertSecretKey is the name of the key in the Secret's data map whose value holds the CA cert
const CACertVolume = "ca-cert"
CACertVolume is the volume name of the CA certificate.
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" )
const (
// GceNodeAskpassSidecarName is the container name of gcenode-askpass-sidecar.
GceNodeAskpassSidecarName = "gcenode-askpass-sidecar"
)
const GitCredentialVolume = "git-creds"
GitCredentialVolume is the volume name of the git credentials.
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 ¶
GetSecretKeys returns the keys that are contained in the Secret.
func PollingPeriod ¶
PollingPeriod parses the polling duration from the environment variable. If the variable is not present, it returns the default value.
func ReconcilerResourceName ¶
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 ¶
func (r *OtelReconciler) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)
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 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 ¶
func (r *RepoSyncReconciler) Reconcile(ctx context.Context, req controllerruntime.Request) (controllerruntime.Result, error)
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 ¶
func (r *RootSyncReconciler) Reconcile(ctx context.Context, req controllerruntime.Request) (controllerruntime.Result, error)
Reconcile the RootSync resource.
func (*RootSyncReconciler) SetupWithManager ¶
func (r *RootSyncReconciler) SetupWithManager(mgr controllerruntime.Manager, watchFleetMembership bool) error
SetupWithManager registers RootSync controller with reconciler-manager.