Skip to content

Commit f8cf701

Browse files
committed
test
1 parent 8e43bf7 commit f8cf701

File tree

20 files changed

+2457
-220
lines changed

20 files changed

+2457
-220
lines changed

api/v1beta1/common_types.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,6 @@ const (
199199
PKIBackendK8sCSR PKIBackend = "k8s-csr"
200200
)
201201

202-
// IstioControlPlaneReference is a reference to the IstioControlPlane resource.
203-
type IstioControlPlaneReference struct {
204-
Name string `json:"name"`
205-
Namespace string `json:"namespace"`
206-
}
207-
208202
// GracefulActionState holds information about GracefulAction State
209203
type GracefulActionState struct {
210204
// CruiseControlState holds the information about graceful action state

api/v1beta1/kafkacluster_types.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,8 @@ type KafkaClusterSpec struct {
184184
// Selector for broker pods that need to be recycled/reconciled
185185
TaintedBrokersSelector *metav1.LabelSelector `json:"taintedBrokersSelector,omitempty"`
186186
// +kubebuilder:validation:Enum=envoy;contour;istioingress
187-
// 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.
187+
// IngressController specifies the type of the ingress controller to be used for external listeners.
188188
IngressController string `json:"ingressController,omitempty"`
189-
// IstioControlPlane is a reference to the IstioControlPlane resource for envoy configuration. It must be specified if istio ingress is used.
190-
IstioControlPlane *IstioControlPlaneReference `json:"istioControlPlane,omitempty"`
191189
// If true OneBrokerPerNode ensures that each kafka broker will be placed on a different node unless a custom
192190
// Affinity definition overrides this behavior
193191
OneBrokerPerNode bool `json:"oneBrokerPerNode"`

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 0 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/kafka-operator/crds/kafkaclusters.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20944,27 +20944,12 @@ spec:
2094420944
type: boolean
2094520945
ingressController:
2094620946
description: IngressController specifies the type of the ingress controller
20947-
to be used for external listeners. The `istioingress` ingress controller
20948-
type requires the `spec.istioControlPlane` field to be populated
20949-
as well.
20947+
to be used for external listeners.
2095020948
enum:
2095120949
- envoy
2095220950
- contour
2095320951
- istioingress
2095420952
type: string
20955-
istioControlPlane:
20956-
description: IstioControlPlane is a reference to the IstioControlPlane
20957-
resource for envoy configuration. It must be specified if istio
20958-
ingress is used.
20959-
properties:
20960-
name:
20961-
type: string
20962-
namespace:
20963-
type: string
20964-
required:
20965-
- name
20966-
- namespace
20967-
type: object
2096820953
istioIngressConfig:
2096920954
description: IstioIngressConfig defines the config for the Istio Ingress
2097020955
Controller

config/base/crds/kafka.banzaicloud.io_kafkaclusters.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20944,27 +20944,12 @@ spec:
2094420944
type: boolean
2094520945
ingressController:
2094620946
description: IngressController specifies the type of the ingress controller
20947-
to be used for external listeners. The `istioingress` ingress controller
20948-
type requires the `spec.istioControlPlane` field to be populated
20949-
as well.
20947+
to be used for external listeners.
2095020948
enum:
2095120949
- envoy
2095220950
- contour
2095320951
- istioingress
2095420952
type: string
20955-
istioControlPlane:
20956-
description: IstioControlPlane is a reference to the IstioControlPlane
20957-
resource for envoy configuration. It must be specified if istio
20958-
ingress is used.
20959-
properties:
20960-
name:
20961-
type: string
20962-
namespace:
20963-
type: string
20964-
required:
20965-
- name
20966-
- namespace
20967-
type: object
2096820953
istioIngressConfig:
2096920954
description: IstioIngressConfig defines the config for the Istio Ingress
2097020955
Controller

config/samples/kafkacluster-with-istio.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ metadata:
77
spec:
88
headlessServiceEnabled: false
99
ingressController: "istioingress"
10-
istioControlPlane:
11-
name: istiod # Standard Istio control plane name when installed via Helm
12-
namespace: istio-system
1310
istioIngressConfig:
1411
gatewayConfig:
1512
mode: ISTIO_MUTUAL
@@ -59,6 +56,7 @@ spec:
5956
name: "external"
6057
externalStartingPort: 19090
6158
containerPort: 9094
59+
hostnameOverride: "ingress.test.host.com"
6260
cruiseControlConfig:
6361
topicConfig:
6462
partitions: 12

controllers/tests/kafkacluster_controller_istioingress_test.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ var _ = Describe("KafkaClusterIstioIngressController", func() {
6464
kafkaCluster = createMinimalKafkaClusterCR(kafkaClusterCRName, namespace)
6565

6666
kafkaCluster.Spec.IngressController = istioingress.IngressControllerName
67-
kafkaCluster.Spec.IstioControlPlane = &v1beta1.IstioControlPlaneReference{Name: "istiod", Namespace: "istio-system"}
67+
// Use vanilla Istio Gateway - no IstioControlPlane dependency
6868
kafkaCluster.Spec.ListenersConfig.ExternalListeners = []v1beta1.ExternalListenerConfig{
6969
{
7070
CommonListenerSpec: v1beta1.CommonListenerSpec{
@@ -178,7 +178,8 @@ var _ = Describe("KafkaClusterIstioIngressController", func() {
178178
}).Should(Succeed())
179179

180180
ExpectIstioIngressLabels(gateway.Labels, "external", kafkaClusterCRName)
181-
ExpectIstioIngressLabels(gateway.Spec.Selector, "external", kafkaClusterCRName)
181+
// Check that the Gateway uses vanilla Istio Gateway selector
182+
Expect(gateway.Spec.Selector).To(Equal(map[string]string{"istio": "ingressgateway"}))
182183
Expect(gateway.Spec.Servers).To(ConsistOf(
183184
istioclientv1beta1.Server{
184185
Port: &istioclientv1beta1.Port{
@@ -400,7 +401,7 @@ var _ = Describe("KafkaClusterIstioIngressControllerWithBrokerIdBindings", func(
400401
kafkaCluster = createMinimalKafkaClusterCR(kafkaClusterCRName, namespace)
401402

402403
kafkaCluster.Spec.IngressController = istioingress.IngressControllerName
403-
kafkaCluster.Spec.IstioControlPlane = &v1beta1.IstioControlPlaneReference{Name: "istiod", Namespace: "istio-system"}
404+
// Use vanilla Istio Gateway - no IstioControlPlane dependency
404405
kafkaCluster.Spec.ListenersConfig.ExternalListeners = []v1beta1.ExternalListenerConfig{
405406
{
406407
CommonListenerSpec: v1beta1.CommonListenerSpec{
@@ -504,7 +505,8 @@ var _ = Describe("KafkaClusterIstioIngressControllerWithBrokerIdBindings", func(
504505
}).Should(Succeed())
505506

506507
ExpectIstioIngressLabels(gateway.Labels, "external-az1", kafkaClusterCRName)
507-
ExpectIstioIngressLabels(gateway.Spec.Selector, "external-az1", kafkaClusterCRName)
508+
// Check that the Gateway uses vanilla Istio Gateway selector
509+
Expect(gateway.Spec.Selector).To(Equal(map[string]string{"istio": "ingressgateway"}))
508510
Expect(gateway.Spec.Servers).To(ConsistOf(
509511
istioclientv1beta1.Server{
510512
Port: &istioclientv1beta1.Port{
@@ -609,7 +611,8 @@ var _ = Describe("KafkaClusterIstioIngressControllerWithBrokerIdBindings", func(
609611
}).Should(Succeed())
610612

611613
ExpectIstioIngressLabels(gateway.Labels, "external-az2", kafkaClusterCRName)
612-
ExpectIstioIngressLabels(gateway.Spec.Selector, "external-az2", kafkaClusterCRName)
614+
// Check that the Gateway uses vanilla Istio Gateway selector
615+
Expect(gateway.Spec.Selector).To(Equal(map[string]string{"istio": "ingressgateway"}))
613616
Expect(gateway.Spec.Servers).To(ConsistOf(
614617
istioclientv1beta1.Server{
615618
TLS: &istioclientv1beta1.TLSOptions{

0 commit comments

Comments
 (0)