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

fix: Support v1 PDB in k8s v1.25+. Fixes #10649 #10712

Merged
merged 4 commits into from
Mar 20, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ pkg/apis/workflow/v1alpha1/generated.proto: $(GOPATH)/bin/go-to-protobuf $(PROTO
$(GOPATH)/bin/go-to-protobuf \
--go-header-file=./hack/custom-boilerplate.go.txt \
--packages=github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1 \
--apimachinery-packages=+k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1,k8s.io/api/policy/v1beta1 \
--apimachinery-packages=+k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1,k8s.io/api/policy/v1 \
--proto-import $(GOPATH)/src
# Delete the link
[ -e ./v3 ] && rm -rf v3
Expand Down
6 changes: 3 additions & 3 deletions api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7327,7 +7327,7 @@
"type": "integer"
},
"podDisruptionBudget": {
"$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec",
"$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudgetSpec",
"description": "PodDisruptionBudget holds the number of concurrent disruptions that you allow for Workflow's Pods. Controller will automatically add the selector with workflow name, if selector is empty. Optional: Defaults to empty."
},
"podGC": {
Expand Down Expand Up @@ -10356,7 +10356,7 @@
},
"type": "object"
},
"io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec": {
"io.k8s.api.policy.v1.PodDisruptionBudgetSpec": {
"description": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.",
"properties": {
"maxUnavailable": {
Expand All @@ -10369,7 +10369,7 @@
},
"selector": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector",
"description": "Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace.",
"description": "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.",
"x-kubernetes-patch-strategy": "replace"
}
},
Expand Down
6 changes: 3 additions & 3 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -11241,7 +11241,7 @@
},
"podDisruptionBudget": {
"description": "PodDisruptionBudget holds the number of concurrent disruptions that you allow for Workflow's Pods. Controller will automatically add the selector with workflow name, if selector is empty. Optional: Defaults to empty.",
"$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec"
"$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudgetSpec"
},
"podGC": {
"description": "PodGC describes the strategy to use when deleting completed pods",
Expand Down Expand Up @@ -14259,7 +14259,7 @@
}
}
},
"io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec": {
"io.k8s.api.policy.v1.PodDisruptionBudgetSpec": {
"description": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.",
"type": "object",
"properties": {
Expand All @@ -14272,7 +14272,7 @@
"$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString"
},
"selector": {
"description": "Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace.",
"description": "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.",
"x-kubernetes-patch-strategy": "replace",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -4952,7 +4952,7 @@ PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
|:----------:|:----------:|---------------|
|`maxUnavailable`|[`IntOrString`](#intorstring)|An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable".|
|`minAvailable`|[`IntOrString`](#intorstring)|An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%".|
|`selector`|[`LabelSelector`](#labelselector)|Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace.|
|`selector`|[`LabelSelector`](#labelselector)|Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.|

## PodSecurityContext

Expand Down
Loading