Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update permission bits for kubelet-exec-start-conf #4199

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion Release.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "1.24.1"
version = "1.25.0"

[migrations]
"(0.3.1, 0.3.2)" = ["migrate_v0.3.2_admin-container-v0-5-0.lz4"]
Expand Down Expand Up @@ -357,3 +357,6 @@ version = "1.24.1"
"migrate_v1.24.1_aws-control-container-v0-7-16.lz4",
"migrate_v1.24.1_public-control-container-v0-7-16.lz4",
]
"(1.24.1, 1.25.0)" = [
Sparksssj marked this conversation as resolved.
Show resolved Hide resolved
"migrate_v1.25.0_kubernetes-service-config.lz4",
]
2 changes: 1 addition & 1 deletion Twoliter.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
schema-version = 1
release-version = "1.24.1"
release-version = "1.25.0"

[vendor.bottlerocket]
registry = "public.ecr.aws/bottlerocket"
Expand Down
7 changes: 7 additions & 0 deletions sources/Cargo.lock

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

1 change: 1 addition & 0 deletions sources/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ members = [
"settings-migrations/v1.24.1/public-admin-container-v0-11-12",
"settings-migrations/v1.24.1/aws-control-container-v0-7-16",
"settings-migrations/v1.24.1/public-control-container-v0-7-16",
"settings-migrations/v1.25.0/kubernetes-service-config",

"settings-plugins/aws-dev",
"settings-plugins/aws-ecs-1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "kubernetes-service-config"
version = "0.1.0"
authors = ["Sparks Song <[email protected]>"]
license = "Apache-2.0 OR MIT"
edition = "2021"
publish = false
# Don't rebuild crate just because of changes to README.
exclude = ["README.md"]


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
migration-helpers.workspace = true
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
use migration_helpers::common_migrations::ReplaceStringMigration;
use migration_helpers::{migrate, Result};
use std::process;

const OLD_MODE: &str = "0600";
const NEW_MODE: &str = "0644";

/// We changed the version of configuration mode
fn run() -> Result<()> {
migrate(ReplaceStringMigration {
setting: "configuration-files.kubelet-exec-start-conf.mode",
old_val: OLD_MODE,
new_val: NEW_MODE,
})
}

// 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);
}
}
2 changes: 1 addition & 1 deletion sources/shared-defaults/kubernetes-services.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ template-path = "/usr/share/templates/kubelet-server-key"
[configuration-files.kubelet-exec-start-conf]
path = "/etc/systemd/system/kubelet.service.d/exec-start.conf"
template-path = "/usr/share/templates/kubelet-exec-start-conf"
mode = "0600"
mode = "0644"

[configuration-files.credential-provider-config-yaml]
path = "/etc/kubernetes/kubelet/credential-provider-config.yaml"
Expand Down