Skip to content
Draft
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
6 changes: 6 additions & 0 deletions api/v1/installation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ type InstallationSpec struct {
// +optional
TyphaDeployment *TyphaDeployment `json:"typhaDeployment,omitempty"`

// TyphaPodDisruptionBudget configures the PodDisruptionBudget for the calico-typha
// Deployment. Fields left unset fall back to the operator's defaults. The PDB's
// selector is managed by the operator and cannot be overridden.
// +optional
TyphaPodDisruptionBudget *PodDisruptionBudgetOverride `json:"typhaPodDisruptionBudget,omitempty"`

// Deprecated. The CalicoWindowsUpgradeDaemonSet is deprecated and will be removed from the API in the future.
// CalicoWindowsUpgradeDaemonSet configures the calico-windows-upgrade DaemonSet.
CalicoWindowsUpgradeDaemonSet *CalicoWindowsUpgradeDaemonSet `json:"calicoWindowsUpgradeDaemonSet,omitempty"`
Expand Down
45 changes: 45 additions & 0 deletions api/v1/poddisruptionbudget_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright (c) 2026 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package v1

import (
policyv1 "k8s.io/api/policy/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)

// PodDisruptionBudgetOverride allows overriding select fields on an operator-managed
// PodDisruptionBudget. The PDB's selector, name, and namespace are managed by the
// operator and cannot be overridden.
// +kubebuilder:validation:XValidation:rule="!(has(self.minAvailable) && has(self.maxUnavailable))",message="minAvailable and maxUnavailable are mutually exclusive"
type PodDisruptionBudgetOverride struct {
// MinAvailable is the minimum number of pods (as an integer or percentage) that
// must remain available during a disruption. Mutually exclusive with MaxUnavailable.
// +optional
MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"`

// MaxUnavailable is the maximum number of pods (as an integer or percentage) that
// can be unavailable during a disruption. Mutually exclusive with MinAvailable.
// If neither MinAvailable nor MaxUnavailable is set, the operator applies its
// default (MaxUnavailable=1 for calico-typha).
// +optional
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`

// UnhealthyPodEvictionPolicy defines when unhealthy pods should be considered
// for eviction. Defaults to IfHealthyBudget (the Kubernetes default) when unset.
// See https://kubernetes.io/docs/tasks/run-application/configure-pdb/#unhealthy-pod-eviction-policy.
// +kubebuilder:validation:Enum=IfHealthyBudget;AlwaysAllow
// +optional
UnhealthyPodEvictionPolicy *policyv1.UnhealthyPodEvictionPolicyType `json:"unhealthyPodEvictionPolicy,omitempty"`
}
37 changes: 37 additions & 0 deletions api/v1/zz_generated.deepcopy.go

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

74 changes: 74 additions & 0 deletions pkg/imports/crds/operator/operator.tigera.io_installations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9177,6 +9177,43 @@ spec:
prometheus metrics on. By default, metrics are not enabled.
format: int32
type: integer
typhaPodDisruptionBudget:
description: |-
TyphaPodDisruptionBudget configures the PodDisruptionBudget for the calico-typha
Deployment. Fields left unset fall back to the operator's defaults. The PDB's
selector is managed by the operator and cannot be overridden.
properties:
maxUnavailable:
anyOf:
- type: integer
- type: string
description: |-
MaxUnavailable is the maximum number of pods (as an integer or percentage) that
can be unavailable during a disruption. Mutually exclusive with MinAvailable.
If neither MinAvailable nor MaxUnavailable is set, the operator applies its
default (MaxUnavailable=1 for calico-typha).
x-kubernetes-int-or-string: true
minAvailable:
anyOf:
- type: integer
- type: string
description: |-
MinAvailable is the minimum number of pods (as an integer or percentage) that
must remain available during a disruption. Mutually exclusive with MaxUnavailable.
x-kubernetes-int-or-string: true
unhealthyPodEvictionPolicy:
description: |-
UnhealthyPodEvictionPolicy defines when unhealthy pods should be considered
for eviction. Defaults to IfHealthyBudget (the Kubernetes default) when unset.
See https://kubernetes.io/docs/tasks/run-application/configure-pdb/#unhealthy-pod-eviction-policy.
enum:
- IfHealthyBudget
- AlwaysAllow
type: string
type: object
x-kubernetes-validations:
- message: minAvailable and maxUnavailable are mutually exclusive
rule: "!(has(self.minAvailable) && has(self.maxUnavailable))"
variant:
description: |-
Variant is the product to install - one of Calico or CalicoEnterprise.
Expand Down Expand Up @@ -18529,6 +18566,43 @@ spec:
serves prometheus metrics on. By default, metrics are not enabled.
format: int32
type: integer
typhaPodDisruptionBudget:
description: |-
TyphaPodDisruptionBudget configures the PodDisruptionBudget for the calico-typha
Deployment. Fields left unset fall back to the operator's defaults. The PDB's
selector is managed by the operator and cannot be overridden.
properties:
maxUnavailable:
anyOf:
- type: integer
- type: string
description: |-
MaxUnavailable is the maximum number of pods (as an integer or percentage) that
can be unavailable during a disruption. Mutually exclusive with MinAvailable.
If neither MinAvailable nor MaxUnavailable is set, the operator applies its
default (MaxUnavailable=1 for calico-typha).
x-kubernetes-int-or-string: true
minAvailable:
anyOf:
- type: integer
- type: string
description: |-
MinAvailable is the minimum number of pods (as an integer or percentage) that
must remain available during a disruption. Mutually exclusive with MaxUnavailable.
x-kubernetes-int-or-string: true
unhealthyPodEvictionPolicy:
description: |-
UnhealthyPodEvictionPolicy defines when unhealthy pods should be considered
for eviction. Defaults to IfHealthyBudget (the Kubernetes default) when unset.
See https://kubernetes.io/docs/tasks/run-application/configure-pdb/#unhealthy-pod-eviction-policy.
enum:
- IfHealthyBudget
- AlwaysAllow
type: string
type: object
x-kubernetes-validations:
- message: minAvailable and maxUnavailable are mutually exclusive
rule: "!(has(self.minAvailable) && has(self.maxUnavailable))"
variant:
description: |-
Variant is the product to install - one of Calico or CalicoEnterprise.
Expand Down
Loading