-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #298 from Sparksssj/k8s1.32
packages: boilerplate kubernetes-1.32 and ecr-credential-provider-1.32
- Loading branch information
Showing
31 changed files
with
971 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[package] | ||
# "." is not allowed in crate names, but we want a friendlier name for the | ||
# directory and spec file, so we override it below. | ||
name = "ecr-credential-provider-1_32" | ||
version = "0.1.0" | ||
edition = "2021" | ||
publish = false | ||
build = "../build.rs" | ||
|
||
[lib] | ||
path = "../packages.rs" | ||
|
||
[package.metadata.build-package] | ||
package-name = "ecr-credential-provider-1.32" | ||
releases-url = "https://github.com/kubernetes/cloud-provider-aws/releases" | ||
|
||
[[package.metadata.build-package.external-files]] | ||
url = "https://codeload.github.com/kubernetes/cloud-provider-aws/tar.gz/v1.31.0" | ||
path = "cloud-provider-aws-1.31.0.tar.gz" | ||
sha512 = "962973013984a802853311182e1cfd1eabb1bcdf164000f607aeb2631ac98a0b4fd5ba1f7aff08491040979bd2321bcd5debd567c9aa74889b09d7599bc4dcfd" | ||
bundle-modules = [ "go" ] | ||
|
||
[build-dependencies] | ||
glibc = { path = "../glibc" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[clarify."sigs.k8s.io/yaml"] | ||
expression = "MIT AND BSD-3-Clause AND Apache-2.0" | ||
license-files = [ | ||
{ path = "LICENSE", hash = 0x617d80bc }, | ||
{ path = "goyaml.v2/LICENSE", hash = 0xe569d630 }, | ||
{ path = "goyaml.v2/LICENSE.libyaml", hash = 0xa2e4ce3 }, | ||
{ path = "goyaml.v2/NOTICE", hash = 0x49bceeb9 }, | ||
] |
76 changes: 76 additions & 0 deletions
76
packages/ecr-credential-provider-1.32/ecr-credential-provider-1.32.spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
%global goproject github.com/kubernetes | ||
%global gorepo cloud-provider-aws | ||
%global goimport %{goproject}/%{gorepo} | ||
|
||
%global gover 1.31.0 | ||
%global rpmver %{gover} | ||
|
||
%global _dwz_low_mem_die_limit 0 | ||
|
||
Name: %{_cross_os}ecr-credential-provider-1.32 | ||
Version: %{rpmver} | ||
Release: 1%{?dist} | ||
Epoch: 1 | ||
Summary: Amazon ECR credential provider | ||
License: Apache-2.0 | ||
URL: https://github.com/kubernetes/cloud-provider-aws | ||
|
||
Source: cloud-provider-aws-%{gover}.tar.gz | ||
Source1: bundled-cloud-provider-aws-%{gover}.tar.gz | ||
Source1000: clarify.toml | ||
|
||
BuildRequires: %{_cross_os}glibc-devel | ||
Requires: %{name}(binaries) | ||
|
||
%description | ||
%{summary}. | ||
|
||
%package bin | ||
Summary: Amazon ECR credential provider binaries | ||
Provides: %{name}(binaries) | ||
Requires: (%{_cross_os}image-feature(no-fips) and %{name}) | ||
Conflicts: (%{_cross_os}image-feature(fips) or %{name}-fips-bin) | ||
|
||
%description bin | ||
%{summary}. | ||
|
||
%package fips-bin | ||
Summary: Amazon ECR credential provider binaries, FIPS edition | ||
Provides: %{name}(binaries) | ||
Requires: (%{_cross_os}image-feature(fips) and %{name}) | ||
Conflicts: (%{_cross_os}image-feature(no-fips) or %{name}-bin) | ||
|
||
%description fips-bin | ||
%{summary}. | ||
|
||
%prep | ||
%setup -n %{gorepo}-%{gover} -q | ||
%setup -T -D -n %{gorepo}-%{gover} -b 1 -q | ||
|
||
%build | ||
%set_cross_go_flags | ||
|
||
export GO_VERSION="1.23.3" | ||
|
||
go build -ldflags="${GOLDFLAGS}" -o=ecr-credential-provider cmd/ecr-credential-provider/*.go | ||
gofips build -ldflags="${GOLDFLAGS}" -o=fips/ecr-credential-provider cmd/ecr-credential-provider/*.go | ||
|
||
%install | ||
install -d %{buildroot}%{_cross_libexecdir}/kubernetes/kubelet/plugins | ||
install -p -m 0755 ecr-credential-provider %{buildroot}%{_cross_libexecdir}/kubernetes/kubelet/plugins | ||
|
||
install -d %{buildroot}%{_cross_fips_libexecdir}/kubernetes/kubelet/plugins | ||
install -p -m 0755 fips/ecr-credential-provider %{buildroot}%{_cross_fips_libexecdir}/kubernetes/kubelet/plugins | ||
|
||
%cross_scan_attribution --clarify %{S:1000} go-vendor vendor | ||
|
||
%files | ||
%license LICENSE | ||
%{_cross_attribution_file} | ||
%{_cross_attribution_vendor_dir} | ||
|
||
%files bin | ||
%{_cross_libexecdir}/kubernetes/kubelet/plugins/ecr-credential-provider | ||
|
||
%files fips-bin | ||
%{_cross_fips_libexecdir}/kubernetes/kubelet/plugins/ecr-credential-provider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/*-EKS-PATCH-*.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[package] | ||
# "." is not allowed in crate names, but we want a friendlier name for the | ||
# directory and spec file, so we override it below. | ||
name = "kubernetes-1_32" | ||
version = "0.1.0" | ||
edition = "2021" | ||
publish = false | ||
build = "../build.rs" | ||
|
||
[lib] | ||
path = "../packages.rs" | ||
|
||
[package.metadata.build-package] | ||
package-name = "kubernetes-1.32" | ||
|
||
[[package.metadata.build-package.external-files]] | ||
url = "https://distro.eks.amazonaws.com/kubernetes-1-31/releases/6/artifacts/kubernetes/v1.31.1/kubernetes-src.tar.gz" | ||
sha512 = "d776cf029babde78af7f88aad7b337f2b73a18617a098d61666f462f6af7f9628e1d99a2abb6d840a8fead38ef2561ec5a41f8087d7c6c4d714f23b78e8b8ca7" | ||
|
||
[build-dependencies] | ||
glibc = { path = "../glibc" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
[clarify."github.com/JeffAshton/win_pdh"] | ||
expression = "BSD-3-Clause" | ||
license-files = [ | ||
{ path = "LICENSE", hash = 0xb221dcc9 }, | ||
] | ||
|
||
[clarify."github.com/daviddengcn/go-colortext"] | ||
expression = "BSD-3-Clause AND MIT" | ||
license-files = [ | ||
{ path = "LICENSE", hash = 0x9769fae1 }, | ||
] | ||
|
||
[clarify."github.com/ghodss/yaml"] | ||
expression = "MIT AND BSD-3-Clause" | ||
license-files = [ | ||
{ path = "LICENSE", hash = 0xcdf3ae00 }, | ||
] | ||
|
||
[clarify."github.com/heketi/heketi"] | ||
# kubernetes only uses code that is under LGPLv3+/Apache 2.0, not the code that is GPLv2+/LGPLv3+ | ||
expression = "LGPL-3.0-or-later OR Apache-2.0" | ||
license-files = [ | ||
{ path = "LICENSE", hash = 0x3c4b96d1 }, | ||
{ path = "LICENSE-APACHE2", hash = 0x438c8616 }, | ||
{ path = "COPYING-LGPLV3", hash = 0xf0bccb3a }, | ||
] | ||
skip-files = [ "COPYING-GPLV2" ] | ||
|
||
[clarify."github.com/go-bindata/go-bindata"] | ||
expression = "CC0-1.0" | ||
license-files = [ | ||
{ path = "LICENSE", hash = 0x393fafd6 }, | ||
] | ||
|
||
[clarify."github.com/miekg/dns"] | ||
expression = "BSD-3-Clause" | ||
license-files = [ | ||
{ path = "COPYRIGHT", hash = 0xe41dd36c }, | ||
{ path = "LICENSE", hash = 0xfc8f12ff }, | ||
] | ||
|
||
[clarify."sigs.k8s.io/yaml"] | ||
expression = "MIT AND BSD-3-Clause AND Apache-2.0" | ||
license-files = [ | ||
{ path = "LICENSE", hash = 0x617d80bc }, | ||
{ path = "goyaml.v2/LICENSE", hash = 0xe569d630 }, | ||
{ path = "goyaml.v2/LICENSE.libyaml", hash = 0xa2e4ce3 }, | ||
{ path = "goyaml.v2/NOTICE", hash = 0x49bceeb9 }, | ||
{ path = "goyaml.v3/LICENSE", hash = 0x176b1f44 }, | ||
{ path = "goyaml.v3/NOTICE", hash = 0x49bceeb9 }, | ||
] | ||
|
||
[clarify."honnef.co/go/tools"] | ||
expression = "MIT AND BSD-3-Clause AND Apache-2.0" | ||
license-files = [ | ||
{ path = "LICENSE", hash = 0xad378ed2 }, | ||
{ path = "LICENSE-THIRD-PARTY", hash = 0x546425eb }, | ||
{ path = "lint/LICENSE", hash = 0xc6b58232 }, | ||
{ path = "ssa/LICENSE", hash = 0xe656fb62 }, | ||
] | ||
|
||
[clarify."github.com/storageos/go-api"] | ||
expression = "MIT AND BSD-2-Clause" | ||
license-files = [ | ||
{ path = "LICENCE", hash = 0x67a6861e }, | ||
] | ||
skip-files = ["licence.go", "types/licence.go"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[required-extensions] | ||
aws = { version = "v1", optional = true } | ||
kubernetes = "v1" | ||
std = { version = "v1", helpers = ["default"] } | ||
+++ | ||
apiVersion: kubelet.config.k8s.io/v1 | ||
kind: CredentialProviderConfig | ||
providers: | ||
{{#if settings.kubernetes.credential-providers}} | ||
{{#each settings.kubernetes.credential-providers}} | ||
{{#if this.enabled}} | ||
- name: {{@key}} | ||
matchImages: | ||
{{#each this.image-patterns}} | ||
- "{{this}}" | ||
{{/each}} | ||
defaultCacheDuration: "{{default "12h" this.cache-duration}}" | ||
apiVersion: credentialprovider.kubelet.k8s.io/v1 | ||
{{#if (eq @key "ecr-credential-provider")}} | ||
env: | ||
{{else}} | ||
{{#if this.environment}} | ||
env: | ||
{{/if}} | ||
{{/if}} | ||
{{#if this.environment}} | ||
{{#each this.environment}} | ||
- name: {{@key}} | ||
value: '{{this}}' | ||
{{/each}} | ||
{{/if}} | ||
{{#if (eq @key "ecr-credential-provider")}} | ||
- name: HOME | ||
value: '/root' | ||
{{#if @root.settings.aws.profile}} | ||
- name: AWS_PROFILE | ||
value: '{{@root.settings.aws.profile}}' | ||
{{/if}} | ||
{{/if}} | ||
{{/if}} | ||
{{/each}} | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[Service] | ||
ExecStartPre=/bin/ln -sf ./containerd/containerd.sock /run/dockershim.sock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description=Kubernetes PKI private directory (/etc/kubernetes/pki/private) | ||
DefaultDependencies=no | ||
Conflicts=umount.target | ||
Before=local-fs.target umount.target | ||
After=selinux-policy-files.service | ||
Wants=selinux-policy-files.service | ||
|
||
[Mount] | ||
What=tmpfs | ||
Where=/etc/kubernetes/pki/private | ||
Type=tmpfs | ||
Options=nosuid,nodev,noexec,noatime,context=system_u:object_r:secret_t:s0,mode=0700 | ||
|
||
[Install] | ||
WantedBy=preconfigured.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[required-extensions] | ||
kubernetes = "v1" | ||
+++ | ||
--- | ||
apiVersion: v1 | ||
kind: Config | ||
clusters: | ||
- cluster: | ||
{{#if settings.kubernetes.api-server}} | ||
certificate-authority: "/etc/kubernetes/pki/ca.crt" | ||
server: "{{settings.kubernetes.api-server}}" | ||
{{/if}} | ||
name: kubernetes | ||
contexts: | ||
- context: | ||
cluster: kubernetes | ||
user: kubelet | ||
name: kubelet | ||
current-context: kubelet | ||
users: | ||
- name: kubelet | ||
{{#if settings.kubernetes.bootstrap-token}} | ||
user: | ||
token: "{{settings.kubernetes.bootstrap-token}}" | ||
{{/if}} |
Oops, something went wrong.