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

Add more rpms for k8s related tools #78

Merged
merged 1 commit into from
Jan 26, 2025
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
6 changes: 5 additions & 1 deletion examples/rpms/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ RUN \
spectool -g -R spiffe-step-ssh.spec && \
rpmbuild -ba spiffe-step-ssh.spec && \
spectool -g -R spire-ha-agent.spec && \
rpmbuild -ba spire-ha-agent.spec
rpmbuild -ba spire-ha-agent.spec && \
spectool -g -R k8s-spiffe-workload-jwt-exec-auth.spec && \
rpmbuild -ba k8s-spiffe-workload-jwt-exec-auth.spec && \
spectool -g -R k8s-spiffe-workload-auth-config.spec && \
rpmbuild -ba k8s-spiffe-workload-auth-config.spec

RUN \
dnf localinstall -y https://github.com/smallstep/cli/releases/download/v${STEPVER}/step-cli-${STEPVER}-1.$(uname -i).rpm && \
Expand Down
62 changes: 62 additions & 0 deletions examples/rpms/k8s-spiffe-workload-auth-config.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
##############################################################################
#
# To you, dear reader:
#
# If you are a normal user, we recommend not reading further. Its probably not
# the file your looking for.
#
# If you are looking at using this file as a base for your own work, please
# don't. It is a horrible example. Please look elsewhere.
#
# If you are a package maintainer, please read on. We recognize this spec file
# is blasphemous, a terrible abomination, a crime against nature, and more. We
# regret needing to produce it, but had to in order to attract enough users to
# find you. We beseech thee, kind and generous package maintainer, please help
# us mend our wicked ways by joining us and help us produce proper packaging.
# You are our only hope.
#
##############################################################################

%define ARCH %(echo %{_arch} | sed s/aarch64/arm64/)

Summary: K8s SPIFFE Workload Auth Config
Name: k8s-spiffe-workload-auth-config
Version: 0.0.8
Release: 1
Group: Applications/Internet
License: Apache-2.0
URL: https://spiffe.io
Source0: https://github.com/spiffe/k8s-spiffe-workload-auth-config/releases/download/v%{version}/k8s-spiffe-workload-auth-config_Linux_%{ARCH}.tar.gz
#FIXME This still needs upstream changes to package
#Requires: spiffe-helper

%description
K8s SPIFFE Workload Auth Config

%global _missing_build_ids_terminate_build 0
%global debug_package %{nil}

%prep

%setup -c

%build

%install
mkdir -p "%{buildroot}/usr/bin"
mkdir -p "%{buildroot}/etc/spiffe"
mkdir -p "%{buildroot}/etc/kubernetes"
mkdir -p "%{buildroot}/usr/lib/systemd/system"
cp -a k8s-spiffe-workload-auth-config %{buildroot}/usr/bin
cp -a config/k8s-spiffe-workload-auth-config.env %{buildroot}/etc/spiffe
cp -a config/auth-config.yaml %{buildroot}/etc/kubernetes/
cp -a systemd/k8s-spiffe-workload-auth-config.service %{buildroot}/usr/lib/systemd/system

%clean
rm -rf %{buildroot}

%files
/usr/bin/k8s-spiffe-workload-auth-config
/usr/lib/systemd/system/k8s-spiffe-workload-auth-config.service
%config(noreplace) /etc/spiffe/k8s-spiffe-workload-auth-config.env
%config(noreplace) /etc/kubernetes/auth-config.yaml
51 changes: 51 additions & 0 deletions examples/rpms/k8s-spiffe-workload-jwt-exec-auth.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
##############################################################################
#
# To you, dear reader:
#
# If you are a normal user, we recommend not reading further. Its probably not
# the file your looking for.
#
# If you are looking at using this file as a base for your own work, please
# don't. It is a horrible example. Please look elsewhere.
#
# If you are a package maintainer, please read on. We recognize this spec file
# is blasphemous, a terrible abomination, a crime against nature, and more. We
# regret needing to produce it, but had to in order to attract enough users to
# find you. We beseech thee, kind and generous package maintainer, please help
# us mend our wicked ways by joining us and help us produce proper packaging.
# You are our only hope.
#
##############################################################################

%define ARCH %(echo %{_arch} | sed s/aarch64/arm64/)

Summary: K8s SPIFFE Workload JWT Exec Auth Plugin
Name: k8s-spiffe-workload-jwt-exec-auth
Version: 0.0.4
Release: 1
Group: Applications/Internet
License: Apache-2.0
URL: https://spiffe.io
Source0: https://github.com/spiffe/k8s-spiffe-workload-jwt-exec-auth/releases/download/v%{version}/k8s-spiffe-workload-jwt-exec-auth_Linux_%{ARCH}.tar.gz

%description
K8s SPIFFE Workload JWT Exec Auth Plugin

%global _missing_build_ids_terminate_build 0
%global debug_package %{nil}

%prep

%setup -c

%build

%install
mkdir -p "%{buildroot}/usr/bin"
cp -a k8s-spiffe-workload-jwt-exec-auth %{buildroot}/usr/bin

%clean
rm -rf %{buildroot}

%files
/usr/bin/k8s-spiffe-workload-jwt-exec-auth
2 changes: 2 additions & 0 deletions examples/rpms/spiffe-step-ssh.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ License: Apache-2.0
URL: https://spiffe.io
Source0: https://github.com/spiffe/spiffe-step-ssh/archive/refs/tags/v%{version}.tar.gz
Requires: step-cli
#FIXME This still needs upstream changes to package
#Requires: spiffe-helper

%description
SPIFFE Step SSH
Expand Down