Skip to content

Commit

Permalink
Merge pull request #3971 from mgsharm/pki-settings-extension
Browse files Browse the repository at this point in the history
Pki settings extension
  • Loading branch information
mgsharm authored May 20, 2024
2 parents 0d6b452 + 34e40f2 commit f7a5677
Show file tree
Hide file tree
Showing 27 changed files with 273 additions and 34 deletions.
21 changes: 21 additions & 0 deletions packages/settings-pki/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "settings-pki"
version = "0.1.0"
edition = "2021"
publish = false
build = "../build.rs"

[lib]
path = "../packages.rs"

[package.metadata.build-package]
source-groups = [
"settings-extensions/pki"
]

# RPM BuildRequires
[build-dependencies]
glibc = { path = "../glibc" }

# RPM Requires
[dependencies]
39 changes: 39 additions & 0 deletions packages/settings-pki/settings-pki.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
%global _cross_first_party 1
%undefine _debugsource_packages

%global extension_name pki

Name: %{_cross_os}settings-%{extension_name}
Version: 0.0
Release: 0%{?dist}
Summary: settings-%{extension_name}
License: Apache-2.0 OR MIT
URL: https://github.com/bottlerocket-os/bottlerocket

BuildRequires: %{_cross_os}glibc-devel

%description
%{summary}.

%prep
%setup -T -c
%cargo_prep

%build
%cargo_build --manifest-path %{_builddir}/sources/Cargo.toml \
-p settings-extension-%{extension_name}

%install
install -d %{buildroot}%{_cross_libexecdir}
install -p -m 0755 \
${HOME}/.cache/%{__cargo_target}/release/settings-extension-%{extension_name} \
%{buildroot}%{_cross_libexecdir}

install -d %{buildroot}%{_cross_libexecdir}/settings
ln -sf \
../settings-extension-%{extension_name} \
%{buildroot}%{_cross_libexecdir}/settings/%{extension_name}

%files
%{_cross_libexecdir}/settings-extension-%{extension_name}
%{_cross_libexecdir}/settings/%{extension_name}
13 changes: 13 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 @@ -133,6 +133,7 @@ members = [
"settings-extensions/kernel",
"settings-extensions/motd",
"settings-extensions/ntp",
"settings-extensions/pki",
"settings-extensions/updates",

"static-pods",
Expand Down
1 change: 1 addition & 0 deletions sources/models/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ settings-extension-container-registry = { path = "../settings-extensions/contain
settings-extension-kernel = { path = "../settings-extensions/kernel", version = "0.1" }
settings-extension-motd = { path = "../settings-extensions/motd", version = "0.1" }
settings-extension-ntp = { path = "../settings-extensions/ntp", version = "0.1" }
settings-extension-pki = { path = "../settings-extensions/pki", version = "0.1" }
settings-extension-updates = { path = "../settings-extensions/updates", version = "0.1" }

[build-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-dev/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::HashMap;

use crate::{
BootSettings, BootstrapContainer, CloudFormationSettings, DnsSettings, HostContainer,
MetricsSettings, NetworkSettings, OciHooks, PemCertificate,
MetricsSettings, NetworkSettings, OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -21,7 +21,7 @@ struct Settings {
boot: BootSettings,
aws: settings_extension_aws::AwsSettingsV1,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-ecs-1-nvidia/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::HashMap;

use crate::{
AutoScalingSettings, BootstrapContainer, CloudFormationSettings, DnsSettings, ECSSettings,
HostContainer, MetricsSettings, NetworkSettings, OciDefaults, OciHooks, PemCertificate,
HostContainer, MetricsSettings, NetworkSettings, OciDefaults, OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -21,7 +21,7 @@ struct Settings {
aws: settings_extension_aws::AwsSettingsV1,
ecs: ECSSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-ecs-1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::HashMap;

use crate::{
AutoScalingSettings, BootstrapContainer, CloudFormationSettings, DnsSettings, ECSSettings,
HostContainer, MetricsSettings, NetworkSettings, OciDefaults, OciHooks, PemCertificate,
HostContainer, MetricsSettings, NetworkSettings, OciDefaults, OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -21,7 +21,7 @@ struct Settings {
aws: settings_extension_aws::AwsSettingsV1,
ecs: ECSSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
Expand Down
3 changes: 1 addition & 2 deletions sources/models/src/aws-ecs-2-nvidia/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::collections::HashMap;
use crate::{
AutoScalingSettings, BootSettings, BootstrapContainer, CloudFormationSettings, DnsSettings,
ECSSettings, HostContainer, MetricsSettings, NetworkSettings, OciDefaults, OciHooks,
PemCertificate,
};
use modeled_types::Identifier;

Expand All @@ -23,7 +22,7 @@ struct Settings {
aws: settings_extension_aws::AwsSettingsV1,
ecs: ECSSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
Expand Down
3 changes: 1 addition & 2 deletions sources/models/src/aws-ecs-2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::collections::HashMap;
use crate::{
AutoScalingSettings, BootSettings, BootstrapContainer, CloudFormationSettings, DnsSettings,
ECSSettings, HostContainer, MetricsSettings, NetworkSettings, OciDefaults, OciHooks,
PemCertificate,
};
use modeled_types::Identifier;

Expand All @@ -23,7 +22,7 @@ struct Settings {
aws: settings_extension_aws::AwsSettingsV1,
ecs: ECSSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.24-nvidia/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
AutoScalingSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
ContainerRuntimeSettings, DnsSettings, HostContainer, KubernetesSettings, MetricsSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate,
NetworkSettings, OciDefaults, OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -23,7 +23,7 @@ struct Settings {
boot: BootSettings,
aws: settings_extension_aws::AwsSettingsV1,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.24/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
AutoScalingSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
ContainerRuntimeSettings, DnsSettings, HostContainer, KubernetesSettings, MetricsSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate,
NetworkSettings, OciDefaults, OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -23,7 +23,7 @@ struct Settings {
boot: BootSettings,
aws: settings_extension_aws::AwsSettingsV1,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.25-nvidia/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
AutoScalingSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
ContainerRuntimeSettings, DnsSettings, HostContainer, KubernetesSettings, MetricsSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate,
NetworkSettings, OciDefaults, OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -23,7 +23,7 @@ struct Settings {
boot: BootSettings,
aws: settings_extension_aws::AwsSettingsV1,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.25/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
AutoScalingSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
ContainerRuntimeSettings, DnsSettings, HostContainer, KubernetesSettings, MetricsSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate,
NetworkSettings, OciDefaults, OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -23,7 +23,7 @@ struct Settings {
boot: BootSettings,
aws: settings_extension_aws::AwsSettingsV1,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.26-nvidia/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
AutoScalingSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
ContainerRuntimeSettings, DnsSettings, HostContainer, KubernetesSettings, MetricsSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate,
NetworkSettings, OciDefaults, OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -23,7 +23,7 @@ struct Settings {
boot: BootSettings,
aws: settings_extension_aws::AwsSettingsV1,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.26/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
AutoScalingSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
ContainerRuntimeSettings, DnsSettings, HostContainer, KubernetesSettings, MetricsSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate,
NetworkSettings, OciDefaults, OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -23,7 +23,7 @@ struct Settings {
boot: BootSettings,
aws: settings_extension_aws::AwsSettingsV1,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.30-nvidia/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
AutoScalingSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
ContainerRuntimeSettings, DnsSettings, HostContainer, KubernetesSettings, MetricsSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate,
NetworkSettings, OciDefaults, OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -23,7 +23,7 @@ struct Settings {
boot: BootSettings,
aws: settings_extension_aws::AwsSettingsV1,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.30/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
AutoScalingSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
ContainerRuntimeSettings, DnsSettings, HostContainer, KubernetesSettings, MetricsSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate,
NetworkSettings, OciDefaults, OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -23,7 +23,7 @@ struct Settings {
boot: BootSettings,
aws: settings_extension_aws::AwsSettingsV1,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/metal-dev/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::HashMap;

use crate::{
BootSettings, BootstrapContainer, DnsSettings, HostContainer, MetricsSettings, NetworkSettings,
OciHooks, PemCertificate,
OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -20,7 +20,7 @@ struct Settings {
kernel: settings_extension_kernel::KernelSettingsV1,
boot: BootSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_hooks: OciHooks,
dns: DnsSettings,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/metal-k8s-1.29/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::HashMap;

use crate::{
BootSettings, BootstrapContainer, ContainerRuntimeSettings, DnsSettings, HostContainer,
KubernetesSettings, MetricsSettings, NetworkSettings, OciDefaults, OciHooks, PemCertificate,
KubernetesSettings, MetricsSettings, NetworkSettings, OciDefaults, OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -22,7 +22,7 @@ struct Settings {
boot: BootSettings,
aws: settings_extension_aws::AwsSettingsV1,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/vmware-dev/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::HashMap;

use crate::{
BootSettings, BootstrapContainer, DnsSettings, HostContainer, MetricsSettings, NetworkSettings,
OciHooks, PemCertificate,
OciHooks,
};
use modeled_types::Identifier;

Expand All @@ -20,7 +20,7 @@ struct Settings {
kernel: settings_extension_kernel::KernelSettingsV1,
boot: BootSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_hooks: OciHooks,
dns: DnsSettings,
Expand Down
Loading

0 comments on commit f7a5677

Please sign in to comment.