Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated cherry pick of #108639: unmark non-validated types as enums. #108740

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
62 changes: 7 additions & 55 deletions api/openapi-spec/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 6 additions & 49 deletions api/openapi-spec/v3/api__v1_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2498,12 +2498,7 @@
},
"type": {
"default": "",
"description": "Type of resource that this limit applies to.\n\nPossible enum values:\n - `\"Container\"` Limit that applies to all containers in a namespace\n - `\"PersistentVolumeClaim\"` Limit that applies to all persistent volume claims in a namespace\n - `\"Pod\"` Limit that applies to all pods in a namespace",
"enum": [
"Container",
"PersistentVolumeClaim",
"Pod"
],
"description": "Type of resource that this limit applies to.",
"type": "string"
}
},
Expand Down Expand Up @@ -2712,14 +2707,7 @@
},
"type": {
"default": "",
"description": "Type of namespace controller condition.\n\nPossible enum values:\n - `\"NamespaceContentRemaining\"` contains information about resources remaining in a namespace.\n - `\"NamespaceDeletionContentFailure\"` contains information about namespace deleter errors during deletion of resources.\n - `\"NamespaceDeletionDiscoveryFailure\"` contains information about namespace deleter errors during resource discovery.\n - `\"NamespaceDeletionGroupVersionParsingFailure\"` contains information about namespace deleter errors parsing GV for legacy types.\n - `\"NamespaceFinalizersRemaining\"` contains information about which finalizers are on resources remaining in a namespace.",
"enum": [
"NamespaceContentRemaining",
"NamespaceDeletionContentFailure",
"NamespaceDeletionDiscoveryFailure",
"NamespaceDeletionGroupVersionParsingFailure",
"NamespaceFinalizersRemaining"
],
"description": "Type of namespace controller condition.",
"type": "string"
}
},
Expand Down Expand Up @@ -2850,14 +2838,7 @@
},
"type": {
"default": "",
"description": "Node address type, one of Hostname, ExternalIP or InternalIP.\n\nPossible enum values:\n - `\"ExternalDNS\"` identifies a DNS name which resolves to an IP address which has the characteristics of a NodeExternalIP. The IP it resolves to may or may not be a listed NodeExternalIP address.\n - `\"ExternalIP\"` identifies an IP address which is, in some way, intended to be more usable from outside the cluster then an internal IP, though no specific semantics are defined. It may be a globally routable IP, though it is not required to be. External IPs may be assigned directly to an interface on the node, like a NodeInternalIP, or alternatively, packets sent to the external IP may be NAT'ed to an internal node IP rather than being delivered directly (making the IP less efficient for node-to-node traffic than a NodeInternalIP).\n - `\"Hostname\"` identifies a name of the node. Although every node can be assumed to have a NodeAddress of this type, its exact syntax and semantics are not defined, and are not consistent between different clusters.\n - `\"InternalDNS\"` identifies a DNS name which resolves to an IP address which has the characteristics of a NodeInternalIP. The IP it resolves to may or may not be a listed NodeInternalIP address.\n - `\"InternalIP\"` identifies an IP address which is assigned to one of the node's network interfaces. Every node should have at least one address of this type. An internal IP is normally expected to be reachable from every other node, but may not be visible to hosts outside the cluster. By default it is assumed that kube-apiserver can reach node internal IPs, though it is possible to configure clusters where this is not the case. NodeInternalIP is the default type of node IP, and does not necessarily imply that the IP is ONLY reachable internally. If a node has multiple internal IPs, no specific semantics are assigned to the additional IPs.",
"enum": [
"ExternalDNS",
"ExternalIP",
"Hostname",
"InternalDNS",
"InternalIP"
],
"description": "Node address type, one of Hostname, ExternalIP or InternalIP.",
"type": "string"
}
},
Expand Down Expand Up @@ -2913,14 +2894,7 @@
},
"type": {
"default": "",
"description": "Type of node condition.\n\nPossible enum values:\n - `\"DiskPressure\"` means the kubelet is under pressure due to insufficient available disk.\n - `\"MemoryPressure\"` means the kubelet is under pressure due to insufficient available memory.\n - `\"NetworkUnavailable\"` means that network for the node is not correctly configured.\n - `\"PIDPressure\"` means the kubelet is under pressure due to insufficient available PID.\n - `\"Ready\"` means kubelet is healthy and ready to accept pods.",
"enum": [
"DiskPressure",
"MemoryPressure",
"NetworkUnavailable",
"PIDPressure",
"Ready"
],
"description": "Type of node condition.",
"type": "string"
}
},
Expand Down Expand Up @@ -3440,11 +3414,6 @@
},
"type": {
"default": "",
"description": "\n\n\nPossible enum values:\n - `\"FileSystemResizePending\"` - controller resize is finished and a file system resize is pending on node\n - `\"Resizing\"` - a user trigger resize of pvc has been started",
"enum": [
"FileSystemResizePending",
"Resizing"
],
"type": "string"
}
},
Expand Down Expand Up @@ -3985,13 +3954,7 @@
},
"type": {
"default": "",
"description": "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions\n\nPossible enum values:\n - `\"ContainersReady\"` indicates whether all containers in the pod are ready.\n - `\"Initialized\"` means that all init containers in the pod have started successfully.\n - `\"PodScheduled\"` represents status of the scheduling process for this pod.\n - `\"Ready\"` means the pod is able to service requests and should be added to the load balancing pools of all matching services.",
"enum": [
"ContainersReady",
"Initialized",
"PodScheduled",
"Ready"
],
"description": "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions",
"type": "string"
}
},
Expand Down Expand Up @@ -4110,13 +4073,7 @@
"properties": {
"conditionType": {
"default": "",
"description": "ConditionType refers to a condition in the pod's condition list with matching type.\n\nPossible enum values:\n - `\"ContainersReady\"` indicates whether all containers in the pod are ready.\n - `\"Initialized\"` means that all init containers in the pod have started successfully.\n - `\"PodScheduled\"` represents status of the scheduling process for this pod.\n - `\"Ready\"` means the pod is able to service requests and should be added to the load balancing pools of all matching services.",
"enum": [
"ContainersReady",
"Initialized",
"PodScheduled",
"Ready"
],
"description": "ConditionType refers to a condition in the pod's condition list with matching type.",
"type": "string"
}
},
Expand Down
13 changes: 1 addition & 12 deletions api/openapi-spec/v3/apis__apps__v1_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2499,11 +2499,6 @@
},
"type": {
"default": "",
"description": "\n\n\nPossible enum values:\n - `\"FileSystemResizePending\"` - controller resize is finished and a file system resize is pending on node\n - `\"Resizing\"` - a user trigger resize of pvc has been started",
"enum": [
"FileSystemResizePending",
"Resizing"
],
"type": "string"
}
},
Expand Down Expand Up @@ -2800,13 +2795,7 @@
"properties": {
"conditionType": {
"default": "",
"description": "ConditionType refers to a condition in the pod's condition list with matching type.\n\nPossible enum values:\n - `\"ContainersReady\"` indicates whether all containers in the pod are ready.\n - `\"Initialized\"` means that all init containers in the pod have started successfully.\n - `\"PodScheduled\"` represents status of the scheduling process for this pod.\n - `\"Ready\"` means the pod is able to service requests and should be added to the load balancing pools of all matching services.",
"enum": [
"ContainersReady",
"Initialized",
"PodScheduled",
"Ready"
],
"description": "ConditionType refers to a condition in the pod's condition list with matching type.",
"type": "string"
}
},
Expand Down
15 changes: 2 additions & 13 deletions api/openapi-spec/v3/apis__batch__v1_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,7 @@
},
"type": {
"default": "",
"description": "Type of job condition, Complete or Failed.\n\nPossible enum values:\n - `\"Complete\"` means the job has completed its execution.\n - `\"Failed\"` means the job has failed its execution.\n - `\"Suspended\"` means the job has been suspended.",
"enum": [
"Complete",
"Failed",
"Suspended"
],
"description": "Type of job condition, Complete or Failed.",
"type": "string"
}
},
Expand Down Expand Up @@ -2026,13 +2021,7 @@
"properties": {
"conditionType": {
"default": "",
"description": "ConditionType refers to a condition in the pod's condition list with matching type.\n\nPossible enum values:\n - `\"ContainersReady\"` indicates whether all containers in the pod are ready.\n - `\"Initialized\"` means that all init containers in the pod have started successfully.\n - `\"PodScheduled\"` represents status of the scheduling process for this pod.\n - `\"Ready\"` means the pod is able to service requests and should be added to the load balancing pools of all matching services.",
"enum": [
"ContainersReady",
"Initialized",
"PodScheduled",
"Ready"
],
"description": "ConditionType refers to a condition in the pod's condition list with matching type.",
"type": "string"
}
},
Expand Down
8 changes: 1 addition & 7 deletions api/openapi-spec/v3/apis__batch__v1beta1_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1828,13 +1828,7 @@
"properties": {
"conditionType": {
"default": "",
"description": "ConditionType refers to a condition in the pod's condition list with matching type.\n\nPossible enum values:\n - `\"ContainersReady\"` indicates whether all containers in the pod are ready.\n - `\"Initialized\"` means that all init containers in the pod have started successfully.\n - `\"PodScheduled\"` represents status of the scheduling process for this pod.\n - `\"Ready\"` means the pod is able to service requests and should be added to the load balancing pools of all matching services.",
"enum": [
"ContainersReady",
"Initialized",
"PodScheduled",
"Ready"
],
"description": "ConditionType refers to a condition in the pod's condition list with matching type.",
"type": "string"
}
},
Expand Down
3 changes: 1 addition & 2 deletions staging/src/k8s.io/api/batch/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,9 @@ type UncountedTerminatedPods struct {
Failed []types.UID `json:"failed,omitempty" protobuf:"bytes,2,rep,name=failed,casttype=k8s.io/apimachinery/pkg/types.UID"`
}

// +enum
type JobConditionType string

// These are valid conditions of a job.
// These are built-in conditions of a job.
const (
// JobSuspended means the job has been suspended.
JobSuspended JobConditionType = "Suspended"
Expand Down