Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Removed tools image for init and get-svc container #527

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .readme/partials/main.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ metadata:
spec:
image:
productVersion: 3.3.1
stackableVersion: 0.2.0
stackableVersion: 0.3.0
zookeeperConfigMapName: simple-kafka-znode
config:
tls: null
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ All notable changes to this project will be documented in this file.
- operator-rs: 0.26.0 -> 0.27.1 ([#519]).
- Don't run init container as root and avoid chmod and chowning ([#524]).
- [BREAKING] Use Product image selection instead of version. `spec.version` has been replaced by `spec.image` ([#482]).
- [BREAKING]: Removed tools image for init and get-svc container and replaced with Kafka product image. This means the latest stackable version has to be used in the product image selection ([#527])

[#482]: https://github.com/stackabletech/kafka-operator/pull/482
[#513]: https://github.com/stackabletech/kafka-operator/pull/513
[#519]: https://github.com/stackabletech/kafka-operator/pull/519
[#524]: https://github.com/stackabletech/kafka-operator/pull/524
[#527]: https://github.com/stackabletech/kafka-operator/pull/527

## [0.8.0] - 2022-11-07

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ metadata:
spec:
image:
productVersion: 3.3.1
stackableVersion: 0.2.0
stackableVersion: 0.3.0
zookeeperConfigMapName: simple-kafka-znode
config:
tls: null
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/config_properties.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
spec:
image:
productVersion: 3.3.1
stackableVersion: 0.2.0
stackableVersion: 0.3.0
zookeeperConfigMapName: simple-kafka-znode
brokers:
roleGroups:
Expand Down
26 changes: 13 additions & 13 deletions docs/modules/ROOT/pages/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ If you are not installing the operator using Helm then after installation the CR

kubectl apply -f /etc/stackable/kafka-operator/crd/kafkacluster.crd.yaml

To create an Apache Kafka (v3.2.0) cluster named `simple-kafka` assuming that you already have a Zookeeper cluster named `simple-zk`:
To create an Apache Kafka cluster named `simple-kafka` assuming that you already have a Zookeeper cluster named `simple-zk`:

[source,yaml]
----
Expand All @@ -24,8 +24,8 @@ metadata:
name: simple-kafka
spec:
image:
productVersion: 3.2.0
stackableVersion: 0.2.0
productVersion: 3.3.1
stackableVersion: 0.3.0
zookeeperConfigMapName: simple-kafka-znode
brokers:
roleGroups:
Expand All @@ -43,8 +43,8 @@ metadata:
name: simple-kafka
spec:
image:
productVersion: 3.2.0
stackableVersion: 0.2.0
productVersion: 3.3.1
stackableVersion: 0.3.0
zookeeperConfigMapName: simple-kafka-znode
opa:
configMapName: simple-opa
Expand All @@ -66,8 +66,8 @@ metadata:
name: simple-kafka
spec:
image:
productVersion: 3.2.0
stackableVersion: 0.2.0
productVersion: 3.3.1
stackableVersion: 0.3.0
zookeeperConfigMapName: simple-kafka-znode
opa:
configMapName: simple-opa
Expand Down Expand Up @@ -103,8 +103,8 @@ metadata:
name: simple-kafka
spec:
image:
productVersion: 3.2.0
stackableVersion: 0.2.0
productVersion: 3.3.1
stackableVersion: 0.3.0
zookeeperConfigMapName: simple-kafka-znode
log4j: |-
log4j.rootLogger=INFO, stdout, kafkaAppender
Expand Down Expand Up @@ -137,8 +137,8 @@ metadata:
name: simple-kafka
spec:
image:
productVersion: 3.2.0
stackableVersion: 0.2.0
productVersion: 3.3.1
stackableVersion: 0.3.0
zookeeperConfigMapName: simple-kafka-znode
config:
tls:
Expand Down Expand Up @@ -209,8 +209,8 @@ metadata:
name: simple-kafka
spec:
image:
productVersion: 3.2.0
stackableVersion: 0.2.0
productVersion: 3.3.1
stackableVersion: 0.3.0
zookeeperConfigMapName: simple-kafka-znode
config:
tls:
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/getting_started/examples/code/kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
spec:
image:
productVersion: 3.3.1
stackableVersion: 0.2.0
stackableVersion: 0.3.0
zookeeperConfigMapName: simple-kafka-znode
config:
tls: null
Expand Down
2 changes: 1 addition & 1 deletion examples/logging/simple-kafka-cluster-opa-log4j.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ metadata:
spec:
image:
productVersion: 3.3.1
stackableVersion: 0.1.0
stackableVersion: 0.3.0
zookeeperConfigMapName: simple-kafka-znode
opa:
configMapName: simple-opa
Expand Down
2 changes: 1 addition & 1 deletion examples/opa/simple-kafka-cluster-opa-allow-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ metadata:
spec:
image:
productVersion: 3.3.1
stackableVersion: 0.1.0
stackableVersion: 0.3.0
zookeeperConfigMapName: simple-kafka-znode
opa:
configMapName: simple-opa
Expand Down
2 changes: 1 addition & 1 deletion examples/tls/simple-kafka-cluster-tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ metadata:
spec:
image:
productVersion: 3.3.1
stackableVersion: 0.1.0
stackableVersion: 0.3.0
zookeeperConfigMapName: simple-kafka-znode
config:
tls:
Expand Down
2 changes: 1 addition & 1 deletion rust/operator/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn get_svc_container_cmd_args(kafka: &KafkaCluster) -> String {
}

pub fn kcat_container_cmd_args(kafka: &KafkaCluster) -> Vec<String> {
let mut args = vec!["kcat".to_string()];
let mut args = vec!["/stackable/kcat".to_string()];

if kafka.client_authentication_class().is_some() {
args.push("-b".to_string());
Expand Down
11 changes: 5 additions & 6 deletions rust/operator/src/kafka_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ fn build_broker_rolegroup_statefulset(
.context(InvalidContainerNameSnafu {
name: "get-svc".to_string(),
})?
.image("docker.stackable.tech/stackable/tools:0.2.0-stackable0.4.0")
.image_from_product_image(resolved_product_image)
.command(vec!["bash".to_string()])
.args(vec![
"-euo".to_string(),
Expand All @@ -686,7 +686,7 @@ fn build_broker_rolegroup_statefulset(
.build();

cb_prepare
.image("docker.stackable.tech/stackable/tools:0.2.0-stackable0.4.0")
.image_from_product_image(resolved_product_image)
.command(vec![
"/bin/bash".to_string(),
"-euo".to_string(),
Expand Down Expand Up @@ -814,9 +814,9 @@ fn build_broker_rolegroup_statefulset(

// Use kcat sidecar for probing container status rather than the official Kafka tools, since they incur a lot of
// unacceptable perf overhead
let mut container_kcat_prober = cb_kcat_prober
.image("edenhill/kcat:1.7.0")
.command(vec!["sh".to_string()])
let container_kcat_prober = cb_kcat_prober
.image_from_product_image(resolved_product_image)
.command(vec!["sleep".to_string(), "infinity".to_string()])
// Only allow the global load balancing service to send traffic to pods that are members of the quorum
// This also acts as a hint to the StatefulSet controller to wait for each pod to enter quorum before taking down the next
.readiness_probe(Probe {
Expand All @@ -829,7 +829,6 @@ fn build_broker_rolegroup_statefulset(
..Probe::default()
})
.build();
container_kcat_prober.stdin = Some(true);
let mut pod_template = pod_builder
.metadata_builder(|m| {
m.with_recommended_labels(build_recommended_labels(
Expand Down
18 changes: 9 additions & 9 deletions tests/test-definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
dimensions:
- name: kafka
values:
- 2.8.1-stackable0.6.0
- 3.1.0-stackable0.6.0
- 3.2.0-stackable0.2.0
- 3.3.1-stackable0.2.0
- 2.8.1-stackable0.7.0
- 3.1.0-stackable0.7.0
- 3.2.0-stackable0.3.0
- 3.3.1-stackable0.3.0
- name: kafka-latest
values:
- 3.3.1-stackable0.2.0
- 3.3.1-stackable0.3.0
- name: zookeeper
values:
- 3.6.3-stackable0.8.0
Expand All @@ -19,12 +19,12 @@ dimensions:
- 3.8.0-stackable0.8.0
- name: upgrade_old
values:
- 2.8.1-stackable0.6.0
- 3.1.0-stackable0.6.0
- 3.2.0-stackable0.2.0
- 2.8.1-stackable0.7.0
- 3.1.0-stackable0.7.0
- 3.2.0-stackable0.3.0
- name: upgrade_new
values:
- 3.3.1-stackable0.2.0
- 3.3.1-stackable0.3.0
- name: use-client-tls
values:
- "true"
Expand Down