v1

package
v0.1.60 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=gitjob.cattle.io

+k8s:deepcopy-gen=package +groupName=gitjob.cattle.io

+k8s:deepcopy-gen=package +groupName=gitjob.cattle.io

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var (
	GitJobResourceName = "gitjobs"
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: gitjob.GroupName, Version: "v1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Credential

type Credential struct {
	// CABundle is a PEM encoded CA bundle which will be used to validate the repo's certificate.
	CABundle []byte `json:"caBundle,omitempty"`

	// InsecureSkipTLSverify will use insecure HTTPS to download the repo's index.
	InsecureSkipTLSverify bool `json:"insecureSkipTLSVerify,omitempty"`

	// Secret Name of git credential
	ClientSecretName string `json:"clientSecretName,omitempty"`
}

func (*Credential) DeepCopy

func (in *Credential) DeepCopy() *Credential

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

func (*Credential) DeepCopyInto

func (in *Credential) DeepCopyInto(out *Credential)

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

type GitEvent

type GitEvent struct {
	// The latest commit SHA received from git repo
	Commit string `json:"commit,omitempty" column:"name=COMMIT,type=string,jsonpath=.status.commit"`

	// Last executed commit SHA by gitjob controller
	LastExecutedCommit string `json:"lastExecutedCommit,omitempty"`

	// Last sync time
	LastSyncedTime metav1.Time `json:"lastSyncedTime,omitempty"`

	GithubMeta
}

func (*GitEvent) DeepCopy

func (in *GitEvent) DeepCopy() *GitEvent

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

func (*GitEvent) DeepCopyInto

func (in *GitEvent) DeepCopyInto(out *GitEvent)

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

type GitInfo

type GitInfo struct {
	// Git credential metadata
	Credential

	// Git provider model to fetch commit. Can be polling(regular git fetch)/webhook(github webhook)
	Provider string `json:"provider,omitempty"`

	// Git repo URL
	Repo string `json:"repo,omitempty" column:"name=REPO,type=string,jsonpath=.spec.git.repo"`

	// Git commit SHA. If specified, controller will use this SHA instead of auto-fetching commit
	Revision string `json:"revision,omitempty"`

	// Git branch to watch. Default to master
	Branch string `json:"branch,omitempty" column:"name=BRANCH,type=string,jsonpath=.spec.git.branch"`

	// Semver matching for incoming tag event
	OnTag string `json:"onTag,omitempty"`
}

func (*GitInfo) DeepCopy

func (in *GitInfo) DeepCopy() *GitInfo

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

func (*GitInfo) DeepCopyInto

func (in *GitInfo) DeepCopyInto(out *GitInfo)

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

type GitJob

type GitJob struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              GitJobSpec   `json:"spec,omitempty"`
	Status            GitJobStatus `json:"status,omitempty"`
}

func NewGitJob

func NewGitJob(namespace, name string, obj GitJob) *GitJob

func (*GitJob) DeepCopy

func (in *GitJob) DeepCopy() *GitJob

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

func (*GitJob) DeepCopyInto

func (in *GitJob) DeepCopyInto(out *GitJob)

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

func (*GitJob) DeepCopyObject

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

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

type GitJobList

type GitJobList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []GitJob `json:"items"`
}

GitJobList is a list of GitJob resources

func (*GitJobList) DeepCopy

func (in *GitJobList) DeepCopy() *GitJobList

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

func (*GitJobList) DeepCopyInto

func (in *GitJobList) DeepCopyInto(out *GitJobList)

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

func (*GitJobList) DeepCopyObject

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

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

type GitJobSpec

type GitJobSpec struct {
	// Git metadata information
	Git GitInfo `json:"git,omitempty"`

	// Job template applied to git commit
	JobSpec v1.JobSpec `json:"jobSpec,omitempty"`

	// define interval(in seconds) for controller to sync repo and fetch commits
	SyncInterval int `json:"syncInterval,omitempty"`

	// ForceUpdate is a timestamp where can be set to do a force re-sync. If it is after the last synced timestamp and before the current timestamp it will be re-synced
	ForceUpdateGeneration int64 `json:"forceUpdateGeneration,omitempty"`
}

func (*GitJobSpec) DeepCopy

func (in *GitJobSpec) DeepCopy() *GitJobSpec

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

func (*GitJobSpec) DeepCopyInto

func (in *GitJobSpec) DeepCopyInto(out *GitJobSpec)

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

type GitJobStatus

type GitJobStatus struct {
	GitEvent

	// Status of job launched by controller
	JobStatus string `json:"jobStatus,omitempty" column:"name=JOBSTATUS,type=string,jsonpath=.status.jobStatus"`

	// Generation of status to indicate if resource is out-of-sync
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Update generation is the force update generation if spec.forceUpdateGeneration is set
	UpdateGeneration int64 `json:"updateGeneration,omitempty"`

	// Condition of the resource
	Conditions []genericcondition.GenericCondition `json:"conditions,omitempty"`
}

func (*GitJobStatus) DeepCopy

func (in *GitJobStatus) DeepCopy() *GitJobStatus

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

func (*GitJobStatus) DeepCopyInto

func (in *GitJobStatus) DeepCopyInto(out *GitJobStatus)

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

type GithubMeta

type GithubMeta struct {
	// Github webhook ID. Internal use only. If not empty, means a webhook is created along with this CR
	HookID string `json:"hookId,omitempty"`

	// Github webhook validation token to validate requests that are only coming from github
	ValidationToken string `json:"secretToken,omitempty"`

	// Last received github webhook event
	Event string `json:"event,omitempty"`
}

func (*GithubMeta) DeepCopy

func (in *GithubMeta) DeepCopy() *GithubMeta

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

func (*GithubMeta) DeepCopyInto

func (in *GithubMeta) DeepCopyInto(out *GithubMeta)

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

Jump to

Keyboard shortcuts

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