Skip to content

Commit

Permalink
OSSM-5879 Fix enum fields and add defaultPodDisruptionBudget (#1619)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmangoen authored Feb 7, 2024
1 parent 510a11f commit a60eb25
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 14 deletions.
16 changes: 14 additions & 2 deletions api/v1alpha1/values_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ import (
)

// Mode for the ingress controller.
type IngressControllerMode int32
// +kubebuilder:validation:Enum=UNSPECIFIED;DEFAULT;STRICT;OFF
type IngressControllerMode string

// Specifies which tracer to use.
type Tracer int32
// +kubebuilder:validation:Enum=zipkin;lightstep;datadog;stackdriver;openCensusAgent;none
type Tracer string

// Configuration for CNI.
type CNIConfig struct {
Expand Down Expand Up @@ -82,6 +84,14 @@ type ResourceQuotas struct {
Pods int64 `json:"pods,omitempty"`
}

// DefaultPodDisruptionBudgetConfig specifies the default pod disruption budget configuration.
//
// See https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
type DefaultPodDisruptionBudgetConfig struct {
// Controls whether a PodDisruptionBudget with a default minAvailable value of 1 is created for each deployment.
Enabled bool `json:"enabled,omitempty"`
}

// Global Configuration for Istio components.
type GlobalConfig struct {
// List of certSigners to allow "approve" action in the ClusterRole
Expand All @@ -90,6 +100,8 @@ type GlobalConfig struct {
// Controls whether the server-side validation is enabled.
ConfigValidation bool `json:"configValidation,omitempty"`
DefaultConfigVisibilitySettings []string `json:"defaultConfigVisibilitySettings,omitempty"`
// Specifies the default pod disruption budget configuration.
DefaultPodDisruptionBudget *DefaultPodDisruptionBudgetConfig `json:"defaultPodDisruptionBudget,omitempty"`
// Specifies the docker hub for Istio images.
Hub string `json:"hub,omitempty"`
// Specifies the default namespace for the Istio control plane components.
Expand Down
20 changes: 20 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

37 changes: 31 additions & 6 deletions bundle/manifests/operator.istio.io_istios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,15 @@ spec:
items:
type: string
type: array
defaultPodDisruptionBudget:
description: Specifies the default pod disruption budget configuration.
properties:
enabled:
description: Controls whether a PodDisruptionBudget with
a default minAvailable value of 1 is created for each
deployment.
type: boolean
type: object
externalIstiod:
description: Controls whether one external istiod is enabled.
type: boolean
Expand Down Expand Up @@ -570,8 +579,14 @@ spec:
type: integer
tracer:
description: Specifies which tracer to use.
format: int32
type: integer
enum:
- zipkin
- lightstep
- datadog
- stackdriver
- openCensusAgent
- none
type: string
type: object
proxy_init:
description: Specifies the Configuration for proxy_init container
Expand Down Expand Up @@ -1138,8 +1153,14 @@ spec:
type: integer
tracer:
description: Specifies which tracer to use.
format: int32
type: integer
enum:
- zipkin
- lightstep
- datadog
- stackdriver
- openCensusAgent
- none
type: string
type: object
defaultDestinationRuleExportTo:
description: |-
Expand Down Expand Up @@ -2013,8 +2034,12 @@ spec:
description: |-
Defines whether to use Istio ingress controller for annotated or all ingress resources.
Default mode is `STRICT`.
format: int32
type: integer
enum:
- UNSPECIFIED
- DEFAULT
- STRICT
- "OFF"
type: string
ingressSelector:
description: |-
Defines which gateway deployment to use as the Ingress controller. This field corresponds to
Expand Down
37 changes: 31 additions & 6 deletions chart/crds/operator.istio.io_istios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,15 @@ spec:
items:
type: string
type: array
defaultPodDisruptionBudget:
description: Specifies the default pod disruption budget configuration.
properties:
enabled:
description: Controls whether a PodDisruptionBudget with
a default minAvailable value of 1 is created for each
deployment.
type: boolean
type: object
externalIstiod:
description: Controls whether one external istiod is enabled.
type: boolean
Expand Down Expand Up @@ -570,8 +579,14 @@ spec:
type: integer
tracer:
description: Specifies which tracer to use.
format: int32
type: integer
enum:
- zipkin
- lightstep
- datadog
- stackdriver
- openCensusAgent
- none
type: string
type: object
proxy_init:
description: Specifies the Configuration for proxy_init container
Expand Down Expand Up @@ -1138,8 +1153,14 @@ spec:
type: integer
tracer:
description: Specifies which tracer to use.
format: int32
type: integer
enum:
- zipkin
- lightstep
- datadog
- stackdriver
- openCensusAgent
- none
type: string
type: object
defaultDestinationRuleExportTo:
description: |-
Expand Down Expand Up @@ -2013,8 +2034,12 @@ spec:
description: |-
Defines whether to use Istio ingress controller for annotated or all ingress resources.
Default mode is `STRICT`.
format: int32
type: integer
enum:
- UNSPECIFIED
- DEFAULT
- STRICT
- "OFF"
type: string
ingressSelector:
description: |-
Defines which gateway deployment to use as the Ingress controller. This field corresponds to
Expand Down

0 comments on commit a60eb25

Please sign in to comment.