mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Generated changes
This commit is contained in:
parent
0b5ef16008
commit
8216e47b6a
File diff suppressed because it is too large
Load Diff
@ -30,6 +30,70 @@ import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
|
|||||||
// Package-wide variables from generator "generated".
|
// Package-wide variables from generator "generated".
|
||||||
option go_package = "v2alpha1";
|
option go_package = "v2alpha1";
|
||||||
|
|
||||||
|
// CronJob represents the configuration of a single cron job.
|
||||||
|
message CronJob {
|
||||||
|
// Standard object's metadata.
|
||||||
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
|
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
||||||
|
|
||||||
|
// Spec is a structure defining the expected behavior of a job, including the schedule.
|
||||||
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
|
optional CronJobSpec spec = 2;
|
||||||
|
|
||||||
|
// Status is a structure describing current status of a job.
|
||||||
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
|
optional CronJobStatus status = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// CronJobList is a collection of cron jobs.
|
||||||
|
message CronJobList {
|
||||||
|
// Standard list metadata
|
||||||
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
|
optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
|
||||||
|
|
||||||
|
// Items is the list of CronJob.
|
||||||
|
repeated CronJob items = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// CronJobSpec describes how the job execution will look like and when it will actually run.
|
||||||
|
message CronJobSpec {
|
||||||
|
// Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
|
||||||
|
optional string schedule = 1;
|
||||||
|
|
||||||
|
// Optional deadline in seconds for starting the job if it misses scheduled
|
||||||
|
// time for any reason. Missed jobs executions will be counted as failed ones.
|
||||||
|
// +optional
|
||||||
|
optional int64 startingDeadlineSeconds = 2;
|
||||||
|
|
||||||
|
// ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
|
||||||
|
// +optional
|
||||||
|
optional string concurrencyPolicy = 3;
|
||||||
|
|
||||||
|
// Suspend flag tells the controller to suspend subsequent executions, it does
|
||||||
|
// not apply to already started executions. Defaults to false.
|
||||||
|
// +optional
|
||||||
|
optional bool suspend = 4;
|
||||||
|
|
||||||
|
// JobTemplate is the object that describes the job that will be created when
|
||||||
|
// executing a CronJob.
|
||||||
|
optional JobTemplateSpec jobTemplate = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// CronJobStatus represents the current state of a cron job.
|
||||||
|
message CronJobStatus {
|
||||||
|
// Active holds pointers to currently running jobs.
|
||||||
|
// +optional
|
||||||
|
repeated k8s.io.kubernetes.pkg.api.v1.ObjectReference active = 1;
|
||||||
|
|
||||||
|
// LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
|
||||||
|
// +optional
|
||||||
|
optional k8s.io.kubernetes.pkg.api.unversioned.Time lastScheduleTime = 4;
|
||||||
|
}
|
||||||
|
|
||||||
// Job represents the configuration of a single job.
|
// Job represents the configuration of a single job.
|
||||||
message Job {
|
message Job {
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
@ -191,67 +255,3 @@ message JobTemplateSpec {
|
|||||||
optional JobSpec spec = 2;
|
optional JobSpec spec = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScheduledJob represents the configuration of a single scheduled job.
|
|
||||||
message ScheduledJob {
|
|
||||||
// Standard object's metadata.
|
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
|
||||||
// +optional
|
|
||||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
|
||||||
|
|
||||||
// Spec is a structure defining the expected behavior of a job, including the schedule.
|
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
|
||||||
// +optional
|
|
||||||
optional ScheduledJobSpec spec = 2;
|
|
||||||
|
|
||||||
// Status is a structure describing current status of a job.
|
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
|
||||||
// +optional
|
|
||||||
optional ScheduledJobStatus status = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ScheduledJobList is a collection of scheduled jobs.
|
|
||||||
message ScheduledJobList {
|
|
||||||
// Standard list metadata
|
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
|
||||||
// +optional
|
|
||||||
optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
|
|
||||||
|
|
||||||
// Items is the list of ScheduledJob.
|
|
||||||
repeated ScheduledJob items = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ScheduledJobSpec describes how the job execution will look like and when it will actually run.
|
|
||||||
message ScheduledJobSpec {
|
|
||||||
// Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
|
|
||||||
optional string schedule = 1;
|
|
||||||
|
|
||||||
// Optional deadline in seconds for starting the job if it misses scheduled
|
|
||||||
// time for any reason. Missed jobs executions will be counted as failed ones.
|
|
||||||
// +optional
|
|
||||||
optional int64 startingDeadlineSeconds = 2;
|
|
||||||
|
|
||||||
// ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
|
|
||||||
// +optional
|
|
||||||
optional string concurrencyPolicy = 3;
|
|
||||||
|
|
||||||
// Suspend flag tells the controller to suspend subsequent executions, it does
|
|
||||||
// not apply to already started executions. Defaults to false.
|
|
||||||
// +optional
|
|
||||||
optional bool suspend = 4;
|
|
||||||
|
|
||||||
// JobTemplate is the object that describes the job that will be created when
|
|
||||||
// executing a ScheduledJob.
|
|
||||||
optional JobTemplateSpec jobTemplate = 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ScheduledJobStatus represents the current state of a Job.
|
|
||||||
message ScheduledJobStatus {
|
|
||||||
// Active holds pointers to currently running jobs.
|
|
||||||
// +optional
|
|
||||||
repeated k8s.io.kubernetes.pkg.api.v1.ObjectReference active = 1;
|
|
||||||
|
|
||||||
// LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
|
|
||||||
// +optional
|
|
||||||
optional k8s.io.kubernetes.pkg.api.unversioned.Time lastScheduleTime = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -27,6 +27,50 @@ package v2alpha1
|
|||||||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||||
|
|
||||||
// AUTO-GENERATED FUNCTIONS START HERE
|
// AUTO-GENERATED FUNCTIONS START HERE
|
||||||
|
var map_CronJob = map[string]string{
|
||||||
|
"": "CronJob represents the configuration of a single cron job.",
|
||||||
|
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
||||||
|
"spec": "Spec is a structure defining the expected behavior of a job, including the schedule. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
|
||||||
|
"status": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (CronJob) SwaggerDoc() map[string]string {
|
||||||
|
return map_CronJob
|
||||||
|
}
|
||||||
|
|
||||||
|
var map_CronJobList = map[string]string{
|
||||||
|
"": "CronJobList is a collection of cron jobs.",
|
||||||
|
"metadata": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
||||||
|
"items": "Items is the list of CronJob.",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (CronJobList) SwaggerDoc() map[string]string {
|
||||||
|
return map_CronJobList
|
||||||
|
}
|
||||||
|
|
||||||
|
var map_CronJobSpec = map[string]string{
|
||||||
|
"": "CronJobSpec describes how the job execution will look like and when it will actually run.",
|
||||||
|
"schedule": "Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.",
|
||||||
|
"startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.",
|
||||||
|
"concurrencyPolicy": "ConcurrencyPolicy specifies how to treat concurrent executions of a Job.",
|
||||||
|
"suspend": "Suspend flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.",
|
||||||
|
"jobTemplate": "JobTemplate is the object that describes the job that will be created when executing a CronJob.",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (CronJobSpec) SwaggerDoc() map[string]string {
|
||||||
|
return map_CronJobSpec
|
||||||
|
}
|
||||||
|
|
||||||
|
var map_CronJobStatus = map[string]string{
|
||||||
|
"": "CronJobStatus represents the current state of a cron job.",
|
||||||
|
"active": "Active holds pointers to currently running jobs.",
|
||||||
|
"lastScheduleTime": "LastScheduleTime keeps information of when was the last time the job was successfully scheduled.",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (CronJobStatus) SwaggerDoc() map[string]string {
|
||||||
|
return map_CronJobStatus
|
||||||
|
}
|
||||||
|
|
||||||
var map_Job = map[string]string{
|
var map_Job = map[string]string{
|
||||||
"": "Job represents the configuration of a single job.",
|
"": "Job represents the configuration of a single job.",
|
||||||
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
||||||
@ -110,48 +154,4 @@ func (JobTemplateSpec) SwaggerDoc() map[string]string {
|
|||||||
return map_JobTemplateSpec
|
return map_JobTemplateSpec
|
||||||
}
|
}
|
||||||
|
|
||||||
var map_CronJob = map[string]string{
|
|
||||||
"": "CronJob represents the configuration of a single scheduled job.",
|
|
||||||
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
|
||||||
"spec": "Spec is a structure defining the expected behavior of a job, including the schedule. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
|
|
||||||
"status": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status",
|
|
||||||
}
|
|
||||||
|
|
||||||
func (CronJob) SwaggerDoc() map[string]string {
|
|
||||||
return map_CronJob
|
|
||||||
}
|
|
||||||
|
|
||||||
var map_CronJobList = map[string]string{
|
|
||||||
"": "CronJobList is a collection of scheduled jobs.",
|
|
||||||
"metadata": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
|
||||||
"items": "Items is the list of CronJob.",
|
|
||||||
}
|
|
||||||
|
|
||||||
func (CronJobList) SwaggerDoc() map[string]string {
|
|
||||||
return map_CronJobList
|
|
||||||
}
|
|
||||||
|
|
||||||
var map_CronJobSpec = map[string]string{
|
|
||||||
"": "CronJobSpec describes how the job execution will look like and when it will actually run.",
|
|
||||||
"schedule": "Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.",
|
|
||||||
"startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.",
|
|
||||||
"concurrencyPolicy": "ConcurrencyPolicy specifies how to treat concurrent executions of a Job.",
|
|
||||||
"suspend": "Suspend flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.",
|
|
||||||
"jobTemplate": "JobTemplate is the object that describes the job that will be created when executing a CronJob.",
|
|
||||||
}
|
|
||||||
|
|
||||||
func (CronJobSpec) SwaggerDoc() map[string]string {
|
|
||||||
return map_CronJobSpec
|
|
||||||
}
|
|
||||||
|
|
||||||
var map_CronJobStatus = map[string]string{
|
|
||||||
"": "CronJobStatus represents the current state of a Job.",
|
|
||||||
"active": "Active holds pointers to currently running jobs.",
|
|
||||||
"lastScheduleTime": "LastScheduleTime keeps information of when was the last time the job was successfully scheduled.",
|
|
||||||
}
|
|
||||||
|
|
||||||
func (CronJobStatus) SwaggerDoc() map[string]string {
|
|
||||||
return map_CronJobStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
// AUTO-GENERATED FUNCTIONS END HERE
|
// AUTO-GENERATED FUNCTIONS END HERE
|
||||||
|
@ -24,8 +24,8 @@ import (
|
|||||||
|
|
||||||
type BatchInterface interface {
|
type BatchInterface interface {
|
||||||
RESTClient() restclient.Interface
|
RESTClient() restclient.Interface
|
||||||
JobsGetter
|
|
||||||
CronJobsGetter
|
CronJobsGetter
|
||||||
|
JobsGetter
|
||||||
}
|
}
|
||||||
|
|
||||||
// BatchClient is used to interact with features provided by the k8s.io/kubernetes/pkg/apimachinery/registered.Group group.
|
// BatchClient is used to interact with features provided by the k8s.io/kubernetes/pkg/apimachinery/registered.Group group.
|
||||||
@ -33,14 +33,14 @@ type BatchClient struct {
|
|||||||
restClient restclient.Interface
|
restClient restclient.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *BatchClient) Jobs(namespace string) JobInterface {
|
|
||||||
return newJobs(c, namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *BatchClient) CronJobs(namespace string) CronJobInterface {
|
func (c *BatchClient) CronJobs(namespace string) CronJobInterface {
|
||||||
return newCronJobs(c, namespace)
|
return newCronJobs(c, namespace)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *BatchClient) Jobs(namespace string) JobInterface {
|
||||||
|
return newJobs(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
// NewForConfig creates a new BatchClient for the given config.
|
// NewForConfig creates a new BatchClient for the given config.
|
||||||
func NewForConfig(c *restclient.Config) (*BatchClient, error) {
|
func NewForConfig(c *restclient.Config) (*BatchClient, error) {
|
||||||
config := *c
|
config := *c
|
||||||
|
@ -43,60 +43,60 @@ type CronJobInterface interface {
|
|||||||
CronJobExpansion
|
CronJobExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
// scheduledJobs implements CronJobInterface
|
// cronJobs implements CronJobInterface
|
||||||
type scheduledJobs struct {
|
type cronJobs struct {
|
||||||
client restclient.Interface
|
client restclient.Interface
|
||||||
ns string
|
ns string
|
||||||
}
|
}
|
||||||
|
|
||||||
// newCronJobs returns a CronJobs
|
// newCronJobs returns a CronJobs
|
||||||
func newCronJobs(c *BatchClient, namespace string) *scheduledJobs {
|
func newCronJobs(c *BatchClient, namespace string) *cronJobs {
|
||||||
return &scheduledJobs{
|
return &cronJobs{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
ns: namespace,
|
ns: namespace,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a scheduledJob and creates it. Returns the server's representation of the scheduledJob, and an error, if there is any.
|
// Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any.
|
||||||
func (c *scheduledJobs) Create(scheduledJob *batch.CronJob) (result *batch.CronJob, err error) {
|
func (c *cronJobs) Create(cronJob *batch.CronJob) (result *batch.CronJob, err error) {
|
||||||
result = &batch.CronJob{}
|
result = &batch.CronJob{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("cronjobs").
|
Resource("cronjobs").
|
||||||
Body(scheduledJob).
|
Body(cronJob).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a scheduledJob and updates it. Returns the server's representation of the scheduledJob, and an error, if there is any.
|
// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
|
||||||
func (c *scheduledJobs) Update(scheduledJob *batch.CronJob) (result *batch.CronJob, err error) {
|
func (c *cronJobs) Update(cronJob *batch.CronJob) (result *batch.CronJob, err error) {
|
||||||
result = &batch.CronJob{}
|
result = &batch.CronJob{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("cronjobs").
|
Resource("cronjobs").
|
||||||
Name(scheduledJob.Name).
|
Name(cronJob.Name).
|
||||||
Body(scheduledJob).
|
Body(cronJob).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *scheduledJobs) UpdateStatus(scheduledJob *batch.CronJob) (result *batch.CronJob, err error) {
|
func (c *cronJobs) UpdateStatus(cronJob *batch.CronJob) (result *batch.CronJob, err error) {
|
||||||
result = &batch.CronJob{}
|
result = &batch.CronJob{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("cronjobs").
|
Resource("cronjobs").
|
||||||
Name(scheduledJob.Name).
|
Name(cronJob.Name).
|
||||||
SubResource("status").
|
SubResource("status").
|
||||||
Body(scheduledJob).
|
Body(cronJob).
|
||||||
Do().
|
Do().
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete takes name of the scheduledJob and deletes it. Returns an error if one occurs.
|
// Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
|
||||||
func (c *scheduledJobs) Delete(name string, options *api.DeleteOptions) error {
|
func (c *cronJobs) Delete(name string, options *api.DeleteOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("cronjobs").
|
Resource("cronjobs").
|
||||||
@ -107,7 +107,7 @@ func (c *scheduledJobs) Delete(name string, options *api.DeleteOptions) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
// DeleteCollection deletes a collection of objects.
|
||||||
func (c *scheduledJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
func (c *cronJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||||
return c.client.Delete().
|
return c.client.Delete().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
Resource("cronjobs").
|
Resource("cronjobs").
|
||||||
@ -117,8 +117,8 @@ func (c *scheduledJobs) DeleteCollection(options *api.DeleteOptions, listOptions
|
|||||||
Error()
|
Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the scheduledJob, and returns the corresponding scheduledJob object, and an error if there is any.
|
// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
|
||||||
func (c *scheduledJobs) Get(name string) (result *batch.CronJob, err error) {
|
func (c *cronJobs) Get(name string) (result *batch.CronJob, err error) {
|
||||||
result = &batch.CronJob{}
|
result = &batch.CronJob{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
@ -130,7 +130,7 @@ func (c *scheduledJobs) Get(name string) (result *batch.CronJob, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
|
// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
|
||||||
func (c *scheduledJobs) List(opts api.ListOptions) (result *batch.CronJobList, err error) {
|
func (c *cronJobs) List(opts api.ListOptions) (result *batch.CronJobList, err error) {
|
||||||
result = &batch.CronJobList{}
|
result = &batch.CronJobList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
@ -141,8 +141,8 @@ func (c *scheduledJobs) List(opts api.ListOptions) (result *batch.CronJobList, e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested scheduledJobs.
|
// Watch returns a watch.Interface that watches the requested cronJobs.
|
||||||
func (c *scheduledJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
|
func (c *cronJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||||
return c.client.Get().
|
return c.client.Get().
|
||||||
Prefix("watch").
|
Prefix("watch").
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
@ -151,8 +151,8 @@ func (c *scheduledJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
|
|||||||
Watch()
|
Watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched scheduledJob.
|
// Patch applies the patch and returns the patched cronJob.
|
||||||
func (c *scheduledJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) {
|
func (c *cronJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) {
|
||||||
result = &batch.CronJob{}
|
result = &batch.CronJob{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Namespace(c.ns).
|
Namespace(c.ns).
|
||||||
|
@ -26,14 +26,14 @@ type FakeBatch struct {
|
|||||||
*core.Fake
|
*core.Fake
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeBatch) Jobs(namespace string) internalversion.JobInterface {
|
|
||||||
return &FakeJobs{c, namespace}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeBatch) CronJobs(namespace string) internalversion.CronJobInterface {
|
func (c *FakeBatch) CronJobs(namespace string) internalversion.CronJobInterface {
|
||||||
return &FakeCronJobs{c, namespace}
|
return &FakeCronJobs{c, namespace}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *FakeBatch) Jobs(namespace string) internalversion.JobInterface {
|
||||||
|
return &FakeJobs{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
// with API server by this client implementation.
|
// with API server by this client implementation.
|
||||||
func (c *FakeBatch) RESTClient() restclient.Interface {
|
func (c *FakeBatch) RESTClient() restclient.Interface {
|
||||||
|
@ -33,9 +33,9 @@ type FakeCronJobs struct {
|
|||||||
|
|
||||||
var cronjobsResource = unversioned.GroupVersionResource{Group: "batch", Version: "", Resource: "cronjobs"}
|
var cronjobsResource = unversioned.GroupVersionResource{Group: "batch", Version: "", Resource: "cronjobs"}
|
||||||
|
|
||||||
func (c *FakeCronJobs) Create(scheduledJob *batch.CronJob) (result *batch.CronJob, err error) {
|
func (c *FakeCronJobs) Create(cronJob *batch.CronJob) (result *batch.CronJob, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(core.NewCreateAction(cronjobsResource, c.ns, scheduledJob), &batch.CronJob{})
|
Invokes(core.NewCreateAction(cronjobsResource, c.ns, cronJob), &batch.CronJob{})
|
||||||
|
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -43,9 +43,9 @@ func (c *FakeCronJobs) Create(scheduledJob *batch.CronJob) (result *batch.CronJo
|
|||||||
return obj.(*batch.CronJob), err
|
return obj.(*batch.CronJob), err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeCronJobs) Update(scheduledJob *batch.CronJob) (result *batch.CronJob, err error) {
|
func (c *FakeCronJobs) Update(cronJob *batch.CronJob) (result *batch.CronJob, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(core.NewUpdateAction(cronjobsResource, c.ns, scheduledJob), &batch.CronJob{})
|
Invokes(core.NewUpdateAction(cronjobsResource, c.ns, cronJob), &batch.CronJob{})
|
||||||
|
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -53,9 +53,9 @@ func (c *FakeCronJobs) Update(scheduledJob *batch.CronJob) (result *batch.CronJo
|
|||||||
return obj.(*batch.CronJob), err
|
return obj.(*batch.CronJob), err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeCronJobs) UpdateStatus(scheduledJob *batch.CronJob) (*batch.CronJob, error) {
|
func (c *FakeCronJobs) UpdateStatus(cronJob *batch.CronJob) (*batch.CronJob, error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(core.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, scheduledJob), &batch.CronJob{})
|
Invokes(core.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), &batch.CronJob{})
|
||||||
|
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -108,14 +108,14 @@ func (c *FakeCronJobs) List(opts api.ListOptions) (result *batch.CronJobList, er
|
|||||||
return list, err
|
return list, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested scheduledJobs.
|
// Watch returns a watch.Interface that watches the requested cronJobs.
|
||||||
func (c *FakeCronJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
|
func (c *FakeCronJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||||
return c.Fake.
|
return c.Fake.
|
||||||
InvokesWatch(core.NewWatchAction(cronjobsResource, c.ns, opts))
|
InvokesWatch(core.NewWatchAction(cronjobsResource, c.ns, opts))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched scheduledJob.
|
// Patch applies the patch and returns the patched cronJob.
|
||||||
func (c *FakeCronJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) {
|
func (c *FakeCronJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(core.NewPatchSubresourceAction(cronjobsResource, c.ns, name, data, subresources...), &batch.CronJob{})
|
Invokes(core.NewPatchSubresourceAction(cronjobsResource, c.ns, name, data, subresources...), &batch.CronJob{})
|
||||||
|
@ -16,6 +16,6 @@ limitations under the License.
|
|||||||
|
|
||||||
package internalversion
|
package internalversion
|
||||||
|
|
||||||
type JobExpansion interface{}
|
|
||||||
|
|
||||||
type CronJobExpansion interface{}
|
type CronJobExpansion interface{}
|
||||||
|
|
||||||
|
type JobExpansion interface{}
|
||||||
|
@ -27,8 +27,8 @@ import (
|
|||||||
|
|
||||||
type BatchV2alpha1Interface interface {
|
type BatchV2alpha1Interface interface {
|
||||||
RESTClient() restclient.Interface
|
RESTClient() restclient.Interface
|
||||||
JobsGetter
|
|
||||||
CronJobsGetter
|
CronJobsGetter
|
||||||
|
JobsGetter
|
||||||
}
|
}
|
||||||
|
|
||||||
// BatchV2alpha1Client is used to interact with features provided by the k8s.io/kubernetes/pkg/apimachinery/registered.Group group.
|
// BatchV2alpha1Client is used to interact with features provided by the k8s.io/kubernetes/pkg/apimachinery/registered.Group group.
|
||||||
@ -36,14 +36,14 @@ type BatchV2alpha1Client struct {
|
|||||||
restClient restclient.Interface
|
restClient restclient.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *BatchV2alpha1Client) Jobs(namespace string) JobInterface {
|
|
||||||
return newJobs(c, namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *BatchV2alpha1Client) CronJobs(namespace string) CronJobInterface {
|
func (c *BatchV2alpha1Client) CronJobs(namespace string) CronJobInterface {
|
||||||
return newCronJobs(c, namespace)
|
return newCronJobs(c, namespace)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *BatchV2alpha1Client) Jobs(namespace string) JobInterface {
|
||||||
|
return newJobs(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
// NewForConfig creates a new BatchV2alpha1Client for the given config.
|
// NewForConfig creates a new BatchV2alpha1Client for the given config.
|
||||||
func NewForConfig(c *restclient.Config) (*BatchV2alpha1Client, error) {
|
func NewForConfig(c *restclient.Config) (*BatchV2alpha1Client, error) {
|
||||||
config := *c
|
config := *c
|
||||||
|
@ -26,14 +26,14 @@ type FakeBatchV2alpha1 struct {
|
|||||||
*core.Fake
|
*core.Fake
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeBatchV2alpha1) Jobs(namespace string) v2alpha1.JobInterface {
|
|
||||||
return &FakeJobs{c, namespace}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeBatchV2alpha1) CronJobs(namespace string) v2alpha1.CronJobInterface {
|
func (c *FakeBatchV2alpha1) CronJobs(namespace string) v2alpha1.CronJobInterface {
|
||||||
return &FakeCronJobs{c, namespace}
|
return &FakeCronJobs{c, namespace}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *FakeBatchV2alpha1) Jobs(namespace string) v2alpha1.JobInterface {
|
||||||
|
return &FakeJobs{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
// with API server by this client implementation.
|
// with API server by this client implementation.
|
||||||
func (c *FakeBatchV2alpha1) RESTClient() restclient.Interface {
|
func (c *FakeBatchV2alpha1) RESTClient() restclient.Interface {
|
||||||
|
@ -16,6 +16,6 @@ limitations under the License.
|
|||||||
|
|
||||||
package v2alpha1
|
package v2alpha1
|
||||||
|
|
||||||
type JobExpansion interface{}
|
|
||||||
|
|
||||||
type CronJobExpansion interface{}
|
type CronJobExpansion interface{}
|
||||||
|
|
||||||
|
type JobExpansion interface{}
|
||||||
|
@ -18,14 +18,6 @@ limitations under the License.
|
|||||||
|
|
||||||
package v2alpha1
|
package v2alpha1
|
||||||
|
|
||||||
// JobListerExpansion allows custom methods to be added to
|
|
||||||
// JobLister.
|
|
||||||
type JobListerExpansion interface{}
|
|
||||||
|
|
||||||
// JobNamespaceListerExpansion allows custom methods to be added to
|
|
||||||
// JobNamespaeLister.
|
|
||||||
type JobNamespaceListerExpansion interface{}
|
|
||||||
|
|
||||||
// CronJobListerExpansion allows custom methods to be added to
|
// CronJobListerExpansion allows custom methods to be added to
|
||||||
// CronJobLister.
|
// CronJobLister.
|
||||||
type CronJobListerExpansion interface{}
|
type CronJobListerExpansion interface{}
|
||||||
@ -33,3 +25,11 @@ type CronJobListerExpansion interface{}
|
|||||||
// CronJobNamespaceListerExpansion allows custom methods to be added to
|
// CronJobNamespaceListerExpansion allows custom methods to be added to
|
||||||
// CronJobNamespaeLister.
|
// CronJobNamespaeLister.
|
||||||
type CronJobNamespaceListerExpansion interface{}
|
type CronJobNamespaceListerExpansion interface{}
|
||||||
|
|
||||||
|
// JobListerExpansion allows custom methods to be added to
|
||||||
|
// JobLister.
|
||||||
|
type JobListerExpansion interface{}
|
||||||
|
|
||||||
|
// JobNamespaceListerExpansion allows custom methods to be added to
|
||||||
|
// JobNamespaeLister.
|
||||||
|
type JobNamespaceListerExpansion interface{}
|
||||||
|
Loading…
Reference in New Issue
Block a user