From 400b1becd379c1b846dd51100f4626440eaba5bc Mon Sep 17 00:00:00 2001 From: Ross Peoples Date: Mon, 28 Mar 2022 14:59:03 -0500 Subject: [PATCH] make update after timeZone support for CronJob Kubernetes-commit: d26e6cca7255c2c96ba28e8e5550bbc87a7577b9 --- applyconfigurations/batch/v1/cronjobspec.go | 9 +++++++++ applyconfigurations/batch/v1beta1/cronjobspec.go | 9 +++++++++ applyconfigurations/internal/internal.go | 6 ++++++ 3 files changed, 24 insertions(+) diff --git a/applyconfigurations/batch/v1/cronjobspec.go b/applyconfigurations/batch/v1/cronjobspec.go index eaf3ba8e..22a34dcb 100644 --- a/applyconfigurations/batch/v1/cronjobspec.go +++ b/applyconfigurations/batch/v1/cronjobspec.go @@ -26,6 +26,7 @@ import ( // with apply. type CronJobSpecApplyConfiguration struct { Schedule *string `json:"schedule,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` ConcurrencyPolicy *v1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` Suspend *bool `json:"suspend,omitempty"` @@ -48,6 +49,14 @@ func (b *CronJobSpecApplyConfiguration) WithSchedule(value string) *CronJobSpecA return b } +// WithTimeZone sets the TimeZone field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TimeZone field is set to the value of the last call. +func (b *CronJobSpecApplyConfiguration) WithTimeZone(value string) *CronJobSpecApplyConfiguration { + b.TimeZone = &value + return b +} + // WithStartingDeadlineSeconds sets the StartingDeadlineSeconds field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StartingDeadlineSeconds field is set to the value of the last call. diff --git a/applyconfigurations/batch/v1beta1/cronjobspec.go b/applyconfigurations/batch/v1beta1/cronjobspec.go index 7ca431b1..68c0777d 100644 --- a/applyconfigurations/batch/v1beta1/cronjobspec.go +++ b/applyconfigurations/batch/v1beta1/cronjobspec.go @@ -26,6 +26,7 @@ import ( // with apply. type CronJobSpecApplyConfiguration struct { Schedule *string `json:"schedule,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` ConcurrencyPolicy *v1beta1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` Suspend *bool `json:"suspend,omitempty"` @@ -48,6 +49,14 @@ func (b *CronJobSpecApplyConfiguration) WithSchedule(value string) *CronJobSpecA return b } +// WithTimeZone sets the TimeZone field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TimeZone field is set to the value of the last call. +func (b *CronJobSpecApplyConfiguration) WithTimeZone(value string) *CronJobSpecApplyConfiguration { + b.TimeZone = &value + return b +} + // WithStartingDeadlineSeconds sets the StartingDeadlineSeconds field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StartingDeadlineSeconds field is set to the value of the last call. diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index b8458d88..df8cc0f8 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -2956,6 +2956,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: suspend type: scalar: boolean + - name: timeZone + type: + scalar: string - name: io.k8s.api.batch.v1.CronJobStatus map: fields: @@ -3157,6 +3160,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: suspend type: scalar: boolean + - name: timeZone + type: + scalar: string - name: io.k8s.api.batch.v1beta1.CronJobStatus map: fields: