Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Commit

Permalink
Changes the node object which is created by the agent in Kubernetes t…
Browse files Browse the repository at this point in the history
…o report the Stackable Agent version, not the Krustlet version. (#315)

A running Stackable agent registers a node at the K8s API.
In its metadata, it sets its version to the version of the underlying krustlet. It would be more convenient for us to see the actual stackable-agent version there.
Additionally, we should remove/overwrite the label type so that it does no longer hold the value krustlet which might lead to wrongly scheduled pods if Stackable coexists with other platforms that use the krustlet.

This changes the node object which is created by the agent in Kubernetes to report the Stackable Agent version, not the Krustlet version
  • Loading branch information
soenkeliebau authored Oct 8, 2021
1 parent 8aceba2 commit f16485d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
[#312]: https://github.com/stackabletech/agent/pull/312
[#318]: https://github.com/stackabletech/agent/pull/318

### Changed
- Changed the version reported by the Stackable Agent in `nodeInfo.kubeletVersion` of the `Node` object in Kubernetes
from the version of the Krustlet library to the Stackable Agent version ([#315]).

[#315]: https://github.com/stackabletech/agent/pull/315

## [0.6.1] - 2021-09-14

### Changed
Expand Down
6 changes: 6 additions & 0 deletions src/provider/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ mod repository;
mod states;
pub mod systemdmanager;

mod built_info {
// The file has been placed there by the build script.
include!(concat!(env!("OUT_DIR"), "/built.rs"));
}

/// Provider-level state shared between all pods
#[derive(Clone)]
pub struct ProviderState {
Expand Down Expand Up @@ -240,6 +245,7 @@ impl Provider for StackableProvider {
async fn node(&self, builder: &mut Builder) -> anyhow::Result<()> {
builder.set_architecture(Self::ARCH);
builder.set_pod_cidr(&self.pod_cidr);
builder.set_kubelet_version(built_info::PKG_VERSION);
builder.add_taint("NoSchedule", "kubernetes.io/arch", Self::ARCH);
builder.add_taint("NoExecute", "kubernetes.io/arch", Self::ARCH);
Ok(())
Expand Down

0 comments on commit f16485d

Please sign in to comment.