Skip to content

Commit

Permalink
static-pods: add static-pods manifest template into kubernetes packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jmt-lab committed Apr 12, 2024
1 parent f5c6b46 commit 1ae7893
Show file tree
Hide file tree
Showing 18 changed files with 129 additions and 30 deletions.
3 changes: 3 additions & 0 deletions packages/kubernetes-1.23/kubernetes-1.23.spec
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Source12: kubelet-server-key
Source13: etc-kubernetes-pki-private.mount
Source14: credential-provider-config-yaml
Source15: logdog.kubelet.conf
Source16: static-pods-manifest

# ExecStartPre drop-ins
Source20: prestart-pull-pause-ctr.conf
Expand Down Expand Up @@ -116,6 +117,7 @@ install -m 0644 %{S:7} %{buildroot}%{_cross_templatedir}/kubelet-bootstrap-kubec
install -m 0644 %{S:11} %{buildroot}%{_cross_templatedir}/kubelet-server-crt
install -m 0644 %{S:12} %{buildroot}%{_cross_templatedir}/kubelet-server-key
install -m 0644 %{S:14} %{buildroot}%{_cross_templatedir}/credential-provider-config-yaml
install -m 0644 %{S:16} %{buildroot}%{_cross_templatedir}/static-pods-manifest

install -d %{buildroot}%{_cross_tmpfilesdir}
install -p -m 0644 %{S:8} %{buildroot}%{_cross_tmpfilesdir}/kubernetes.conf
Expand Down Expand Up @@ -155,6 +157,7 @@ install -p -m 0644 %{S:15} %{buildroot}%{_cross_datadir}/logdog.d
%{_cross_templatedir}/kubelet-server-crt
%{_cross_templatedir}/kubelet-server-key
%{_cross_templatedir}/credential-provider-config-yaml
%{_cross_templatedir}/static-pods-manifest
%{_cross_tmpfilesdir}/kubernetes.conf
%{_cross_sysctldir}/90-kubelet.conf
%dir %{_cross_libexecdir}/kubernetes
Expand Down
12 changes: 12 additions & 0 deletions packages/kubernetes-1.23/static-pods-manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[required-extensions]
kubernetes = "v1"
std = { version = "v1", helpers = ["if_not_null", "base64_decode"]}
+++
{{#if_not_null settings.kubernetes.static-pods}}
{{#each settings.kubernetes.static-pods}}
{{#if this.enabled}}
{{base64_decode this.manifest}}
---
{{/if}}
{{/each}}
{{/if_not_null}}
3 changes: 3 additions & 0 deletions packages/kubernetes-1.24/kubernetes-1.24.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Source12: kubelet-server-key
Source13: etc-kubernetes-pki-private.mount
Source14: credential-provider-config-yaml
Source15: logdog.kubelet.conf
Source16: static-pods-manifest

# ExecStartPre drop-ins
Source20: prestart-pull-pause-ctr.conf
Expand Down Expand Up @@ -117,6 +118,7 @@ install -m 0644 %{S:7} %{buildroot}%{_cross_templatedir}/kubelet-bootstrap-kubec
install -m 0644 %{S:11} %{buildroot}%{_cross_templatedir}/kubelet-server-crt
install -m 0644 %{S:12} %{buildroot}%{_cross_templatedir}/kubelet-server-key
install -m 0644 %{S:14} %{buildroot}%{_cross_templatedir}/credential-provider-config-yaml
install -m 0644 %{S:16} %{buildroot}%{_cross_templatedir}/static-pods-manifest

install -d %{buildroot}%{_cross_tmpfilesdir}
install -p -m 0644 %{S:8} %{buildroot}%{_cross_tmpfilesdir}/kubernetes.conf
Expand Down Expand Up @@ -156,6 +158,7 @@ install -p -m 0644 %{S:15} %{buildroot}%{_cross_datadir}/logdog.d
%{_cross_templatedir}/kubelet-server-crt
%{_cross_templatedir}/kubelet-server-key
%{_cross_templatedir}/credential-provider-config-yaml
%{_cross_templatedir}/static-pods-manifest
%{_cross_tmpfilesdir}/kubernetes.conf
%{_cross_sysctldir}/90-kubelet.conf
%dir %{_cross_libexecdir}/kubernetes
Expand Down
12 changes: 12 additions & 0 deletions packages/kubernetes-1.24/static-pods-manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[required-extensions]
kubernetes = "v1"
std = { version = "v1", helpers = ["if_not_null", "base64_decode"]}
+++
{{#if_not_null settings.kubernetes.static-pods}}
{{#each settings.kubernetes.static-pods}}
{{#if this.enabled}}
{{base64_decode this.manifest}}
---
{{/if}}
{{/each}}
{{/if_not_null}}
3 changes: 3 additions & 0 deletions packages/kubernetes-1.25/kubernetes-1.25.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Source12: kubelet-server-key
Source13: etc-kubernetes-pki-private.mount
Source14: credential-provider-config-yaml
Source15: logdog.kubelet.conf
Source16: static-pods-manifest

# ExecStartPre drop-ins
Source20: prestart-pull-pause-ctr.conf
Expand Down Expand Up @@ -117,6 +118,7 @@ install -m 0644 %{S:7} %{buildroot}%{_cross_templatedir}/kubelet-bootstrap-kubec
install -m 0644 %{S:11} %{buildroot}%{_cross_templatedir}/kubelet-server-crt
install -m 0644 %{S:12} %{buildroot}%{_cross_templatedir}/kubelet-server-key
install -m 0644 %{S:14} %{buildroot}%{_cross_templatedir}/credential-provider-config-yaml
install -m 0644 %{S:16} %{buildroot}%{_cross_templatedir}/static-pods-manifest

install -d %{buildroot}%{_cross_tmpfilesdir}
install -p -m 0644 %{S:8} %{buildroot}%{_cross_tmpfilesdir}/kubernetes.conf
Expand Down Expand Up @@ -156,6 +158,7 @@ install -p -m 0644 %{S:15} %{buildroot}%{_cross_datadir}/logdog.d
%{_cross_templatedir}/kubelet-server-crt
%{_cross_templatedir}/kubelet-server-key
%{_cross_templatedir}/credential-provider-config-yaml
%{_cross_templatedir}/static-pods-manifest
%{_cross_tmpfilesdir}/kubernetes.conf
%{_cross_sysctldir}/90-kubelet.conf
%dir %{_cross_libexecdir}/kubernetes
Expand Down
12 changes: 12 additions & 0 deletions packages/kubernetes-1.25/static-pods-manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[required-extensions]
kubernetes = "v1"
std = { version = "v1", helpers = ["if_not_null", "base64_decode"]}
+++
{{#if_not_null settings.kubernetes.static-pods}}
{{#each settings.kubernetes.static-pods}}
{{#if this.enabled}}
{{base64_decode this.manifest}}
---
{{/if}}
{{/each}}
{{/if_not_null}}
3 changes: 3 additions & 0 deletions packages/kubernetes-1.26/kubernetes-1.26.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Source12: kubelet-server-key
Source13: etc-kubernetes-pki-private.mount
Source14: credential-provider-config-yaml
Source15: logdog.kubelet.conf
Source16: static-pods-manifest

# ExecStartPre drop-ins
Source20: prestart-pull-pause-ctr.conf
Expand Down Expand Up @@ -117,6 +118,7 @@ install -m 0644 %{S:7} %{buildroot}%{_cross_templatedir}/kubelet-bootstrap-kubec
install -m 0644 %{S:11} %{buildroot}%{_cross_templatedir}/kubelet-server-crt
install -m 0644 %{S:12} %{buildroot}%{_cross_templatedir}/kubelet-server-key
install -m 0644 %{S:14} %{buildroot}%{_cross_templatedir}/credential-provider-config-yaml
install -m 0644 %{S:16} %{buildroot}%{_cross_templatedir}/static-pods-manifest

install -d %{buildroot}%{_cross_tmpfilesdir}
install -p -m 0644 %{S:8} %{buildroot}%{_cross_tmpfilesdir}/kubernetes.conf
Expand Down Expand Up @@ -156,6 +158,7 @@ install -p -m 0644 %{S:15} %{buildroot}%{_cross_datadir}/logdog.d
%{_cross_templatedir}/kubelet-server-crt
%{_cross_templatedir}/kubelet-server-key
%{_cross_templatedir}/credential-provider-config-yaml
%{_cross_templatedir}/static-pods-manifest
%{_cross_tmpfilesdir}/kubernetes.conf
%{_cross_sysctldir}/90-kubelet.conf
%dir %{_cross_libexecdir}/kubernetes
Expand Down
12 changes: 12 additions & 0 deletions packages/kubernetes-1.26/static-pods-manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[required-extensions]
kubernetes = "v1"
std = { version = "v1", helpers = ["if_not_null", "base64_decode"]}
+++
{{#if_not_null settings.kubernetes.static-pods}}
{{#each settings.kubernetes.static-pods}}
{{#if this.enabled}}
{{base64_decode this.manifest}}
---
{{/if}}
{{/each}}
{{/if_not_null}}
3 changes: 3 additions & 0 deletions packages/kubernetes-1.27/kubernetes-1.27.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Source12: kubelet-server-key
Source13: etc-kubernetes-pki-private.mount
Source14: credential-provider-config-yaml
Source15: logdog.kubelet.conf
Source16: static-pods-manifest

# ExecStartPre drop-ins
Source20: prestart-pull-pause-ctr.conf
Expand Down Expand Up @@ -117,6 +118,7 @@ install -m 0644 %{S:7} %{buildroot}%{_cross_templatedir}/kubelet-bootstrap-kubec
install -m 0644 %{S:11} %{buildroot}%{_cross_templatedir}/kubelet-server-crt
install -m 0644 %{S:12} %{buildroot}%{_cross_templatedir}/kubelet-server-key
install -m 0644 %{S:14} %{buildroot}%{_cross_templatedir}/credential-provider-config-yaml
install -m 0644 %{S:16} %{buildroot}%{_cross_templatedir}/static-pods-manifest

install -d %{buildroot}%{_cross_tmpfilesdir}
install -p -m 0644 %{S:8} %{buildroot}%{_cross_tmpfilesdir}/kubernetes.conf
Expand Down Expand Up @@ -156,6 +158,7 @@ install -p -m 0644 %{S:15} %{buildroot}%{_cross_datadir}/logdog.d
%{_cross_templatedir}/kubelet-server-crt
%{_cross_templatedir}/kubelet-server-key
%{_cross_templatedir}/credential-provider-config-yaml
%{_cross_templatedir}/static-pods-manifest
%{_cross_tmpfilesdir}/kubernetes.conf
%{_cross_sysctldir}/90-kubelet.conf
%dir %{_cross_libexecdir}/kubernetes
Expand Down
12 changes: 12 additions & 0 deletions packages/kubernetes-1.27/static-pods-manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[required-extensions]
kubernetes = "v1"
std = { version = "v1", helpers = ["if_not_null", "base64_decode"]}
+++
{{#if_not_null settings.kubernetes.static-pods}}
{{#each settings.kubernetes.static-pods}}
{{#if this.enabled}}
{{base64_decode this.manifest}}
---
{{/if}}
{{/each}}
{{/if_not_null}}
3 changes: 3 additions & 0 deletions packages/kubernetes-1.28/kubernetes-1.28.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Source12: kubelet-server-key
Source13: etc-kubernetes-pki-private.mount
Source14: credential-provider-config-yaml
Source15: logdog.kubelet.conf
Source16: static-pods-manifest

# ExecStartPre drop-ins
Source20: prestart-pull-pause-ctr.conf
Expand Down Expand Up @@ -117,6 +118,7 @@ install -m 0644 %{S:7} %{buildroot}%{_cross_templatedir}/kubelet-bootstrap-kubec
install -m 0644 %{S:11} %{buildroot}%{_cross_templatedir}/kubelet-server-crt
install -m 0644 %{S:12} %{buildroot}%{_cross_templatedir}/kubelet-server-key
install -m 0644 %{S:14} %{buildroot}%{_cross_templatedir}/credential-provider-config-yaml
install -m 0644 %{S:16} %{buildroot}%{_cross_templatedir}/static-pods-manifest

install -d %{buildroot}%{_cross_tmpfilesdir}
install -p -m 0644 %{S:8} %{buildroot}%{_cross_tmpfilesdir}/kubernetes.conf
Expand Down Expand Up @@ -156,6 +158,7 @@ install -p -m 0644 %{S:15} %{buildroot}%{_cross_datadir}/logdog.d
%{_cross_templatedir}/kubelet-server-crt
%{_cross_templatedir}/kubelet-server-key
%{_cross_templatedir}/credential-provider-config-yaml
%{_cross_templatedir}/static-pods-manifest
%{_cross_tmpfilesdir}/kubernetes.conf
%{_cross_sysctldir}/90-kubelet.conf
%dir %{_cross_libexecdir}/kubernetes
Expand Down
12 changes: 12 additions & 0 deletions packages/kubernetes-1.28/static-pods-manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[required-extensions]
kubernetes = "v1"
std = { version = "v1", helpers = ["if_not_null", "base64_decode"]}
+++
{{#if_not_null settings.kubernetes.static-pods}}
{{#each settings.kubernetes.static-pods}}
{{#if this.enabled}}
{{base64_decode this.manifest}}
---
{{/if}}
{{/each}}
{{/if_not_null}}
3 changes: 3 additions & 0 deletions packages/kubernetes-1.29/kubernetes-1.29.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Source12: kubelet-server-key
Source13: etc-kubernetes-pki-private.mount
Source14: credential-provider-config-yaml
Source15: logdog.kubelet.conf
Source16: static-pods-manifest

# ExecStartPre drop-ins
Source20: prestart-pull-pause-ctr.conf
Expand Down Expand Up @@ -117,6 +118,7 @@ install -m 0644 %{S:7} %{buildroot}%{_cross_templatedir}/kubelet-bootstrap-kubec
install -m 0644 %{S:11} %{buildroot}%{_cross_templatedir}/kubelet-server-crt
install -m 0644 %{S:12} %{buildroot}%{_cross_templatedir}/kubelet-server-key
install -m 0644 %{S:14} %{buildroot}%{_cross_templatedir}/credential-provider-config-yaml
install -m 0644 %{S:16} %{buildroot}%{_cross_templatedir}/static-pods-manifest

install -d %{buildroot}%{_cross_tmpfilesdir}
install -p -m 0644 %{S:8} %{buildroot}%{_cross_tmpfilesdir}/kubernetes.conf
Expand Down Expand Up @@ -156,6 +158,7 @@ install -p -m 0644 %{S:15} %{buildroot}%{_cross_datadir}/logdog.d
%{_cross_templatedir}/kubelet-server-crt
%{_cross_templatedir}/kubelet-server-key
%{_cross_templatedir}/credential-provider-config-yaml
%{_cross_templatedir}/static-pods-manifest
%{_cross_tmpfilesdir}/kubernetes.conf
%{_cross_sysctldir}/90-kubelet.conf
%dir %{_cross_libexecdir}/kubernetes
Expand Down
12 changes: 12 additions & 0 deletions packages/kubernetes-1.29/static-pods-manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[required-extensions]
kubernetes = "v1"
std = { version = "v1", helpers = ["if_not_null", "base64_decode"]}
+++
{{#if_not_null settings.kubernetes.static-pods}}
{{#each settings.kubernetes.static-pods}}
{{#if this.enabled}}
{{base64_decode this.manifest}}
---
{{/if}}
{{/each}}
{{/if_not_null}}
3 changes: 3 additions & 0 deletions packages/kubernetes-1.30/kubernetes-1.30.spec
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Source12: kubelet-server-key
Source13: etc-kubernetes-pki-private.mount
Source14: credential-provider-config-yaml
Source15: logdog.kubelet.conf
Source16: static-pods-manifest

# ExecStartPre drop-ins
Source20: prestart-pull-pause-ctr.conf
Expand Down Expand Up @@ -119,6 +120,7 @@ install -m 0644 %{S:7} %{buildroot}%{_cross_templatedir}/kubelet-bootstrap-kubec
install -m 0644 %{S:11} %{buildroot}%{_cross_templatedir}/kubelet-server-crt
install -m 0644 %{S:12} %{buildroot}%{_cross_templatedir}/kubelet-server-key
install -m 0644 %{S:14} %{buildroot}%{_cross_templatedir}/credential-provider-config-yaml
install -m 0644 %{S:16} %{buildroot}%{_cross_templatedir}/static-pods-manifest

install -d %{buildroot}%{_cross_tmpfilesdir}
install -p -m 0644 %{S:8} %{buildroot}%{_cross_tmpfilesdir}/kubernetes.conf
Expand Down Expand Up @@ -158,6 +160,7 @@ install -p -m 0644 %{S:15} %{buildroot}%{_cross_datadir}/logdog.d
%{_cross_templatedir}/kubelet-server-crt
%{_cross_templatedir}/kubelet-server-key
%{_cross_templatedir}/credential-provider-config-yaml
%{_cross_templatedir}/static-pods-manifest
%{_cross_tmpfilesdir}/kubernetes.conf
%{_cross_sysctldir}/90-kubelet.conf
%dir %{_cross_libexecdir}/kubernetes
Expand Down
12 changes: 12 additions & 0 deletions packages/kubernetes-1.30/static-pods-manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[required-extensions]
kubernetes = "v1"
std = { version = "v1", helpers = ["if_not_null", "base64_decode"]}
+++
{{#if_not_null settings.kubernetes.static-pods}}
{{#each settings.kubernetes.static-pods}}
{{#if this.enabled}}
{{base64_decode this.manifest}}
---
{{/if}}
{{/each}}
{{/if_not_null}}
18 changes: 0 additions & 18 deletions packages/os/os.spec
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ Requires: %{_cross_os}updog
Requires: %{_cross_os}pluto
%endif

%if %{with k8s_runtime}
Requires: %{_cross_os}static-pods
%endif

%if %{with aws_platform}
Requires: %{_cross_os}shibaken
Requires: %{_cross_os}cfsignal
Expand Down Expand Up @@ -244,13 +240,6 @@ Summary: Dynamic setting generator for kubernetes
%{summary}.
%endif

%if %{with k8s_runtime}
%package -n %{_cross_os}static-pods
Summary: Manages user-defined K8S static pods
%description -n %{_cross_os}static-pods
%{summary}.
%endif

%if %{with aws_platform}
%package -n %{_cross_os}shibaken
Summary: Run tasks reliant on IMDS
Expand Down Expand Up @@ -384,7 +373,6 @@ echo "** Output from non-static builds:"
-p bloodhound \
-p xfscli \
%{?with_aws_platform: -p shibaken} \
%{?with_k8s_runtime: -p static-pods} \
%{?with_nvidia_flavor: -p driverdog} \
%{nil}

Expand Down Expand Up @@ -418,7 +406,6 @@ for p in \
ghostdog bootstrap-containers \
shimpei bloodhound bottlerocket-checks \
%{?with_aws_platform: shibaken} \
%{?with_k8s_runtime: static-pods} \
%{?with_nvidia_flavor: driverdog} \
; do
install -p -m 0755 ${HOME}/.cache/%{__cargo_target}/release/${p} %{buildroot}%{_cross_bindir}
Expand Down Expand Up @@ -699,11 +686,6 @@ install -p -m 0644 %{S:400} %{S:401} %{S:402} %{buildroot}%{_cross_licensedir}
%{_cross_datadir}/eks/eni-max-pods
%endif

%if %{with k8s_runtime}
%files -n %{_cross_os}static-pods
%{_cross_bindir}/static-pods
%endif

%files -n %{_cross_os}shimpei
%{_cross_bindir}/shimpei
%{_cross_templatedir}/oci-default-hooks-json
Expand Down
21 changes: 9 additions & 12 deletions sources/Cargo.lock

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

0 comments on commit 1ae7893

Please sign in to comment.