mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
rebase: update kubernetes to v1.25.0
update kubernetes to latest v1.25.0 release. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
f47839d73d
commit
e3bf375035
142
vendor/k8s.io/kubernetes/pkg/apis/batch/types.go
generated
vendored
142
vendor/k8s.io/kubernetes/pkg/apis/batch/types.go
generated
vendored
@ -110,6 +110,119 @@ const (
|
||||
IndexedCompletion CompletionMode = "Indexed"
|
||||
)
|
||||
|
||||
// PodFailurePolicyAction specifies how a Pod failure is handled.
|
||||
// +enum
|
||||
type PodFailurePolicyAction string
|
||||
|
||||
const (
|
||||
// This is an action which might be taken on a pod failure - mark the
|
||||
// pod's job as Failed and terminate all running pods.
|
||||
PodFailurePolicyActionFailJob PodFailurePolicyAction = "FailJob"
|
||||
|
||||
// This is an action which might be taken on a pod failure - the counter towards
|
||||
// .backoffLimit, represented by the job's .status.failed field, is not
|
||||
// incremented and a replacement pod is created.
|
||||
PodFailurePolicyActionIgnore PodFailurePolicyAction = "Ignore"
|
||||
|
||||
// This is an action which might be taken on a pod failure - the pod failure
|
||||
// is handled in the default way - the counter towards .backoffLimit,
|
||||
// represented by the job's .status.failed field, is incremented.
|
||||
PodFailurePolicyActionCount PodFailurePolicyAction = "Count"
|
||||
)
|
||||
|
||||
// +enum
|
||||
type PodFailurePolicyOnExitCodesOperator string
|
||||
|
||||
const (
|
||||
PodFailurePolicyOnExitCodesOpIn PodFailurePolicyOnExitCodesOperator = "In"
|
||||
PodFailurePolicyOnExitCodesOpNotIn PodFailurePolicyOnExitCodesOperator = "NotIn"
|
||||
)
|
||||
|
||||
// PodFailurePolicyOnExitCodesRequirement describes the requirement for handling
|
||||
// a failed pod based on its container exit codes. In particular, it lookups the
|
||||
// .state.terminated.exitCode for each app container and init container status,
|
||||
// represented by the .status.containerStatuses and .status.initContainerStatuses
|
||||
// fields in the Pod status, respectively. Containers completed with success
|
||||
// (exit code 0) are excluded from the requirement check.
|
||||
type PodFailurePolicyOnExitCodesRequirement struct {
|
||||
// Restricts the check for exit codes to the container with the
|
||||
// specified name. When null, the rule applies to all containers.
|
||||
// When specified, it should match one the container or initContainer
|
||||
// names in the pod template.
|
||||
// +optional
|
||||
ContainerName *string
|
||||
|
||||
// Represents the relationship between the container exit code(s) and the
|
||||
// specified values. Containers completed with success (exit code 0) are
|
||||
// excluded from the requirement check. Possible values are:
|
||||
// - In: the requirement is satisfied if at least one container exit code
|
||||
// (might be multiple if there are multiple containers not restricted
|
||||
// by the 'containerName' field) is in the set of specified values.
|
||||
// - NotIn: the requirement is satisfied if at least one container exit code
|
||||
// (might be multiple if there are multiple containers not restricted
|
||||
// by the 'containerName' field) is not in the set of specified values.
|
||||
// Additional values are considered to be added in the future. Clients should
|
||||
// react to an unknown operator by assuming the requirement is not satisfied.
|
||||
Operator PodFailurePolicyOnExitCodesOperator
|
||||
|
||||
// Specifies the set of values. Each returned container exit code (might be
|
||||
// multiple in case of multiple containers) is checked against this set of
|
||||
// values with respect to the operator. The list of values must be ordered
|
||||
// and must not contain duplicates. Value '0' cannot be used for the In operator.
|
||||
// At least one element is required. At most 255 elements are allowed.
|
||||
// +listType=set
|
||||
Values []int32
|
||||
}
|
||||
|
||||
// PodFailurePolicyOnPodConditionsPattern describes a pattern for matching
|
||||
// an actual pod condition type.
|
||||
type PodFailurePolicyOnPodConditionsPattern struct {
|
||||
// Specifies the required Pod condition type. To match a pod condition
|
||||
// it is required that specified type equals the pod condition type.
|
||||
Type api.PodConditionType
|
||||
// Specifies the required Pod condition status. To match a pod condition
|
||||
// it is required that the specified status equals the pod condition status.
|
||||
// Defaults to True.
|
||||
Status api.ConditionStatus
|
||||
}
|
||||
|
||||
// PodFailurePolicyRule describes how a pod failure is handled when the requirements are met.
|
||||
// One of OnExitCodes and onPodConditions, but not both, can be used in each rule.
|
||||
type PodFailurePolicyRule struct {
|
||||
// Specifies the action taken on a pod failure when the requirements are satisfied.
|
||||
// Possible values are:
|
||||
// - FailJob: indicates that the pod's job is marked as Failed and all
|
||||
// running pods are terminated.
|
||||
// - Ignore: indicates that the counter towards the .backoffLimit is not
|
||||
// incremented and a replacement pod is created.
|
||||
// - Count: indicates that the pod is handled in the default way - the
|
||||
// counter towards the .backoffLimit is incremented.
|
||||
// Additional values are considered to be added in the future. Clients should
|
||||
// react to an unknown action by skipping the rule.
|
||||
Action PodFailurePolicyAction
|
||||
|
||||
// Represents the requirement on the container exit codes.
|
||||
// +optional
|
||||
OnExitCodes *PodFailurePolicyOnExitCodesRequirement
|
||||
|
||||
// Represents the requirement on the pod conditions. The requirement is represented
|
||||
// as a list of pod condition patterns. The requirement is satisfied if at
|
||||
// least one pattern matches an actual pod condition. At most 20 elements are allowed.
|
||||
// +listType=atomic
|
||||
OnPodConditions []PodFailurePolicyOnPodConditionsPattern
|
||||
}
|
||||
|
||||
// PodFailurePolicy describes how failed pods influence the backoffLimit.
|
||||
type PodFailurePolicy struct {
|
||||
// A list of pod failure policy rules. The rules are evaluated in order.
|
||||
// Once a rule matches a Pod failure, the remaining of the rules are ignored.
|
||||
// When no rule matches the Pod failure, the default handling applies - the
|
||||
// counter of pod failures is incremented and it is checked against
|
||||
// the backoffLimit. At most 20 elements are allowed.
|
||||
// +listType=atomic
|
||||
Rules []PodFailurePolicyRule
|
||||
}
|
||||
|
||||
// JobSpec describes how the job execution will look like.
|
||||
type JobSpec struct {
|
||||
|
||||
@ -128,6 +241,19 @@ type JobSpec struct {
|
||||
// +optional
|
||||
Completions *int32
|
||||
|
||||
// Specifies the policy of handling failed pods. In particular, it allows to
|
||||
// specify the set of actions and conditions which need to be
|
||||
// satisfied to take the associated action.
|
||||
// If empty, the default behaviour applies - the counter of failed pods,
|
||||
// represented by the jobs's .status.failed field, is incremented and it is
|
||||
// checked against the backoffLimit. This field cannot be used in combination
|
||||
// with .spec.podTemplate.spec.restartPolicy=OnFailure.
|
||||
//
|
||||
// This field is alpha-level. To use this field, you must enable the
|
||||
// `JobPodFailurePolicy` feature gate (disabled by default).
|
||||
// +optional
|
||||
PodFailurePolicy *PodFailurePolicy
|
||||
|
||||
// Specifies the duration in seconds relative to the startTime that the job
|
||||
// may be continuously active before the system tries to terminate it; value
|
||||
// must be positive integer. If a Job is suspended (at creation or through an
|
||||
@ -313,6 +439,9 @@ const (
|
||||
JobComplete JobConditionType = "Complete"
|
||||
// JobFailed means the job has failed its execution.
|
||||
JobFailed JobConditionType = "Failed"
|
||||
// FailureTarget means the job is about to fail its execution.
|
||||
// The constant is to be renamed once the name is accepted within the KEP-3329.
|
||||
AlphaNoCompatGuaranteeJobFailureTarget JobConditionType = "FailureTarget"
|
||||
)
|
||||
|
||||
// JobCondition describes current state of a job.
|
||||
@ -376,9 +505,16 @@ type CronJobSpec struct {
|
||||
// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
|
||||
Schedule string
|
||||
|
||||
// The time zone for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
|
||||
// If not specified, this will rely on the time zone of the kube-controller-manager process.
|
||||
// ALPHA: This field is in alpha and must be enabled via the `CronJobTimeZone` feature gate.
|
||||
// The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
|
||||
// If not specified, this will default to the time zone of the kube-controller-manager process.
|
||||
// The set of valid time zone names and the time zone offset is loaded from the system-wide time zone
|
||||
// database by the API server during CronJob validation and the controller manager during execution.
|
||||
// If no system-wide time zone database can be found a bundled version of the database is used instead.
|
||||
// If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host
|
||||
// configuration, the controller will stop creating new new Jobs and will create a system event with the
|
||||
// reason UnknownTimeZone.
|
||||
// More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones
|
||||
// This is beta field and must be enabled via the `CronJobTimeZone` feature gate.
|
||||
// +optional
|
||||
TimeZone *string
|
||||
|
||||
|
96
vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go
generated
vendored
96
vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go
generated
vendored
@ -252,6 +252,11 @@ func (in *JobSpec) DeepCopyInto(out *JobSpec) {
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
if in.PodFailurePolicy != nil {
|
||||
in, out := &in.PodFailurePolicy, &out.PodFailurePolicy
|
||||
*out = new(PodFailurePolicy)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.ActiveDeadlineSeconds != nil {
|
||||
in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
|
||||
*out = new(int64)
|
||||
@ -387,6 +392,97 @@ func (in *JobTemplateSpec) DeepCopy() *JobTemplateSpec {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodFailurePolicy) DeepCopyInto(out *PodFailurePolicy) {
|
||||
*out = *in
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]PodFailurePolicyRule, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodFailurePolicy.
|
||||
func (in *PodFailurePolicy) DeepCopy() *PodFailurePolicy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodFailurePolicy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodFailurePolicyOnExitCodesRequirement) DeepCopyInto(out *PodFailurePolicyOnExitCodesRequirement) {
|
||||
*out = *in
|
||||
if in.ContainerName != nil {
|
||||
in, out := &in.ContainerName, &out.ContainerName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.Values != nil {
|
||||
in, out := &in.Values, &out.Values
|
||||
*out = make([]int32, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodFailurePolicyOnExitCodesRequirement.
|
||||
func (in *PodFailurePolicyOnExitCodesRequirement) DeepCopy() *PodFailurePolicyOnExitCodesRequirement {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodFailurePolicyOnExitCodesRequirement)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodFailurePolicyOnPodConditionsPattern) DeepCopyInto(out *PodFailurePolicyOnPodConditionsPattern) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodFailurePolicyOnPodConditionsPattern.
|
||||
func (in *PodFailurePolicyOnPodConditionsPattern) DeepCopy() *PodFailurePolicyOnPodConditionsPattern {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodFailurePolicyOnPodConditionsPattern)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodFailurePolicyRule) DeepCopyInto(out *PodFailurePolicyRule) {
|
||||
*out = *in
|
||||
if in.OnExitCodes != nil {
|
||||
in, out := &in.OnExitCodes, &out.OnExitCodes
|
||||
*out = new(PodFailurePolicyOnExitCodesRequirement)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.OnPodConditions != nil {
|
||||
in, out := &in.OnPodConditions, &out.OnPodConditions
|
||||
*out = make([]PodFailurePolicyOnPodConditionsPattern, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodFailurePolicyRule.
|
||||
func (in *PodFailurePolicyRule) DeepCopy() *PodFailurePolicyRule {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodFailurePolicyRule)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *UncountedTerminatedPods) DeepCopyInto(out *UncountedTerminatedPods) {
|
||||
*out = *in
|
||||
|
Reference in New Issue
Block a user