configmap

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

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

Source defines a source that can fetch CRD data from a config map.

func NewSource

func NewSource(client client.Client, next source.Contract) *Source

NewSource creates a new ConfigMap handling Source.

func (*Source) FetchCRD

func (s *Source) FetchCRD(ctx context.Context, dir string, obj *v1alpha1.Bootstrap, revision string) (string, error)

FetchCRD fetches the latest CRD if there is an update available. The returned thing is the location to the CRD. This function should not return the CRD content as it could be several megabytes large.

func (*Source) HasUpdate

func (s *Source) HasUpdate(ctx context.Context, obj *v1alpha1.Bootstrap) (bool, string, error)

HasUpdate returns true and the version if there is an update available. In case of a URL this would be the digest. This logic follows this general guide: - Fetch latest version that satisfies the constraint - Compare to last applied revision - Return true and the version if there is something to apply - Return false and empty string if there is nothing to apply.

Jump to

Keyboard shortcuts

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