controllers

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MavenArtifactVersionStashKey    reconcilers.StashKey = sourcev1alpha1.Group + "/artifact-version"
	MavenArtifactAuthSecretStashKey reconcilers.StashKey = sourcev1alpha1.Group + "/auth-secret"
	MavenArtifactHttpClientKey      reconcilers.StashKey = sourcev1alpha1.Group + "/http-client"
)
View Source
const HttpRoundTripperStashKey reconcilers.StashKey = sourcev1alpha1.Group + "/http-round-tripper"
View Source
const ImagePullSecretsStashKey reconcilers.StashKey = sourcev1alpha1.Group + "/image-pull-secrets"
View Source
const ImageRefStashKey reconcilers.StashKey = sourcev1alpha1.Group + "/image-ref"

Variables

This section is empty.

Functions

func ImageRepositoryImagePullSecretsSyncReconciler

func ImageRepositoryImagePullSecretsSyncReconciler() reconcilers.SubReconciler[*sourcev1alpha1.ImageRepository]

func ImageRepositoryPullImageSyncReconciler

func ImageRepositoryPullImageSyncReconciler(httpRootDir, httpHost string, now func() metav1.Time) reconcilers.SubReconciler[*sourcev1alpha1.ImageRepository]

func ImageRepositoryReconciler

func ImageRepositoryReconciler(c reconcilers.Config, httpRootDir, httpHost string, now func() metav1.Time, certs []Cert) *reconcilers.ResourceReconciler[*sourcev1alpha1.ImageRepository]

ImageRepositoryReconciler reconciles a ImageRepository object

func ImageRepositoryTransportSyncReconciler

func ImageRepositoryTransportSyncReconciler(certs []Cert) reconcilers.SubReconciler[*sourcev1alpha1.ImageRepository]

func MavenArtifactDownloadSyncReconciler

func MavenArtifactDownloadSyncReconciler(httpRootDir, httpHost string, now func() metav1.Time) reconcilers.SubReconciler[*sourcev1alpha1.MavenArtifact]

func MavenArtifactReconciler

func MavenArtifactReconciler(c reconcilers.Config, httpRootDir, httpHost string, now func() metav1.Time, certs []Cert) *reconcilers.ResourceReconciler[*sourcev1alpha1.MavenArtifact]

func MavenArtifactSecretsSyncReconciler

func MavenArtifactSecretsSyncReconciler(certs []Cert) reconcilers.SubReconciler[*sourcev1alpha1.MavenArtifact]

func MavenArtifactVersionSyncReconciler

func MavenArtifactVersionSyncReconciler() reconcilers.SubReconciler[*sourcev1alpha1.MavenArtifact]

MavenArtifactVersionSyncReconciler will download the Maven Metadata XML file from the artifact store and resolve the appropriate version, as per the configuration in the parent MavenArtifact object

func RetrieveHttpRoundTripper

func RetrieveHttpRoundTripper(ctx context.Context) http.RoundTripper

func RetrieveImagePullSecrets

func RetrieveImagePullSecrets(ctx context.Context) []corev1.Secret

func RetrieveImageRef

func RetrieveImageRef(ctx context.Context) string

func StashHttpRoundTripper

func StashHttpRoundTripper(ctx context.Context, transport http.RoundTripper)

func StashImagePullSecrets

func StashImagePullSecrets(ctx context.Context, pullSecrets []corev1.Secret)

func StashImageRef

func StashImageRef(ctx context.Context, image string)

Types

type ArtifactDetails

type ArtifactDetails struct {
	// ResolvedFileName: artifact filename in a remote repository
	ResolvedFileName string

	// Artifact resolved version, it could be different from spec.artifact.version. Ex: spec version LATEST can artifactversion 1.2.3
	ArtifactVersion string

	// Artifact Download URL (remote)
	ArtifactDownloadURL string
}

ArtifactDetails contains artifact's information within the remote repository

type Cert

type Cert struct {
	Path        string
	Certificate *x509.Certificate
	Raw         []byte
}

Cert encapsulates loading PEM encoded bytes for a certificate. Each Cert should use one of the available options: a file system path, an x509 certificate, or raw PEM encoded bytes

func (*Cert) Bytes

func (c *Cert) Bytes() ([]byte, error)

type MavenArtifactAuthOptionsFromSecret

type MavenArtifactAuthOptionsFromSecret struct {
	Username string
	Password string
}

type MavenResolver

type MavenResolver struct {
	// Artifact data from Spec.Artifact.Type
	Artifact sourcev1alpha1.MavenArtifactType

	// Remote repository URL path where artifact is located
	RepositoryURL string

	// Request path
	RequestPath string

	// Resolved Vesrion of the artifact
	ResolvedVersion string

	// Resolved Filename of the artifact
	ResolvedFilename string

	// Download URL for the artifact from a remote repository. DownloadURL ends in ResolvedFileName
	DownloadURL string

	// Maven Metadata xml
	MetaXML string
}

func (*MavenResolver) Resolve

func (r *MavenResolver) Resolve(ctx context.Context, client *http.Client) error

type NoopLogger

type NoopLogger struct{}

NoopLogger this logger will not print

func NewNoopLogger

func NewNoopLogger() *NoopLogger

NewNoopLogger creates a new noop logger

func (NoopLogger) Logf

func (n NoopLogger) Logf(string, ...interface{})

Logf does nothing

Jump to

Keyboard shortcuts

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