Skip to content

Commit

Permalink
Updated Kafka broker image version (3.1.0->)3.1.2 (#1005)
Browse files Browse the repository at this point in the history
* fix(kafka): updated kafka version (3.1.0->)3.1.2

To fix vulnerabilities and incorporate patches.

* chore(dep): updated Koperator API (0.28.3->)0.28.4
  • Loading branch information
pregnor authored Jul 12, 2023
1 parent 8fa9280 commit 714d07b
Show file tree
Hide file tree
Showing 27 changed files with 212 additions and 99 deletions.
12 changes: 6 additions & 6 deletions config/samples/banzaicloud_v1beta1_kafkacluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:

# Specify the Kafka Broker related settings
# clusterImage can specify the whole kafkacluster image in one place
#clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0
#clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2

#clusterWideConfig specifies the cluster-wide kafka config cluster wide, all these can be overridden per-broker
#clusterWideConfig: |
Expand Down Expand Up @@ -169,7 +169,7 @@ spec:
cruise.control.metrics.topic.replication.factor=2
brokerConfig:
# Docker image used by the operator to create the Broker with id 0
#image: "ghcr.io/banzaicloud/kafka:2.13-3.1.0
#image: "ghcr.io/banzaicloud/kafka:2.13-3.1.2
# resourceRequirements works exactly like Container resources, the user can specify the limit and the requests
# through this property
#resourceRequirements:
Expand All @@ -189,11 +189,11 @@ spec:
# which has type per-broker
# priorityClassName can be used to set the broker pod's priority
# priorityClassName: "high-priority"

# When "hostNameOverride" and brokerConfig.nodePortExternalIP are empty and NodePort access method is selected for external listener
# nodePortNodeAdddressType defines the Kafka broker's Kubernetes node's address type that shall be used in the advertised.listeners property
# when nodeport is used for an external listener.
# its values can be Hostname, ExternalIP, InternalIP, InternalDNS,ExternalDNS
# its values can be Hostname, ExternalIP, InternalIP, InternalDNS,ExternalDNS
#nodePortNodeAddressType: "ExternalIP"
config: |
sasl.enabled.mechanisms=PLAIN
Expand Down Expand Up @@ -240,7 +240,7 @@ spec:
#volumeMounts:
# - mountPath: "/opt/kafka/libs/extra-jars"
# name: "jars"
- image: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
- image: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
id: 1
config: |
auto.create.topics.enable=false
Expand All @@ -262,7 +262,7 @@ spec:
readOnlyConfig: |
auto.create.topics.enable=false
brokerConfig:
image: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
image: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
storageConfigs:
- mountPath: "/kafka-logs"
pvcSpec:
Expand Down
6 changes: 3 additions & 3 deletions config/samples/kafkacluster-prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ spec:
storageClass: 'gp2'
mountPath: '/kafkalog'
diskSize: '10G'
image: 'ghcr.io/banzaicloud/kafka:2.13-3.1.0'
image: 'ghcr.io/banzaicloud/kafka:2.13-3.1.2'
# annotations to be applied onto the broker pod
# brokerAnnotations: '{ "sidecar.istio.io/logLevel": "trace", "sidecar.istio.io/proxyCPULimit": "50m" }'
command: 'upScale'
Expand All @@ -101,7 +101,7 @@ spec:
storageClass: 'gp2'
mountPath: '/kafkalog'
diskSize: '10G'
image: 'ghcr.io/banzaicloud/kafka:2.13-3.1.0'
image: 'ghcr.io/banzaicloud/kafka:2.13-3.1.2'
# annotations to be applied onto the broker pod
# brokerAnnotations: '{ "sidecar.istio.io/logLevel": "trace", "sidecar.istio.io/proxyCPULimit": "50m" }'
command: 'upScale'
Expand All @@ -117,7 +117,7 @@ spec:
storageClass: 'gp2'
mountPath: '/kafkalog'
diskSize: '10G'
image: 'ghcr.io/banzaicloud/kafka:2.13-3.1.0'
image: 'ghcr.io/banzaicloud/kafka:2.13-3.1.2'
# annotations to be applied onto the broker pod
# brokerAnnotations: '{ "sidecar.istio.io/logLevel": "trace", "sidecar.istio.io/proxyCPULimit": "50m" }'
command: 'upScale'
Expand Down
2 changes: 1 addition & 1 deletion config/samples/kafkacluster-with-istio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
zkAddresses:
- "zookeeper-server-client.zookeeper:2181"
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
2 changes: 1 addition & 1 deletion config/samples/kafkacluster_with_external_ssl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
zkAddresses:
- "zookeeper-server-client.zookeeper:2181"
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
zkAddresses:
- "zookeeper-server-client.zookeeper:2181"
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
2 changes: 1 addition & 1 deletion config/samples/kafkacluster_with_ssl_groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
- "failure-domain.beta.kubernetes.io/region"
- "failure-domain.beta.kubernetes.io/zone"
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
- "failure-domain.beta.kubernetes.io/region"
- "failure-domain.beta.kubernetes.io/zone"
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
- "failure-domain.beta.kubernetes.io/region"
- "failure-domain.beta.kubernetes.io/zone"
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
2 changes: 1 addition & 1 deletion config/samples/kafkacluster_without_ssl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
zkAddresses:
- "zookeeper-server-client.zookeeper:2181"
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
2 changes: 1 addition & 1 deletion config/samples/kafkacluster_without_ssl_groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
zkAddresses:
- "zookeeper-server-client.zookeeper:2181"
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
2 changes: 1 addition & 1 deletion config/samples/simplekafkacluster-with-brokerbindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
- "zookeeper-server-client.zookeeper:2181"
propagateLabels: false
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
- "zookeeper-server-client.zookeeper:2181"
propagateLabels: false
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
2 changes: 1 addition & 1 deletion config/samples/simplekafkacluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
- "zookeeper-server-client.zookeeper:2181"
propagateLabels: false
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
2 changes: 1 addition & 1 deletion config/samples/simplekafkacluster_affinity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
# If true OneBrokerPerNode ensures that each kafka broker will be placed on a different node unless a custom
# Affinity definition overrides this behavior either set in brokerConfigGroups or in one specific brokerConfig
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
2 changes: 1 addition & 1 deletion config/samples/simplekafkacluster_ebs_csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
zkPath: "/kafka"
propagateLabels: true
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
2 changes: 1 addition & 1 deletion config/samples/simplekafkacluster_ssl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
- "zookeeper-server-client.zookeeper:2181"
propagateLabels: false
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
- "zookeeper-server-client.zookeeper:2181"
propagateLabels: false
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
2 changes: 1 addition & 1 deletion config/samples/simplekafkacluster_with_sasl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
- "zookeeper-server-client.zookeeper:2181"
propagateLabels: false
oneBrokerPerNode: false
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
cruise.control.metrics.topic.auto.create=true
Expand Down
2 changes: 1 addition & 1 deletion controllers/tests/clusterregistry/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func createMinimalKafkaClusterCR(name, namespace string) *v1beta1.KafkaCluster {
BrokerConfigGroup: defaultBrokerConfigGroup,
},
},
ClusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0",
ClusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2",
ZKAddresses: []string{},
MonitoringConfig: v1beta1.MonitoringConfig{
CCJMXExporterConfig: "custom_property: custom_value",
Expand Down
2 changes: 1 addition & 1 deletion controllers/tests/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func createMinimalKafkaClusterCR(name, namespace string) *v1beta1.KafkaCluster {
BrokerConfigGroup: defaultBrokerConfigGroup,
},
},
ClusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0",
ClusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2",
ZKAddresses: []string{},
MonitoringConfig: v1beta1.MonitoringConfig{
CCJMXExporterConfig: "custom_property: custom_value",
Expand Down
2 changes: 1 addition & 1 deletion controllers/tests/kafkacluster_controller_kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func expectKafkaBrokerPod(ctx context.Context, kafkaCluster *v1beta1.KafkaCluste
Expect(pod.Spec.Containers[1]).To(WithTransform(getContainerName, Equal("test-container")))
container := pod.Spec.Containers[0]
Expect(container.Name).To(Equal("kafka"))
Expect(container.Image).To(Equal("ghcr.io/banzaicloud/kafka:2.13-3.1.0"))
Expect(container.Image).To(Equal("ghcr.io/banzaicloud/kafka:2.13-3.1.2"))
Expect(container.Lifecycle).NotTo(BeNil())
Expect(container.Lifecycle.PreStop).NotTo(BeNil())
getEnvName := func(c corev1.EnvVar) string { return c.Name }
Expand Down
2 changes: 1 addition & 1 deletion docs/benchmarks/infrastructure/kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
zkAddresses:
- "zookeeper-server-client.zookeeper:2181"
oneBrokerPerNode: true
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
rackAwareness:
Expand Down
2 changes: 1 addition & 1 deletion docs/benchmarks/infrastructure/kafka_202001_3brokers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
zkAddresses:
- "zookeeper-server-client.zookeeper:2181"
oneBrokerPerNode: true
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.0"
clusterImage: "ghcr.io/banzaicloud/kafka:2.13-3.1.2"
readOnlyConfig: |
auto.create.topics.enable=false
min.insync.replicas=3
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/banzaicloud/istio-client-go v0.0.17
github.com/banzaicloud/istio-operator/api/v2 v2.15.1
github.com/banzaicloud/k8s-objectmatcher v1.8.0
github.com/banzaicloud/koperator/api v0.28.3
github.com/banzaicloud/koperator/api v0.28.4
github.com/banzaicloud/koperator/properties v0.4.1
github.com/cert-manager/cert-manager v1.11.2
github.com/cisco-open/cluster-registry-controller/api v0.2.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ github.com/banzaicloud/istio-operator/api/v2 v2.15.1 h1:BZg8COvoOJtfx/dgN7KpoOnc
github.com/banzaicloud/istio-operator/api/v2 v2.15.1/go.mod h1:5qCpwWlIfxiLvBfTvT2mD2wp5RlFCDEt8Xql4sYPNBc=
github.com/banzaicloud/k8s-objectmatcher v1.8.0 h1:Nugn25elKtPMTA2br+JgHNeSQ04sc05MDPmpJnd1N2A=
github.com/banzaicloud/k8s-objectmatcher v1.8.0/go.mod h1:p2LSNAjlECf07fbhDyebTkPUIYnU05G+WfGgkTmgeMg=
github.com/banzaicloud/koperator/api v0.28.3 h1:bD4vBJr0Bsw+oX1kDV+hp/XR5hWp+g3YwIJi7TuHh6o=
github.com/banzaicloud/koperator/api v0.28.3/go.mod h1:fo0y8UdiH9YPE+sIK5LcJWG6hd0pIA13F4li6DOIal4=
github.com/banzaicloud/koperator/api v0.28.4 h1:ZVLGvWbxuJI4+3123141mcRVK+x6p7IWxO3BtBVc0LQ=
github.com/banzaicloud/koperator/api v0.28.4/go.mod h1:fo0y8UdiH9YPE+sIK5LcJWG6hd0pIA13F4li6DOIal4=
github.com/banzaicloud/koperator/properties v0.4.1 h1:SB2QgXlcK1Dc7Z1rg65PJifErDa8OQnoWCCJgmC7SGc=
github.com/banzaicloud/koperator/properties v0.4.1/go.mod h1:TcL+llxuhW3UeQtVEDYEXGouFLF2P+LuZZVudSb6jyA=
github.com/banzaicloud/operator-tools v0.28.0 h1:GSfc0qZr6zo7WrNxdgWZE1LcTChPU8QFYOTDirYVtIM=
Expand Down
36 changes: 34 additions & 2 deletions tests/e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.20

require (
emperror.dev/errors v0.8.1
github.com/banzaicloud/koperator v0.25.0
github.com/cisco-open/k8s-objectmatcher v1.9.0
github.com/gruntwork-io/terratest v0.41.24
github.com/onsi/ginkgo/v2 v2.9.5
Expand All @@ -16,27 +17,58 @@ require (

require (
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Shopify/sarama v1.36.0 // indirect
github.com/banzaicloud/istio-client-go v0.0.17 // indirect
github.com/banzaicloud/koperator/properties v0.4.1 // indirect
github.com/banzaicloud/operator-tools v0.28.0 // indirect
github.com/briandowns/spinner v1.12.0 // indirect
github.com/cisco-open/cluster-registry-controller/api v0.2.5 // indirect
github.com/cppforlife/go-patch v0.2.0 // indirect
github.com/eapache/go-resiliency v1.3.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/iancoleman/orderedmap v0.2.0 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.3 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/klauspost/compress v1.16.3 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/pavlo-v-chernykh/keystore-go/v4 v4.4.1 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/tidwall/gjson v1.9.3 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/twmb/franz-go/pkg/kmsg v1.4.0 // indirect
github.com/wayneashleyberry/terminal-dimensions v1.0.0 // indirect
go.uber.org/zap v1.24.0 // indirect
sigs.k8s.io/controller-runtime v0.14.6 // indirect
)

require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/aws/aws-sdk-go v1.44.122 // indirect
github.com/banzaicloud/koperator/api v0.28.2
github.com/banzaicloud/koperator/api v0.28.3
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
github.com/cert-manager/cert-manager v1.11.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
Expand Down
Loading

0 comments on commit 714d07b

Please sign in to comment.