|
| 1 | +/* |
| 2 | +
|
| 3 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +you may not use this file except in compliance with the License. |
| 5 | +You may obtain a copy of the License at |
| 6 | +
|
| 7 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +
|
| 9 | +Unless required by applicable law or agreed to in writing, software |
| 10 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +See the License for the specific language governing permissions and |
| 13 | +limitations under the License. |
| 14 | +*/ |
| 15 | + |
| 16 | +//go:generate controller-gen crd paths=. output:dir=. |
| 17 | + |
| 18 | +// +kubebuilder:skip |
| 19 | +package internal_version |
| 20 | + |
| 21 | +import ( |
| 22 | + batchv1beta1 "k8s.io/api/batch/v1beta1" |
| 23 | + corev1 "k8s.io/api/core/v1" |
| 24 | + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 25 | +) |
| 26 | + |
| 27 | +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! |
| 28 | +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. |
| 29 | + |
| 30 | +// CronJobSpec defines the desired state of CronJob |
| 31 | +type CronJobSpec struct { |
| 32 | + // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. |
| 33 | + Schedule string |
| 34 | +} |
| 35 | + |
| 36 | +// CronJobStatus defines the observed state of CronJob |
| 37 | +type CronJobStatus struct { |
| 38 | + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster |
| 39 | + // Important: Run "make" to regenerate code after modifying this file |
| 40 | + |
| 41 | + // A list of pointers to currently running jobs. |
| 42 | + // +optional |
| 43 | + Active []corev1.ObjectReference |
| 44 | + |
| 45 | + // Information when was the last time the job was successfully scheduled. |
| 46 | + // +optional |
| 47 | + LastScheduleTime *metav1.Time |
| 48 | + |
| 49 | + // Information about the last time the job was successfully scheduled, |
| 50 | + // with microsecond precision. |
| 51 | + // +optional |
| 52 | + LastScheduleMicroTime *metav1.MicroTime |
| 53 | +} |
| 54 | + |
| 55 | +// +kubebuilder:object:root=true |
| 56 | +// +kubebuilder:subresource:status |
| 57 | +// +kubebuilder:resource |
| 58 | + |
| 59 | +// CronJob is the Schema for the cronjobs API |
| 60 | +type CronJob struct { |
| 61 | + /* |
| 62 | + */ |
| 63 | + metav1.TypeMeta |
| 64 | + metav1.ObjectMeta |
| 65 | + |
| 66 | + Spec CronJobSpec |
| 67 | + Status CronJobStatus |
| 68 | +} |
| 69 | + |
| 70 | +// +kubebuilder:object:root=true |
| 71 | + |
| 72 | +// CronJobList contains a list of CronJob |
| 73 | +type CronJobList struct { |
| 74 | + metav1.TypeMeta `json:",inline"` |
| 75 | + metav1.ListMeta `json:"metadata,omitempty"` |
| 76 | + Items []CronJob `json:"items"` |
| 77 | +} |
| 78 | + |
| 79 | +func init() { |
| 80 | + SchemeBuilder.Register(&CronJob{}, &CronJobList{}) |
| 81 | +} |
0 commit comments