Skip to content

Commit

Permalink
Merge pull request #4118 from tzneal/add-hostname-override-source
Browse files Browse the repository at this point in the history
update to bottlerocket-settings-models v0.2.0
  • Loading branch information
cbgbt authored Aug 1, 2024
2 parents 7f524fa + cd22011 commit 5675fe2
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 33 deletions.
63 changes: 35 additions & 28 deletions sources/Cargo.lock

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

11 changes: 6 additions & 5 deletions sources/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ members = [
"settings-migrations/v1.21.0/pod-infra-container-image-remove-settings-generator",
"settings-migrations/v1.21.0/pod-infra-container-image-services",
"settings-migrations/v1.21.0/k8s-reserved-cpus-v0-1-0",
"settings-migrations/v1.21.0/add-hostname-override-source",

"settings-plugins/aws-dev",
"settings-plugins/aws-ecs-1",
Expand All @@ -60,13 +61,13 @@ version = "0.1.0"

[workspace.dependencies.bottlerocket-modeled-types]
git = "https://github.com/bottlerocket-os/bottlerocket-settings-sdk"
tag = "bottlerocket-settings-models-v0.1.0"
version = "0.1.0"
tag = "bottlerocket-settings-models-v0.2.0"
version = "0.2.0"

[workspace.dependencies.bottlerocket-settings-models]
git = "https://github.com/bottlerocket-os/bottlerocket-settings-sdk"
tag = "bottlerocket-settings-models-v0.1.0"
version = "0.1.0"
tag = "bottlerocket-settings-models-v0.2.0"
version = "0.2.0"

[workspace.dependencies.bottlerocket-settings-plugin]
git = "https://github.com/bottlerocket-os/bottlerocket-settings-sdk"
Expand All @@ -75,7 +76,7 @@ version = "0.1.0"

[workspace.dependencies.settings-extension-oci-defaults]
git = "https://github.com/bottlerocket-os/bottlerocket-settings-sdk"
tag = "bottlerocket-settings-models-v0.1.0"
tag = "bottlerocket-settings-models-v0.2.0"
version = "0.1.0"

[profile.release]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "add-hostname-override-source"
version = "0.1.0"
authors = ["Todd Neal <[email protected]>"]
license = "Apache-2.0 OR MIT"
edition = "2018"
publish = false

[dependencies]
migration-helpers = { path = "../../../api/migration/migration-helpers", version = "0.1.0" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
use migration_helpers::common_migrations::AddSettingsMigration;
use migration_helpers::{migrate, Result};
use std::process;

/// We added one new settings for configuring the override method for the method used to determine
/// the node
fn run() -> Result<()> {
migrate(AddSettingsMigration(&[
"settings.kubernetes.hostname-override-source",
]))
}

// Returning a Result from main makes it print a Debug representation of the error, but with Snafu
// we have nice Display representations of the error, so we wrap "main" (run) and print any error.
// https://github.com/shepmaster/snafu/issues/110
fn main() {
if let Err(e) = run() {
eprintln!("{}", e);
process::exit(1);
}
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[settings.kubernetes]
cloud-provider = "external"
hostname-override-source = "private-dns-name"

0 comments on commit 5675fe2

Please sign in to comment.