Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the platform v1 API group. +kubebuilder:object:generate=true +groupName=platform.publishing.service.gov.uk
Index ¶
- Constants
- Variables
- type JobRequest
- func (in *JobRequest) DeepCopy() *JobRequest
- func (in *JobRequest) DeepCopyInto(out *JobRequest)
- func (in *JobRequest) DeepCopyObject() runtime.Object
- func (jr *JobRequest) GetRequestedBy() (string, error)
- func (jr *JobRequest) HasBeenApproved() bool
- func (jr *JobRequest) HasBeenRejected() bool
- func (jr *JobRequest) HasBeenReviewed() bool
- func (jr *JobRequest) WasReviewedBy(review *JobRequestReview) bool
- type JobRequestContainerFrom
- type JobRequestList
- type JobRequestPodSpecFrom
- type JobRequestReview
- type JobRequestReviewList
- type JobRequestReviewSpec
- type JobRequestReviewState
- type JobRequestReviewStatus
- type JobRequestSpec
- type JobRequestState
- type JobRequestStatus
- type UserIdentity
Constants ¶
const ( JobRequestPending JobRequestState = "Pending" JobRequestApproved JobRequestState = "Approved" JobRequestRejected JobRequestState = "Rejected" JobRequestStarted JobRequestState = "Started" JobRequestComplete JobRequestState = "Complete" JobRequestFailed JobRequestState = "Failed" JobRequestMalformed JobRequestState = "Malformed" JobRequestRequestedByAnnotation string = "platform.publishing.service.gov.uk/requested-by" )
const ( JobRequestReviewApproved JobRequestReviewState = "Approved" JobRequestReviewRejected JobRequestReviewState = "Rejected" JobRequestReviewMalformed JobRequestReviewState = "JobRequestMalformed" JobRequestReviewNotFound JobRequestReviewState = "JobRequestNotFound" JobRequestReviewConflict JobRequestReviewState = "Conflict" JobRequestReviewReviewedByAnnotation string = "platform.publishing.service.gov.uk/reviewed-by" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects. // This name is used by applyconfiguration generators (e.g. controller-gen). SchemeGroupVersion = schema.GroupVersion{Group: "platform.publishing.service.gov.uk", Version: "v1"} // GroupVersion is an alias for SchemeGroupVersion, for backward compatibility. GroupVersion = SchemeGroupVersion // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type JobRequest ¶
type JobRequest struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// spec defines the desired state of JobRequest
// +required
Spec JobRequestSpec `json:"spec"`
// status defines the observed state of JobRequest
// +optional
Status JobRequestStatus `json:"status,omitzero"`
}
JobRequest represents a request to run a command in the cluster.
func (*JobRequest) DeepCopy ¶
func (in *JobRequest) DeepCopy() *JobRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobRequest.
func (*JobRequest) DeepCopyInto ¶
func (in *JobRequest) DeepCopyInto(out *JobRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*JobRequest) DeepCopyObject ¶
func (in *JobRequest) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*JobRequest) GetRequestedBy ¶ added in v0.0.8
func (jr *JobRequest) GetRequestedBy() (string, error)
func (*JobRequest) HasBeenApproved ¶ added in v0.0.7
func (jr *JobRequest) HasBeenApproved() bool
func (*JobRequest) HasBeenRejected ¶ added in v0.0.7
func (jr *JobRequest) HasBeenRejected() bool
func (*JobRequest) HasBeenReviewed ¶ added in v0.0.7
func (jr *JobRequest) HasBeenReviewed() bool
func (*JobRequest) WasReviewedBy ¶ added in v0.0.7
func (jr *JobRequest) WasReviewedBy(review *JobRequestReview) bool
type JobRequestContainerFrom ¶
type JobRequestContainerFrom struct {
// Where to get the pod spec for the job from.
PodSpecFrom JobRequestPodSpecFrom `json:"podSpecFrom"`
// The name of the container in the pod spec to use for the job.
ContainerName string `json:"containerName"`
}
func (*JobRequestContainerFrom) DeepCopy ¶
func (in *JobRequestContainerFrom) DeepCopy() *JobRequestContainerFrom
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobRequestContainerFrom.
func (*JobRequestContainerFrom) DeepCopyInto ¶
func (in *JobRequestContainerFrom) DeepCopyInto(out *JobRequestContainerFrom)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JobRequestList ¶
type JobRequestList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []JobRequest `json:"items"`
}
JobRequestList contains a list of JobRequest
func (*JobRequestList) DeepCopy ¶
func (in *JobRequestList) DeepCopy() *JobRequestList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobRequestList.
func (*JobRequestList) DeepCopyInto ¶
func (in *JobRequestList) DeepCopyInto(out *JobRequestList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*JobRequestList) DeepCopyObject ¶
func (in *JobRequestList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type JobRequestPodSpecFrom ¶
type JobRequestPodSpecFrom struct {
// +kubebuilder:validation:Enum=apps/v1;
Group string `json:"group"`
// +kubebuilder:validation:Enum=Deployment;
Kind string `json:"kind"`
// Resource name which contains the pod spec to use for the job.
Name string `json:"name"`
}
func (*JobRequestPodSpecFrom) DeepCopy ¶
func (in *JobRequestPodSpecFrom) DeepCopy() *JobRequestPodSpecFrom
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobRequestPodSpecFrom.
func (*JobRequestPodSpecFrom) DeepCopyInto ¶
func (in *JobRequestPodSpecFrom) DeepCopyInto(out *JobRequestPodSpecFrom)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JobRequestReview ¶
type JobRequestReview struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// spec defines the desired state of JobRequestReview
// +required
Spec JobRequestReviewSpec `json:"spec"`
// status defines the observed state of JobRequestReview
// +optional
Status JobRequestReviewStatus `json:"status,omitzero"`
}
JobRequestReview represents a decision to run a requested job in the cluster
func (*JobRequestReview) DeepCopy ¶
func (in *JobRequestReview) DeepCopy() *JobRequestReview
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobRequestReview.
func (*JobRequestReview) DeepCopyInto ¶
func (in *JobRequestReview) DeepCopyInto(out *JobRequestReview)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*JobRequestReview) DeepCopyObject ¶
func (in *JobRequestReview) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*JobRequestReview) GetReviewedBy ¶ added in v0.0.8
func (jrr *JobRequestReview) GetReviewedBy() (string, error)
type JobRequestReviewList ¶
type JobRequestReviewList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []JobRequestReview `json:"items"`
}
JobRequestReviewList contains a list of JobRequestReview
func (*JobRequestReviewList) DeepCopy ¶
func (in *JobRequestReviewList) DeepCopy() *JobRequestReviewList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobRequestReviewList.
func (*JobRequestReviewList) DeepCopyInto ¶
func (in *JobRequestReviewList) DeepCopyInto(out *JobRequestReviewList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*JobRequestReviewList) DeepCopyObject ¶
func (in *JobRequestReviewList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type JobRequestReviewSpec ¶
type JobRequestReviewSpec struct {
// Name of the JobRequest resource being reviewed.
JobRequestName string `json:"jobRequestName"`
// +kubebuilder:validation:Enum=Approved;Rejected
Decision string `json:"decision"`
// A description of the review decision.
// +optional
Description string `json:"description,omitempty"`
}
JobRequestReviewSpec defines the desired state of JobRequestReview
func (*JobRequestReviewSpec) DeepCopy ¶
func (in *JobRequestReviewSpec) DeepCopy() *JobRequestReviewSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobRequestReviewSpec.
func (*JobRequestReviewSpec) DeepCopyInto ¶
func (in *JobRequestReviewSpec) DeepCopyInto(out *JobRequestReviewSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JobRequestReviewState ¶ added in v0.0.5
type JobRequestReviewState string
type JobRequestReviewStatus ¶
type JobRequestReviewStatus struct {
// +kubebuilder:validation:Enum=Approved;Rejected;JobRequestMalformed;JobRequestNotFound;Conflict
State JobRequestReviewState `json:"state,omitempty"`
}
JobRequestReviewStatus defines the observed state of JobRequestReview.
func (*JobRequestReviewStatus) DeepCopy ¶
func (in *JobRequestReviewStatus) DeepCopy() *JobRequestReviewStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobRequestReviewStatus.
func (*JobRequestReviewStatus) DeepCopyInto ¶
func (in *JobRequestReviewStatus) DeepCopyInto(out *JobRequestReviewStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JobRequestSpec ¶
type JobRequestSpec struct {
// Where to get the container and pod spec for the job from.
ContainerFrom JobRequestContainerFrom `json:"containerFrom"`
// Command to run in the job.
Command string `json:"command"`
// Arguments to pass to the command.
Args []string `json:"args"`
}
JobRequestSpec defines the desired state of JobRequest
func (*JobRequestSpec) DeepCopy ¶
func (in *JobRequestSpec) DeepCopy() *JobRequestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobRequestSpec.
func (*JobRequestSpec) DeepCopyInto ¶
func (in *JobRequestSpec) DeepCopyInto(out *JobRequestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JobRequestState ¶ added in v0.0.5
type JobRequestState string
type JobRequestStatus ¶
type JobRequestStatus struct {
// Name of the Kubernetes Job created for this job request.
JobName string `json:"jobName,omitempty"`
// +kubebuilder:validation:Enum=Pending;Approved;Rejected;Started;Complete;Failed;Malformed
State JobRequestState `json:"state,omitempty"`
// Name of the JobRequestReview resource that reviewed this job request.
ReviewName string `json:"reviewName,omitempty"`
}
func (*JobRequestStatus) DeepCopy ¶
func (in *JobRequestStatus) DeepCopy() *JobRequestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobRequestStatus.
func (*JobRequestStatus) DeepCopyInto ¶
func (in *JobRequestStatus) DeepCopyInto(out *JobRequestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserIdentity ¶ added in v0.0.14
func ParseUserIdentityFromARN ¶ added in v0.0.14
func ParseUserIdentityFromARN(arn string) (*UserIdentity, error)
func (*UserIdentity) DeepCopy ¶ added in v0.0.14
func (in *UserIdentity) DeepCopy() *UserIdentity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserIdentity.
func (*UserIdentity) DeepCopyInto ¶ added in v0.0.14
func (in *UserIdentity) DeepCopyInto(out *UserIdentity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.