integ/kubernetes/helm/centos/helm.spec
Robert Church 98aa0d5f2b Enable helm repository and chart upload tool
There's a lot going on here but conceptually we're just enabling a
local helm repo along with a helper script to install helm charts into
the repo.

The first item is to configure lighttpd to serve up helm charts as
static information (so no proxying) at http://127.0.0.1/helm_charts".
This is fairly straightforward, but the files are served out of
/www which isn't a replicated filesystem and which is owned by the www
user.

The helm puppet manifest is modified to create the "helm_charts"
directory for the webserver, to generate the initial index file,
and to tell helm to add the new repo for the "wrsroot" user.  The
various commands are run as specific users with specific environment
variables, this is key to making everything work as planned.

To allow the wrsroot user to upload charts into /www the helm-upload
script will re-run itself as the www user.  /etc/sudoers.d is modified
to allow this without asking for a password.  The upload script will
copy the specified charts in to /www/pages/helm_charts, and will then
regenerate the index.yaml file. The upload script will then try to
sync the files over to the other node.  To enable this without
prompting for a password we modify /etc/rsyncd.conf to allow
passwordless syncing into /www/helm_charts.

In a future commit we'll need to sync charts with the other
controller when booting up, and also configure the local starlingx
helm repo on the second controller.

Change-Id: I86a7795decb7833cb22c04e34e298c8d24ed7fa3
Signed-off-by: David Sullivan <david.sullivan@windriver.com>
Story: 2002876
Task: 22831
Depends-On: https://review.openstack.org/596802
2018-08-27 13:25:56 -04:00

34 lines
846 B
RPMSpec

Name: helm
Version: 2.9.1
Release: 0%{?_tis_dist}.%{tis_patch_ver}
Summary: The Kubernetes Package Manager
License: Apache-2.0
Group: devel
Packager: Wind River <info@windriver.com>
URL: https://github.com/kubernetes/helm/releases
Source0: %{name}-v%{version}-linux-amd64.tar.gz
Source1: helm-upload
Source2: helm.sudo
Requires: /bin/bash
%description
%{summary}
%prep
%setup -n linux-amd64
%install
install -d %{buildroot}%{_sbindir}
install -m 755 ${RPM_BUILD_DIR}/linux-amd64/helm %{buildroot}%{_sbindir}/helm
install -d %{buildroot}/usr/local/sbin
install -m 755 %{SOURCE1} %{buildroot}/usr/local/sbin/helm-upload
install -d %{buildroot}%{_sysconfdir}/sudoers.d
install -m 440 %{SOURCE2} %{buildroot}%{_sysconfdir}/sudoers.d/helm
%files
%defattr(-,root,root,-)
%{_sbindir}/helm
/usr/local/sbin/helm-upload
%{_sysconfdir}/sudoers.d/helm