Documentation
¶
Overview ¶
Copyright 2026 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2026 The Flux authors ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2026 The Flux authors ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReconcileFormat ¶
ReconcileFormat prepares the storage root for the selected storage backend. Switching backends wipes the rebuildable tag cache before either backend is initialized.
Types ¶
type Database ¶
type Database interface {
DatabaseWriter
DatabaseReader
}
Database combines tag read and write operations.
type DatabaseReader ¶
type DatabaseReader interface {
Tags(ctx context.Context, repo RepoIdentity) (tags []string, err error)
}
DatabaseReader implementations get the stored set of tags for an image repository.
If no tags are available for the repo, then implementations should return an empty set of tags.
type DatabaseWriter ¶
type DatabaseWriter interface {
SetTags(ctx context.Context, repo RepoIdentity, tags []string) (revision string, err error)
Delete(ctx context.Context, repo RepoIdentity) error
}
DatabaseWriter implementations record the tags for an image repository.
type FilesystemDatabase ¶
type FilesystemDatabase struct {
// contains filtered or unexported fields
}
FilesystemDatabase stores image tags per ImageRepository on the local filesystem.
func NewFilesystemDatabase ¶
func NewFilesystemDatabase(storage *artifactstorage.Storage, compressionThreshold int) *FilesystemDatabase
NewFilesystemDatabase creates a filesystem-backed tag database.
func (*FilesystemDatabase) Delete ¶
func (d *FilesystemDatabase) Delete(ctx context.Context, repo RepoIdentity) error
Delete implements the DatabaseWriter interface, deleting tags for the repo.
func (*FilesystemDatabase) SetTags ¶
func (d *FilesystemDatabase) SetTags(ctx context.Context, repo RepoIdentity, tags []string) (string, error)
SetTags implements the DatabaseWriter interface, recording tags for the repo.
func (*FilesystemDatabase) Tags ¶
func (d *FilesystemDatabase) Tags(ctx context.Context, repo RepoIdentity) ([]string, error)
Tags implements the DatabaseReader interface, fetching tags for the repo.
type FilesystemGarbageCollector ¶
type FilesystemGarbageCollector struct {
Interval time.Duration
// contains filtered or unexported fields
}
FilesystemGarbageCollector removes tag files for ImageRepository objects no longer handled by this controller instance.
func NewFilesystemGarbageCollector ¶
func NewFilesystemGarbageCollector(name string, storage *artifactstorage.Storage, client client.Client, interval time.Duration) *FilesystemGarbageCollector
NewFilesystemGarbageCollector creates a FilesystemGarbageCollector.
func (*FilesystemGarbageCollector) NeedLeaderElection ¶
func (gc *FilesystemGarbageCollector) NeedLeaderElection() bool
NeedLeaderElection ensures the GC runs only on the elected leader.
type RepoIdentity ¶
RepoIdentity identifies an ImageRepository for tag storage. Implementations choose which fields form their storage key:
- BadgerDatabase keys by CanonicalName.
- FilesystemDatabase keys by Namespace and Name.