Skip to content

Commit

Permalink
fix some code quality stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
greg committed Nov 14, 2023
1 parent 90f8db8 commit 30c5741
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions k8s-cluster/src/kubernetes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl<'a> Kubernetes<'a> {
..Default::default()
}];

if let Some(_) = &self.metrics {
if self.metrics.is_some() {
env_var.push(self.get_metrics_env_var_secret())
}

Expand Down Expand Up @@ -689,7 +689,7 @@ impl<'a> Kubernetes<'a> {
label_selector: &BTreeMap<String, String>,
) -> Result<ReplicaSet, Box<dyn Error>> {
let mut env_vars = self.set_non_bootstrap_environment_variables();
if let Some(_) = &self.metrics {
if self.metrics.is_some() {
env_vars.push(self.get_metrics_env_var_secret())
}

Expand Down Expand Up @@ -740,7 +740,7 @@ impl<'a> Kubernetes<'a> {
label_selector: &BTreeMap<String, String>,
) -> Result<ReplicaSet, Box<dyn Error>> {
let mut env_vars = self.set_non_bootstrap_environment_variables();
if let Some(_) = &self.metrics {
if self.metrics.is_some() {
env_vars.push(self.get_metrics_env_var_secret())
}

Expand Down
2 changes: 1 addition & 1 deletion k8s-cluster/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ async fn main() {
.value_of("validator_image_name")
.expect("Validator image name is required");

if let Some(_) = &kub_controller.metrics {
if kub_controller.metrics.is_some() {
let metrics_secret = match kub_controller.create_metrics_secret() {
Ok(secret) => secret,
Err(err) => {
Expand Down

0 comments on commit 30c5741

Please sign in to comment.