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

settings: add container-registry settings extension #3674

Merged
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
21 changes: 21 additions & 0 deletions packages/settings-container-registry/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "settings-container-registry"
version = "0.1.0"
edition = "2021"
publish = false
build = "../build.rs"

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

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

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

# RPM Requires
[dependencies]
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 container-registry

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}
19 changes: 16 additions & 3 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 @@ -73,6 +73,7 @@ members = [

"settings-extensions/motd",
"settings-extensions/ntp",
"settings-extensions/container-registry",

"parse-datetime",

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

[build-dependencies]
bottlerocket-variant = { version = "0.1", path = "../bottlerocket-variant" }
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 @@ -4,7 +4,7 @@ use std::collections::HashMap;
use crate::{
AwsSettings, BootSettings, BootstrapContainer, CloudFormationSettings, DnsSettings,
HostContainer, KernelSettings, MetricsSettings, NetworkSettings, OciHooks, PemCertificate,
RegistrySettings, UpdatesSettings,
UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -23,7 +23,7 @@ struct Settings {
aws: AwsSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
dns: DnsSettings,
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 @@ -4,7 +4,7 @@ use std::collections::HashMap;
use crate::{
AutoScalingSettings, AwsSettings, BootstrapContainer, CloudFormationSettings, DnsSettings,
ECSSettings, HostContainer, KernelSettings, MetricsSettings, NetworkSettings, OciDefaults,
OciHooks, PemCertificate, RegistrySettings, UpdatesSettings,
OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -23,7 +23,7 @@ struct Settings {
ecs: ECSSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
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 @@ -4,7 +4,7 @@ use std::collections::HashMap;
use crate::{
AutoScalingSettings, AwsSettings, BootstrapContainer, CloudFormationSettings, DnsSettings,
ECSSettings, HostContainer, KernelSettings, MetricsSettings, NetworkSettings, OciDefaults,
OciHooks, PemCertificate, RegistrySettings, UpdatesSettings,
OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -23,7 +23,7 @@ struct Settings {
ecs: ECSSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
Expand Down
4 changes: 2 additions & 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,7 @@ use std::collections::HashMap;
use crate::{
AutoScalingSettings, AwsSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
DnsSettings, ECSSettings, HostContainer, KernelSettings, MetricsSettings, NetworkSettings,
OciDefaults, OciHooks, PemCertificate, RegistrySettings, UpdatesSettings,
OciDefaults, OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -24,7 +24,7 @@ struct Settings {
ecs: ECSSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
Expand Down
4 changes: 2 additions & 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,7 @@ use std::collections::HashMap;
use crate::{
AutoScalingSettings, AwsSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
DnsSettings, ECSSettings, HostContainer, KernelSettings, MetricsSettings, NetworkSettings,
OciDefaults, OciHooks, PemCertificate, RegistrySettings, UpdatesSettings,
OciDefaults, OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -24,7 +24,7 @@ struct Settings {
ecs: ECSSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
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, AwsSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
DnsSettings, HostContainer, KernelSettings, KubernetesSettings, MetricsSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate, RegistrySettings, UpdatesSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -24,7 +24,7 @@ struct Settings {
aws: AwsSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
Expand Down
5 changes: 2 additions & 3 deletions sources/models/src/aws-k8s-1.24/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use crate::{
AutoScalingSettings, AwsSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
ContainerRuntimeSettings, DnsSettings, HostContainer, KernelSettings, KubernetesSettings,
MetricsSettings, NetworkSettings, OciDefaults, OciHooks, PemCertificate, RegistrySettings,
UpdatesSettings,
MetricsSettings, NetworkSettings, OciDefaults, OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -25,7 +24,7 @@ struct Settings {
aws: AwsSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
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, AwsSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
DnsSettings, HostContainer, KernelSettings, KubernetesSettings, MetricsSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate, RegistrySettings, UpdatesSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -24,7 +24,7 @@ struct Settings {
aws: AwsSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
Expand Down
5 changes: 2 additions & 3 deletions sources/models/src/aws-k8s-1.25/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use crate::{
AutoScalingSettings, AwsSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
ContainerRuntimeSettings, DnsSettings, HostContainer, KernelSettings, KubernetesSettings,
MetricsSettings, NetworkSettings, OciDefaults, OciHooks, PemCertificate, RegistrySettings,
UpdatesSettings,
MetricsSettings, NetworkSettings, OciDefaults, OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -25,7 +24,7 @@ struct Settings {
aws: AwsSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
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, AwsSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
DnsSettings, HostContainer, KernelSettings, KubernetesSettings, MetricsSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate, RegistrySettings, UpdatesSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -24,7 +24,7 @@ struct Settings {
aws: AwsSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
Expand Down
5 changes: 2 additions & 3 deletions sources/models/src/aws-k8s-1.26/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use crate::{
AutoScalingSettings, AwsSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
ContainerRuntimeSettings, DnsSettings, HostContainer, KernelSettings, KubernetesSettings,
MetricsSettings, NetworkSettings, OciDefaults, OciHooks, PemCertificate, RegistrySettings,
UpdatesSettings,
MetricsSettings, NetworkSettings, OciDefaults, OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -25,7 +24,7 @@ struct Settings {
aws: AwsSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.28-nvidia/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
AutoScalingSettings, AwsSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
DnsSettings, HostContainer, KernelSettings, KubernetesSettings, MetricsSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate, RegistrySettings, UpdatesSettings,
NetworkSettings, OciDefaults, OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -24,7 +24,7 @@ struct Settings {
aws: AwsSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
Expand Down
5 changes: 2 additions & 3 deletions sources/models/src/aws-k8s-1.28/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use crate::{
AutoScalingSettings, AwsSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
ContainerRuntimeSettings, DnsSettings, HostContainer, KernelSettings, KubernetesSettings,
MetricsSettings, NetworkSettings, OciDefaults, OciHooks, PemCertificate, RegistrySettings,
UpdatesSettings,
MetricsSettings, NetworkSettings, OciDefaults, OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -25,7 +24,7 @@ struct Settings {
aws: AwsSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
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, KernelSettings, MetricsSettings,
NetworkSettings, OciHooks, PemCertificate, RegistrySettings, UpdatesSettings,
NetworkSettings, OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -21,7 +21,7 @@ struct Settings {
boot: BootSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_hooks: OciHooks,
dns: DnsSettings,
}
4 changes: 2 additions & 2 deletions sources/models/src/metal-k8s-1.24/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::collections::HashMap;
use crate::{
AwsSettings, BootSettings, BootstrapContainer, ContainerRuntimeSettings, DnsSettings,
HostContainer, KernelSettings, KubernetesSettings, MetricsSettings, NetworkSettings,
OciDefaults, OciHooks, PemCertificate, RegistrySettings, UpdatesSettings,
OciDefaults, OciHooks, PemCertificate, UpdatesSettings,
};
use modeled_types::Identifier;

Expand All @@ -24,7 +24,7 @@ struct Settings {
aws: AwsSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
dns: DnsSettings,
Expand Down
Loading