Documentation
¶
Index ¶
- Constants
- func HasChanged(action ssa.Action) bool
- func ListStaleTempDirs(root string) ([]string, error)
- func MkdirTempAbs(dir, pattern string) (string, error)
- func PurgeTempDirs(ctx context.Context, log logr.Logger, dirs []string) int
- type KustomizationReconciler
- type KustomizationReconcilerOptions
- type SourceRevisionChangePredicate
Constants ¶
const ( OCIArtifactOriginRevisionAnnotation = "org.opencontainers.image.revision" TerminalErrorMessage = "Reconciliation failed terminally due to configuration error" )
const TempDirPrefix = "kustomization-"
TempDirPrefix is the name prefix of the temporary directories the reconciler extracts source artifacts into.
Variables ¶
This section is empty.
Functions ¶
func HasChanged ¶ added in v1.0.1
HasChanged evaluates the given action and returns true if the action type matches a resource mutation or deletion.
func ListStaleTempDirs ¶ added in v1.9.5
ListStaleTempDirs returns the absolute paths of the directories in root whose name starts with TempDirPrefix. It must be called before the reconcilers start, so that every match is a leftover of a previous process that exited without running its deferred cleanup.
func MkdirTempAbs ¶
MkdirTempAbs creates a tmp dir and returns the absolute path to the dir. This is required since certain OSes like MacOS create temporary files in e.g. `/private/var`, to which `/var` is a symlink.
func PurgeTempDirs ¶ added in v1.9.5
PurgeTempDirs removes the given directories, logging every removal at info level and every failure at error level. It stops as soon as ctx is done and returns the number of directories that were removed.
Types ¶
type KustomizationReconciler ¶
type KustomizationReconciler struct {
client.Client
kuberecorder.EventRecorder
runtimeCtrl.Metrics
APIReader client.Reader
ClusterReader engine.ClusterReaderFactory
ConcurrentSSA int
ControllerName string
KubeConfigOpts runtimeClient.KubeConfigOptions
Mapper apimeta.RESTMapper
StatusManager string
CustomStageKinds map[schema.GroupKind]struct{}
DefaultServiceAccount string
DisallowedFieldManagers []string
NoCrossNamespaceRefs bool
NoRemoteBases bool
SOPSAgeSecret string
SOPSVaultConfigMap string
TokenCache *cache.TokenCache
ArtifactFetchRetries int
DependencyRequeueInterval time.Duration
AdditiveCELDependencyCheck bool
AllowExternalArtifact bool
DisableCommitStatusEvent bool
DirectSourceFetch bool
FailFast bool
GroupChangeLog bool
MigrateAPIVersion bool
StrictSubstitutions bool
}
KustomizationReconciler reconciles a Kustomization object
func (*KustomizationReconciler) SetupWithManager ¶
func (r *KustomizationReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, opts KustomizationReconcilerOptions) error
SetupWithManager sets up the controller with the Manager. It indexes the Kustomizations by the source references, and sets up watches for changes in those sources, as well as for ConfigMaps and Secrets that the Kustomizations depend on.
type KustomizationReconcilerOptions ¶
type KustomizationReconcilerOptions struct {
RateLimiter workqueue.TypedRateLimiter[reconcile.Request]
WatchConfigs bool
WatchConfigsPredicate predicate.Predicate
WatchExternalArtifacts bool
CancelHealthCheckOnRequeue bool
}
KustomizationReconcilerOptions contains options for the KustomizationReconciler.
type SourceRevisionChangePredicate ¶
func (SourceRevisionChangePredicate) Update ¶
func (SourceRevisionChangePredicate) Update(e event.UpdateEvent) bool