Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the delivery v1alpha1 API group +kubebuilder:object:generate=true +groupName=delivery.krok.app
Index ¶
- Constants
- Variables
- type Command
- type CommandList
- type CommandRef
- type CommandTemplate
- type GitLab
- type KrokCommand
- type KrokCommandList
- type KrokCommandSpec
- type KrokCommandStatus
- type KrokEvent
- func (in *KrokEvent) DeepCopy() *KrokEvent
- func (in *KrokEvent) DeepCopyInto(out *KrokEvent)
- func (in *KrokEvent) DeepCopyObject() runtime.Object
- func (in KrokEvent) GetCommandsToRun() []CommandTemplate
- func (in KrokEvent) GetConditions() []metav1.Condition
- func (in KrokEvent) GetRequeueInterval() time.Duration
- func (in *KrokEvent) GetStatusConditions() *[]metav1.Condition
- func (in *KrokEvent) SetConditions(conditions []metav1.Condition)
- type KrokEventList
- type KrokEventSpec
- type KrokEventStatus
- type KrokRepository
- type KrokRepositoryList
- type KrokRepositorySpec
- type KrokRepositoryStatus
- type Ref
Constants ¶
const ( // GITHUB based hooks GITHUB = "github" // GITLAB based hooks GITLAB = "gitlab" // GITEA based hooks GITEA = "gitea" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "delivery.krok.app", 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 )
var SupportedPlatforms = map[string]struct{}{ GITHUB: {}, GITLAB: {}, GITEA: {}, }
SupportedPlatforms a map of supported platforms by Krok.
Functions ¶
This section is empty.
Types ¶
type Command ¶
Command contains details about the outcome of a job and the name.
func (*Command) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Command.
func (*Command) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommandList ¶
type CommandList []Command
func (CommandList) DeepCopy ¶
func (in CommandList) DeepCopy() CommandList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommandList.
func (CommandList) DeepCopyInto ¶
func (in CommandList) DeepCopyInto(out *CommandList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (CommandList) Has ¶
func (c CommandList) Has(name string) bool
type CommandRef ¶
type CommandRef struct {
Ref `json:",inline"`
}
func (*CommandRef) DeepCopy ¶
func (in *CommandRef) DeepCopy() *CommandRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommandRef.
func (*CommandRef) DeepCopyInto ¶
func (in *CommandRef) DeepCopyInto(out *CommandRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommandTemplate ¶
type CommandTemplate struct { Spec KrokCommandSpec `json:"spec"` Name string `json:"name"` }
CommandTemplate contains command specifications.
func (*CommandTemplate) DeepCopy ¶
func (in *CommandTemplate) DeepCopy() *CommandTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommandTemplate.
func (*CommandTemplate) DeepCopyInto ¶
func (in *CommandTemplate) DeepCopyInto(out *CommandTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GitLab ¶
type GitLab struct { // ProjectID is an optional ID which defines a project in Gitlab. ProjectID int `json:"projectID,omitempty"` }
GitLab contains GitLab specific settings.
func (*GitLab) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitLab.
func (*GitLab) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KrokCommand ¶
type KrokCommand struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec KrokCommandSpec `json:"spec,omitempty"` Status KrokCommandStatus `json:"status,omitempty"` }
KrokCommand is the Schema for the krokcommands API
func (*KrokCommand) DeepCopy ¶
func (in *KrokCommand) DeepCopy() *KrokCommand
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KrokCommand.
func (*KrokCommand) DeepCopyInto ¶
func (in *KrokCommand) DeepCopyInto(out *KrokCommand)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KrokCommand) DeepCopyObject ¶
func (in *KrokCommand) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KrokCommandList ¶
type KrokCommandList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []KrokCommand `json:"items"` }
KrokCommandList contains a list of KrokCommand
func (*KrokCommandList) DeepCopy ¶
func (in *KrokCommandList) DeepCopy() *KrokCommandList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KrokCommandList.
func (*KrokCommandList) DeepCopyInto ¶
func (in *KrokCommandList) DeepCopyInto(out *KrokCommandList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KrokCommandList) DeepCopyObject ¶
func (in *KrokCommandList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KrokCommandSpec ¶
type KrokCommandSpec struct { // ReadInputFromSecret if defined, the command will take a list of key/value pairs in a secret // and apply them as arguments to the command. ReadInputFromSecrets []Ref `json:"readInputFromSecrets,omitempty"` // CommandHasOutputToWrite if defined, it signals the underlying Job, to put its output into a generated // and created secret. CommandHasOutputToWrite bool `json:"commandHasOutputToWrite,omitempty"` // Schedule of the command. // example: 0 * * * * // follows cron job syntax. // +optional Schedule string `json:"schedule,omitempty"` // Image defines the image name and tag of the command // example: krok-hook/slack-notification:v0.0.1 Image string `json:"image"` // Enabled defines if this command can be executed or not. // +optional Enabled bool `json:"enabled"` // Platforms holds all the platforms which this command supports. // +optional Platforms []string `json:"platforms,omitempty"` // Dependencies defines a list of command names that this command depends on. Dependencies []string `json:"dependencies,omitempty"` }
KrokCommandSpec defines the desired state of KrokCommand
func (*KrokCommandSpec) DeepCopy ¶
func (in *KrokCommandSpec) DeepCopy() *KrokCommandSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KrokCommandSpec.
func (*KrokCommandSpec) DeepCopyInto ¶
func (in *KrokCommandSpec) DeepCopyInto(out *KrokCommandSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KrokCommandStatus ¶
type KrokCommandStatus struct{}
KrokCommandStatus defines the observed state of KrokCommand
func (*KrokCommandStatus) DeepCopy ¶
func (in *KrokCommandStatus) DeepCopy() *KrokCommandStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KrokCommandStatus.
func (*KrokCommandStatus) DeepCopyInto ¶
func (in *KrokCommandStatus) DeepCopyInto(out *KrokCommandStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KrokEvent ¶
type KrokEvent struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec KrokEventSpec `json:"spec,omitempty"` Status KrokEventStatus `json:"status,omitempty"` }
KrokEvent is the Schema for the krokevents API
func (*KrokEvent) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KrokEvent.
func (*KrokEvent) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KrokEvent) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (KrokEvent) GetCommandsToRun ¶
func (in KrokEvent) GetCommandsToRun() []CommandTemplate
GetCommandsToRun returns a list of commands that needs to be executed.
func (KrokEvent) GetConditions ¶
GetConditions returns the status conditions of the object.
func (KrokEvent) GetRequeueInterval ¶
GetRequeueInterval parses the Interval to a duration. Exp.: 10m5s.
func (*KrokEvent) GetStatusConditions ¶
GetStatusConditions returns a pointer to the Status.Conditions slice. Deprecated: use GetConditions instead.
func (*KrokEvent) SetConditions ¶
SetConditions sets the status conditions on the object.
type KrokEventList ¶
type KrokEventList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []KrokEvent `json:"items"` }
KrokEventList contains a list of KrokEvent
func (*KrokEventList) DeepCopy ¶
func (in *KrokEventList) DeepCopy() *KrokEventList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KrokEventList.
func (*KrokEventList) DeepCopyInto ¶
func (in *KrokEventList) DeepCopyInto(out *KrokEventList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KrokEventList) DeepCopyObject ¶
func (in *KrokEventList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KrokEventSpec ¶
type KrokEventSpec struct { // Payload is the received event payload from the provider. Payload string `json:"payload"` // Type defines the event type such as: push, pull, ping... Type string `json:"type"` // CommandsToRun contains a list of commands that this event needs to execute. CommandsToRun []CommandTemplate `json:"commandsToRun"` // Interval defines a time.Duration at which this event should reconcile itself. Interval string `json:"interval"` }
KrokEventSpec defines the desired state of KrokEvent
func (*KrokEventSpec) DeepCopy ¶
func (in *KrokEventSpec) DeepCopy() *KrokEventSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KrokEventSpec.
func (*KrokEventSpec) DeepCopyInto ¶
func (in *KrokEventSpec) DeepCopyInto(out *KrokEventSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KrokEventStatus ¶
type KrokEventStatus struct { // FailedJobs contains command runs which failed for a given event. // +optional FailedCommands CommandList `json:"failedCommands,omitempty"` // SucceededJobs contains command runs which succeeded for a given event. // +optional SucceededCommands CommandList `json:"succeededCommands,omitempty"` // RunningCommands contains commands which are currently in-progress. // +optional RunningCommands map[string]bool `json:"runningCommands,omitempty"` // ObservedGeneration is the last reconciled generation. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` }
KrokEventStatus defines the observed state of KrokEvent
func (*KrokEventStatus) DeepCopy ¶
func (in *KrokEventStatus) DeepCopy() *KrokEventStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KrokEventStatus.
func (*KrokEventStatus) DeepCopyInto ¶
func (in *KrokEventStatus) DeepCopyInto(out *KrokEventStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KrokRepository ¶
type KrokRepository struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec KrokRepositorySpec `json:"spec,omitempty"` Status KrokRepositoryStatus `json:"status,omitempty"` }
KrokRepository is the Schema for the krokrepositories API
func (*KrokRepository) DeepCopy ¶
func (in *KrokRepository) DeepCopy() *KrokRepository
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KrokRepository.
func (*KrokRepository) DeepCopyInto ¶
func (in *KrokRepository) DeepCopyInto(out *KrokRepository)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KrokRepository) DeepCopyObject ¶
func (in *KrokRepository) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KrokRepositoryList ¶
type KrokRepositoryList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []KrokRepository `json:"items"` }
KrokRepositoryList contains a list of KrokRepository
func (*KrokRepositoryList) DeepCopy ¶
func (in *KrokRepositoryList) DeepCopy() *KrokRepositoryList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KrokRepositoryList.
func (*KrokRepositoryList) DeepCopyInto ¶
func (in *KrokRepositoryList) DeepCopyInto(out *KrokRepositoryList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KrokRepositoryList) DeepCopyObject ¶
func (in *KrokRepositoryList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KrokRepositorySpec ¶
type KrokRepositorySpec struct { // URL of the repository. // +kubebuilder:validation:Required URL string `json:"url"` // Platform defines on which platform this repository is in. Exp.: github, gitlab, gitea... // +kubebuilder:validation:Required Platform string `json:"platform"` // GitLab specific settings. // +optional GitLab *GitLab `json:"gitLab,omitempty"` // AuthSecretRef contains the ref to the secret containing authentication data for this repository. // +kubebuilder:validation:Required AuthSecretRef Ref `json:"authSecretRef"` // ProviderTokenSecretRef contains the ref to the secret containing authentication data for the provider of this // repository. For example, GitHub token, or a Gitlab token... // +kubebuilder:validation:Required ProviderTokenSecretRef Ref `json:"providerTokenSecretRef"` // Commands contains all the commands which this repository is attached to. // +optional Commands []CommandRef `json:"commands,omitempty"` // Events contains all events that this repository subscribes to. // Format is // events: // github: // - push // - issue_comment // gitlab: // - note Events map[string][]string `json:"events,omitempty"` // EventReconcileInterval can be set to define how often a created KrokEvent should requeue itself. EventReconcileInterval string `json:"eventReconcileInterval,omitempty"` }
KrokRepositorySpec defines the desired state of KrokRepository
func (*KrokRepositorySpec) DeepCopy ¶
func (in *KrokRepositorySpec) DeepCopy() *KrokRepositorySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KrokRepositorySpec.
func (*KrokRepositorySpec) DeepCopyInto ¶
func (in *KrokRepositorySpec) DeepCopyInto(out *KrokRepositorySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KrokRepositoryStatus ¶
type KrokRepositoryStatus struct { // A Unique URL for this given repository. Generated upon creation and saved in Status field. UniqueURL string `json:"uniqueURL,omitempty"` // Events contains run outputs for command runs that have been executed for this Repository. // This holds the last 10 outcomes. // TODO: Update this field. Events KrokEventList `json:"events,omitempty"` }
KrokRepositoryStatus defines the observed state of KrokRepository
func (*KrokRepositoryStatus) DeepCopy ¶
func (in *KrokRepositoryStatus) DeepCopy() *KrokRepositoryStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KrokRepositoryStatus.
func (*KrokRepositoryStatus) DeepCopyInto ¶
func (in *KrokRepositoryStatus) DeepCopyInto(out *KrokRepositoryStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Ref ¶
Ref points to a secret which contains access information for the repository.
func (*Ref) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ref.
func (*Ref) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.