Skip to content

Commit a1757d6

Browse files
committed
Add e2e tests
1 parent ba0951a commit a1757d6

File tree

39 files changed

+2888
-318
lines changed

39 files changed

+2888
-318
lines changed

.github/actions/kind-create/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ runs:
4646
chmod 600 $kubeconfig_path
4747
echo "kubeconfig=$(echo $kubeconfig_path)" >> $GITHUB_OUTPUT
4848
shell: bash
49-
49+
5050
- name: Install cloud-provider-kind
5151
id: cloud-provider-kind
5252
run: |
5353
echo "Install cloud-provider-kind"
5454
go install sigs.k8s.io/cloud-provider-kind@latest
55-
kubectl label node e2e-kind-control-plane node.kubernetes.io/exclude-from-external-load-balancers-
55+
kubectl label node e2e-kind-control-plane node.kubernetes.io/exclude-from-external-load-balancers-
5656
~/go/bin/cloud-provider-kind &
5757
shell: bash

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ jobs:
6060
run: |
6161
# Build main module
6262
go build ./...
63-
63+
6464
# Build api module
6565
cd api
6666
go build ./...
6767
cd ..
68-
68+
6969
# Build properties module
7070
cd properties
7171
go build ./...
7272
cd ..
73-
73+
7474
# Build main binary
7575
go build -o bin/manager main.go
7676

.github/workflows/e2e-test.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
env:
14-
REPOSITORY: koperator_e2e_test
14+
REPOSITORY: koperator_e2e_test
1515

1616
jobs:
1717
build:
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- name: Checkout code
2222
uses: actions/checkout@v5
23-
23+
2424
- name: Clean workspace
2525
run: |
2626
# Remove any existing go.work files to ensure clean module resolution
@@ -35,7 +35,7 @@ jobs:
3535
uses: azure/setup-helm@v4
3636
with:
3737
version: '3.19.0'
38-
38+
3939
- name: Clean Go module cache
4040
run: |
4141
# Clean any existing Go module cache to avoid conflicts
@@ -47,13 +47,17 @@ jobs:
4747
# Ensure proper permissions
4848
chmod -R 755 ~/go/pkg/mod
4949
chmod -R 755 ~/.cache/go-build
50-
51-
# Enable Tmate Session if you'd like to Debut the E2E Kind Cluster
52-
# - name: Setup tmate session
53-
# uses: mxschmitt/action-tmate@v3
54-
# with:
55-
# detached: true
56-
50+
51+
# Enable Tmate Session to debug the E2E Kind Cluster
52+
# Only activates when re-running the workflow in debug mode
53+
- name: Setup tmate session
54+
if: ${{ runner.debug == '1' }}
55+
continue-on-error: true
56+
uses: mxschmitt/action-tmate@v3
57+
with:
58+
detached: true
59+
limit-access-to-actor: true
60+
5761
- name: Build docker image
5862
run: |
5963
IMG=$REPOSITORY:$GITHUB_SHA make docker-build
@@ -75,11 +79,13 @@ jobs:
7579
cd properties && go mod download && cd ..
7680
cd tests/e2e && go mod download && cd ../..
7781
78-
82+
7983
- name: Run E2E tests
8084
env:
8185
KUBECONFIG: ${{ steps.setup-kind.outputs.kubeconfig }}
8286
run: |
8387
# Clean any existing go.work files to avoid workspace conflicts
8488
rm -f go.work go.work.sum
8589
IMG_E2E=$REPOSITORY:$GITHUB_SHA make test-e2e
90+
91+

ADOPTERS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Adopters
22
This is a list of production adopters of Banzai Cloud's Kafka Operator (in alphabetical order):
3-
3+
44
- Adobe Experience Platform is using the Kafka Operator to enable consistent deployment, dynamic scaling, smooth upgrades and auto-balancing in our cross-cloud Kafka infrastructure. Adobe is also contributing to the open source version of the operator.
55

66
- [Banzai Cloud](https://banzaicloud.com) is using the Kafka Operator to provision, configure and manage a secure, resilient and autoscaling production ready Apache Kafka for customers.
77

8-
- AffirmedNetworks is looking to use Kafka Operator to provision, configure and manage life cycle of production ready Apache Kafka. One of the use cases we are looking at, is to use Kafka to manage Event Data/Detail Record that gets generated in our applications.
8+
- AffirmedNetworks is looking to use Kafka Operator to provision, configure and manage life cycle of production ready Apache Kafka. One of the use cases we are looking at, is to use Kafka to manage Event Data/Detail Record that gets generated in our applications.

api/assets/kafka/kraft-controller-healthcheck.sh

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ MATCHING_METRIC=$(curl -s "$JMX_ENDPOINT" | grep "^${METRIC_PREFIX}" | awk '$2 =
3232

3333
# If it's not empty, it means we found a metric with a value of 1.0.
3434
if [ -n "$MATCHING_METRIC" ]; then
35-
# Determine the state of the controller using the last field name of the metric
35+
# Determine the state of the controller using the last field name of the metric
3636
# Possible values are leader, candidate, voted, follower, unattached, observer
3737
STATE=$(echo "$MATCHING_METRIC" | rev | cut -d'_' -f1 | rev)
3838

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
@@ -187,10 +187,8 @@ type KafkaClusterSpec struct {
187187
// Selector for broker pods that need to be recycled/reconciled
188188
TaintedBrokersSelector *metav1.LabelSelector `json:"taintedBrokersSelector,omitempty"`
189189
// +kubebuilder:validation:Enum=envoy;contour;istioingress
190-
// 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.
190+
// IngressController specifies the type of the ingress controller to be used for external listeners.
191191
IngressController string `json:"ingressController,omitempty"`
192-
// IstioControlPlane is a reference to the IstioControlPlane resource for envoy configuration. It must be specified if istio ingress is used.
193-
IstioControlPlane *IstioControlPlaneReference `json:"istioControlPlane,omitempty"`
194192
// If true OneBrokerPerNode ensures that each kafka broker will be placed on a different node unless a custom
195193
// Affinity definition overrides this behavior
196194
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

0 commit comments

Comments
 (0)