@@ -24,8 +24,6 @@ import (
2424
2525 "dario.cat/mergo"
2626
27- "github.com/banzaicloud/istio-client-go/pkg/networking/v1beta1"
28-
2927 cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1"
3028 corev1 "k8s.io/api/core/v1"
3129 "k8s.io/apimachinery/pkg/api/resource"
@@ -131,19 +129,6 @@ const (
131129 // KafkaBroker.spec.container["kafka"].image
132130 defaultKafkaImage = "ghcr.io/adobe/koperator/kafka:2.13-3.9.1" // renovate: datasource=docker depName=ghcr.io/adobe/koperator/kafka
133131
134- /* Istio Ingress Config */
135-
136- // IstioMeshGateway.spec.deployment.resources
137- defaultIstioIngressRequestResourceCpu = "100m"
138- defaultIstioIngressRequestResourceMemory = "128Mi"
139- defaultIstioIngressLimitResourceCpu = "2000m"
140- defaultIstioIngressLimitResourceMemory = "1024Mi"
141-
142- // IstioMeshGateway.spec.deployment.replicas.count
143- // IstioMeshGateway.spec.deployment.replicas.min
144- // IstioMeshGateway.spec.deployment.replicas.max
145- defaultReplicas = 1
146-
147132 /* Monitor Config */
148133
149134 // KafkaBrokerPod.spec.initContainer["jmx-exporter"].command
@@ -184,11 +169,9 @@ type KafkaClusterSpec struct {
184169 RollingUpgradeConfig RollingUpgradeConfig `json:"rollingUpgradeConfig"`
185170 // Selector for broker pods that need to be recycled/reconciled
186171 TaintedBrokersSelector * metav1.LabelSelector `json:"taintedBrokersSelector,omitempty"`
187- // +kubebuilder:validation:Enum=envoy;contour;istioingress
188- // IngressController specifies the type of the ingress controller to be used for external listeners. The `istioingress` ingress controller type requires the `spec.istioControlPlane` field to be populated as well.
172+ // +kubebuilder:validation:Enum=envoy;contour
173+ // IngressController specifies the type of the ingress controller to be used for external listeners.
189174 IngressController string `json:"ingressController,omitempty"`
190- // IstioControlPlane is a reference to the IstioControlPlane resource for envoy configuration. It must be specified if istio ingress is used.
191- IstioControlPlane * IstioControlPlaneReference `json:"istioControlPlane,omitempty"`
192175 // If true OneBrokerPerNode ensures that each kafka broker will be placed on a different node unless a custom
193176 // Affinity definition overrides this behavior
194177 OneBrokerPerNode bool `json:"oneBrokerPerNode"`
@@ -203,7 +186,6 @@ type KafkaClusterSpec struct {
203186 ContourIngressConfig ContourIngressConfig `json:"contourIngressConfig,omitempty"`
204187 MonitoringConfig MonitoringConfig `json:"monitoringConfig,omitempty"`
205188 AlertManagerConfig * AlertManagerConfig `json:"alertManagerConfig,omitempty"`
206- IstioIngressConfig IstioIngressConfig `json:"istioIngressConfig,omitempty"`
207189 // Envs defines environment variables for Kafka broker Pods.
208190 // Adding the "+" prefix to the name prepends the value to that environment variable instead of overwriting it.
209191 // Add the "+" suffix to append.
@@ -509,42 +491,6 @@ type EnvoyCommandLineArgs struct {
509491 Concurrency int32 `json:"concurrency,omitempty"`
510492}
511493
512- // IstioIngressConfig defines the config for the Istio Ingress Controller
513- type IstioIngressConfig struct {
514- Resources * corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
515- // +kubebuilder:validation:Minimum=1
516- Replicas int32 `json:"replicas,omitempty"`
517- NodeSelector map [string ]string `json:"nodeSelector,omitempty"`
518- Tolerations []* corev1.Toleration `json:"tolerations,omitempty"`
519- // Annotations defines the annotations placed on the istio ingress controller deployment
520- Annotations map [string ]string `json:"annotations,omitempty"`
521- TLSOptions * v1beta1.TLSOptions `json:"gatewayConfig,omitempty"`
522- VirtualServiceAnnotations map [string ]string `json:"virtualServiceAnnotations,omitempty"`
523- // Envs allows to add additional env vars to the istio meshgateway resource
524- Envs []* corev1.EnvVar `json:"envs,omitempty"`
525- // If specified and supported by the platform, traffic through the
526- // cloud-provider load-balancer will be restricted to the specified client
527- // IPs. This field will be ignored if the
528- // cloud-provider does not support the feature."
529- // More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
530- // +optional
531- LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"`
532- }
533-
534- func (iIConfig * IstioIngressConfig ) GetAnnotations () map [string ]string {
535- return util .CloneMap (iIConfig .Annotations )
536- }
537-
538- // GetVirtualServiceAnnotations returns a copy of the VirtualServiceAnnotations field
539- func (iIConfig * IstioIngressConfig ) GetVirtualServiceAnnotations () map [string ]string {
540- return util .CloneMap (iIConfig .VirtualServiceAnnotations )
541- }
542-
543- // GetLoadBalancerSourceRanges returns LoadBalancerSourceRanges to use for Istio Meshagetway generated LoadBalancer
544- func (iIConfig * IstioIngressConfig ) GetLoadBalancerSourceRanges () []string {
545- return iIConfig .LoadBalancerSourceRanges
546- }
547-
548494// MonitoringConfig defines the config for monitoring Kafka and Cruise Control
549495type MonitoringConfig struct {
550496 JmxImage string `json:"jmxImage,omitempty"`
@@ -725,7 +671,7 @@ type ExternalListenerConfig struct {
725671 // +optional
726672 AccessMethod corev1.ServiceType `json:"accessMethod,omitempty"`
727673 // Config allows to specify ingress controller configuration per external listener
728- // if set, it overrides the default `KafkaClusterSpec.IstioIngressConfig` or `KafkaClusterSpec. EnvoyConfig` for this external listener.
674+ // if set, it overrides the default `KafkaClusterSpec.EnvoyConfig` for this external listener.
729675 // +optional
730676 Config * Config `json:"config,omitempty"`
731677 // TLS secret
@@ -740,7 +686,6 @@ type Config struct {
740686
741687type IngressConfig struct {
742688 IngressServiceSettings `json:",inline"`
743- IstioIngressConfig * IstioIngressConfig `json:"istioIngressConfig,omitempty"`
744689 EnvoyConfig * EnvoyConfig `json:"envoyConfig,omitempty"`
745690 ContourIngressConfig * ContourIngressConfig `json:"contourIngressConfig,omitempty"`
746691}
@@ -858,23 +803,6 @@ func init() {
858803 SchemeBuilder .Register (& KafkaCluster {}, & KafkaClusterList {})
859804}
860805
861- // GetResources returns the IstioIngress specific Kubernetes resources
862- func (iIConfig * IstioIngressConfig ) GetResources () * corev1.ResourceRequirements {
863- if iIConfig .Resources != nil {
864- return iIConfig .Resources
865- }
866- return & corev1.ResourceRequirements {
867- Requests : corev1.ResourceList {
868- "cpu" : resource .MustParse (defaultIstioIngressRequestResourceCpu ),
869- "memory" : resource .MustParse (defaultIstioIngressRequestResourceMemory ),
870- },
871- Limits : corev1.ResourceList {
872- "cpu" : resource .MustParse (defaultIstioIngressLimitResourceCpu ),
873- "memory" : resource .MustParse (defaultIstioIngressLimitResourceMemory ),
874- },
875- }
876- }
877-
878806// GetListenerName returns the prepared listener name
879807func (lP * CommonListenerSpec ) GetListenerServiceName () string {
880808 if ! strings .HasPrefix (lP .Name , "tcp-" ) {
@@ -883,14 +811,6 @@ func (lP *CommonListenerSpec) GetListenerServiceName() string {
883811 return lP .Name
884812}
885813
886- // GetReplicas returns replicas used by the Istio Ingress deployment
887- func (iIConfig * IstioIngressConfig ) GetReplicas () int32 {
888- if iIConfig .Replicas == 0 {
889- return defaultReplicas
890- }
891- return iIConfig .Replicas
892- }
893-
894814// GetClientSSLCertSecretName returns the ClientSSLCertSecretName. It returns empty string if It's not specified
895815func (k * KafkaClusterSpec ) GetClientSSLCertSecretName () string {
896816 if k .ClientSSLCertSecret == nil {
0 commit comments