v1alpha1

package
v0.0.0-...-9e8fcde Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the polling v1alpha1 API group +kubebuilder:object:generate=true +groupName=polling.gitops.tools

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "polling.gitops.tools", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type AuthSecret

type AuthSecret struct {
	// This is a local reference to the named secret to fetch.
	// This secret is expected to have a "token" key with a valid GitHub/GitLab
	// auth token.
	SecretRef corev1.LocalObjectReference `json:"secretRef,omitempty"`
	//+kubebuilder:default:="token"
	Key string `json:"key,omitempty"`
}

AuthSecret references a secret for authenticating the request.

func (*AuthSecret) DeepCopy

func (in *AuthSecret) DeepCopy() *AuthSecret

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthSecret.

func (*AuthSecret) DeepCopyInto

func (in *AuthSecret) DeepCopyInto(out *AuthSecret)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PollStatus

type PollStatus struct {
	Ref  string `json:"ref"`
	SHA  string `json:"sha"`
	ETag string `json:"etag"`
}

PollStatus represents the last polled state of the repo.

func (*PollStatus) DeepCopy

func (in *PollStatus) DeepCopy() *PollStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PollStatus.

func (*PollStatus) DeepCopyInto

func (in *PollStatus) DeepCopyInto(out *PollStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PollStatus) Equal

func (p PollStatus) Equal(o PollStatus) bool

Equal returns true if two PollStatus values match.

type PolledRepository

type PolledRepository struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PolledRepositorySpec   `json:"spec,omitempty"`
	Status PolledRepositoryStatus `json:"status,omitempty"`
}

PolledRepository is the Schema for the polledrepositories API

func (*PolledRepository) DeepCopy

func (in *PolledRepository) DeepCopy() *PolledRepository

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolledRepository.

func (*PolledRepository) DeepCopyInto

func (in *PolledRepository) DeepCopyInto(out *PolledRepository)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PolledRepository) DeepCopyObject

func (in *PolledRepository) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PolledRepositoryList

type PolledRepositoryList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PolledRepository `json:"items"`
}

PolledRepositoryList contains a list of PolledRepository

func (*PolledRepositoryList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolledRepositoryList.

func (*PolledRepositoryList) DeepCopyInto

func (in *PolledRepositoryList) DeepCopyInto(out *PolledRepositoryList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PolledRepositoryList) DeepCopyObject

func (in *PolledRepositoryList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PolledRepositorySpec

type PolledRepositorySpec struct {
	// URL is the Git repository URL to poll.
	// +kubebuilder:validation:Pattern="^https://"
	// +required
	URL string `json:"url"`

	// Ref is the branch or tag to poll within the repository.
	// +required
	Ref string `json:"ref,omitempty"`

	// Auth provides an optional secret for polling the repository.
	// +optional
	Auth *AuthSecret `json:"auth,omitempty"`

	// Type is the protocol to use to access the repository.
	// +kubebuilder:validation:Enum=github;gitlab
	Type RepoType `json:"type,omitempty"`

	// Frequency is how often to poll this repository.
	//+kubebuilder:default:="5m"
	// +required
	Frequency *metav1.Duration `json:"frequency,omitempty"`

	// The notification URL, this is where CloudEvents are dispatched to for
	// this repository.
	// +kubebuilder:validation:Pattern="^(http|https)://"
	// +required
	Endpoint string `json:"endpoint"`
}

PolledRepositorySpec defines the desired state of PolledRepository

func (*PolledRepositorySpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolledRepositorySpec.

func (*PolledRepositorySpec) DeepCopyInto

func (in *PolledRepositorySpec) DeepCopyInto(out *PolledRepositorySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PolledRepositoryStatus

type PolledRepositoryStatus struct {
	PollStatus         `json:"pollStatus,omitempty"`
	LastError          string `json:"lastError,omitempty"`
	ObservedGeneration int64  `json:"observedGeneration,omitempty"`
}

PolledRepositoryStatus defines the observed state of PolledRepository

func (*PolledRepositoryStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolledRepositoryStatus.

func (*PolledRepositoryStatus) DeepCopyInto

func (in *PolledRepositoryStatus) DeepCopyInto(out *PolledRepositoryStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RepoType

type RepoType string

RepoType defines the protocol to use to talk to the upstream server. +kubebuilder:validation:Enum=github;gitlab

const (
	GitHub RepoType = "github"
	GitLab RepoType = "gitlab"
)

Jump to

Keyboard shortcuts

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