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

Changes the node object which is created by the agent in Kubernetes to report the Stackable Agent version, not the Krustlet version #315

Merged
merged 2 commits into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

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

### 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