Skip to content

Commit

Permalink
add ability to change image tag
Browse files Browse the repository at this point in the history
  • Loading branch information
milenkovicm committed Aug 13, 2024
1 parent 5489051 commit f736fbb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/kafka/apache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const DEFAULT_BROKER_ID: usize = 1;
pub struct Kafka {
env_vars: HashMap<String, String>,
image_name: String,
tag: String,
}

impl Default for Kafka {
Expand Down Expand Up @@ -88,6 +89,7 @@ impl Default for Kafka {
Self {
env_vars,
image_name: KAFKA_NATIVE_IMAGE_NAME.to_string(),
tag: TAG.to_string(),
}
}
}
Expand All @@ -99,6 +101,11 @@ impl Kafka {

self
}
/// Specify image tag
pub fn with_tag(mut self, tag: &str) -> Self {
self.tag = tag.to_string();
self
}
}

impl Image for Kafka {
Expand All @@ -107,7 +114,7 @@ impl Image for Kafka {
}

fn tag(&self) -> &str {
TAG
self.tag.as_str()
}

fn ready_conditions(&self) -> Vec<WaitFor> {
Expand Down

0 comments on commit f736fbb

Please sign in to comment.