Skip to content

Commit

Permalink
fix annotation regression (#864)
Browse files Browse the repository at this point in the history
* add back annotations to SPU service
* update platform version
* update stream-dispatcher
  • Loading branch information
sehz authored Mar 14, 2021
1 parent d6ac007 commit 05eaf3a
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.1-alpha.0
0.7.1-beta.0
4 changes: 2 additions & 2 deletions src/sc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "fluvio-sc"
edition = "2018"
version = "0.6.0"
version = "0.6.1"
authors = ["fluvio.io"]
description = "Fluvio Stream Controller"
repository = "https://github.com/infinyon/fluvio"
Expand Down Expand Up @@ -47,7 +47,7 @@ fluvio-auth = { version = "0.4.0", path = "../auth" }
fluvio-future = { version = "0.2.0", features = ["subscriber", "openssl_tls"] }
fluvio-types = { version = "0.2.0", path = "../types", features = ["events"] }
fluvio-sc-schema = { version = "0.7.0", path = "../sc-schema" }
fluvio-stream-model = { version = "0.5.0" , path = "../stream-model" }
fluvio-stream-model = { version = "0.5.0", path = "../stream-model" }
fluvio-controlplane = { version = "0.6.0", path = "../controlplane" }
fluvio-controlplane-metadata = { version = "0.7.0", features = ["k8", "serde"], path = "../controlplane-metadata" }
fluvio-stream-dispatcher = { version = "0.5.0", path = "../stream-dispatcher" }
Expand Down
13 changes: 7 additions & 6 deletions src/sc/src/k8/controllers/spu_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,14 @@ impl SpuServiceController {

let svc_name = SpuServicespec::service_name(spu_name);

let mut ctx = spg_obj
.ctx()
.create_child()
.set_labels(vec![("fluvio.io/spu-name", spu_name)]);
ctx.item_mut().annotations = spu_k8_config.lb_service_annotations.clone();

let obj = MetadataStoreObject::with_spec(svc_name.clone(), k8_service_spec.into())
.with_context(
spg_obj
.ctx()
.create_child()
.set_labels(vec![("fluvio.io/spu-name", spu_name)]),
);
.with_context(ctx);
debug!("action: {:#?}", obj);
let action = WSAction::Apply(obj);

Expand Down
4 changes: 2 additions & 2 deletions src/stream-dispatcher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "fluvio-stream-dispatcher"
edition = "2018"
version = "0.5.0"
version = "0.5.1"
authors = ["Fluvio Contributors <[email protected]>"]
description = "Fluvio Event Stream access"
repository = "https://github.com/infinyon/fluvio"
Expand All @@ -27,7 +27,7 @@ once_cell = "1.5"

# Fluvio dependencies
fluvio-types = { path = "../types", version = "0.2.0" }
fluvio-stream-model = { features = ["k8"], version = "0.5.0", path = "../stream-model" }
fluvio-stream-model = { features = ["k8"], version = "0.5.1", path = "../stream-model" }
k8-metadata-client = { version = "3.0.0" }
fluvio-future = { version = "0.2.0" }

Expand Down
1 change: 1 addition & 0 deletions src/stream-dispatcher/src/dispatcher/k8_ws_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ where
};

input_metadata.labels = ctx.item().get_labels();
input_metadata.annotations = ctx.item().annotations.clone();

trace!("converted metadata: {:#?}", input_metadata);
let new_k8 = InputK8Obj::new(k8_spec, input_metadata);
Expand Down
2 changes: 1 addition & 1 deletion src/stream-model/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "fluvio-stream-model"
edition = "2018"
version = "0.5.0"
version = "0.5.1"
authors = ["Fluvio Contributors <[email protected]>"]
description = "Fluvio Event Stream Model"
repository = "https://github.com/infinyon/fluvio"
Expand Down
8 changes: 7 additions & 1 deletion src/stream-model/src/store/k8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::convert::TryInto;
use std::num::ParseIntError;
use std::fmt::Display;
use std::fmt::Debug;
use std::ops::Deref;
use std::ops::{Deref, DerefMut};
use std::cmp::PartialEq;
use std::collections::HashMap;

Expand Down Expand Up @@ -87,6 +87,12 @@ impl Deref for K8MetaItem {
}
}

impl DerefMut for K8MetaItem {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.inner
}
}

impl MetadataItem for K8MetaItem {
type UId = String;
fn uid(&self) -> &Self::UId {
Expand Down

0 comments on commit 05eaf3a

Please sign in to comment.