Add support for Helm v3
This adds support for Helm v3. - 'helm init' and initialization is no longer required - 'chartmuseum' is used as a drop-in replacement for 'helm serv' - all Charts require the tag: apiVersion: v1 (or v2) Change-Id: I29df8f79b483f2af5dce3cde63f0debcbb00435b Story: 2007000 Task: 39326 Depends-On: https://review.opendev.org/719962 Signed-off-by: Jim Gauld <james.gauld@windriver.com>
This commit is contained in:
parent
a424ad3d64
commit
a9afaabf55
@ -24,6 +24,7 @@ BuildArch: noarch
|
|||||||
|
|
||||||
BuildRequires: helm
|
BuildRequires: helm
|
||||||
BuildRequires: openstack-helm-infra
|
BuildRequires: openstack-helm-infra
|
||||||
|
BuildRequires: chartmuseum
|
||||||
BuildRequires: python-k8sapp-platform
|
BuildRequires: python-k8sapp-platform
|
||||||
BuildRequires: python-k8sapp-platform-wheels
|
BuildRequires: python-k8sapp-platform-wheels
|
||||||
|
|
||||||
@ -34,31 +35,12 @@ The StarlingX K8S application for platform integration
|
|||||||
%setup
|
%setup
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# initialize helm and build the toolkit
|
|
||||||
# helm init --client-only does not work if there is no networking
|
|
||||||
# The following commands do essentially the same as: helm init
|
|
||||||
%define helm_home %{getenv:HOME}/.helm
|
|
||||||
mkdir %{helm_home}
|
|
||||||
mkdir %{helm_home}/repository
|
|
||||||
mkdir %{helm_home}/repository/cache
|
|
||||||
mkdir %{helm_home}/repository/local
|
|
||||||
mkdir %{helm_home}/plugins
|
|
||||||
mkdir %{helm_home}/starters
|
|
||||||
mkdir %{helm_home}/cache
|
|
||||||
mkdir %{helm_home}/cache/archive
|
|
||||||
|
|
||||||
# Stage a repository file that only has a local repo
|
|
||||||
cp files/repositories.yaml %{helm_home}/repository/repositories.yaml
|
|
||||||
|
|
||||||
# Stage a local repo index that can be updated by the build
|
|
||||||
cp files/index.yaml %{helm_home}/repository/local/index.yaml
|
|
||||||
|
|
||||||
# Stage helm-toolkit in the local repo
|
# Stage helm-toolkit in the local repo
|
||||||
cp %{helm_folder}/helm-toolkit-%{toolkit_version}.tgz helm-charts/
|
cp %{helm_folder}/helm-toolkit-%{toolkit_version}.tgz helm-charts/
|
||||||
|
|
||||||
# Host a server for the charts
|
# Host a server for the charts.
|
||||||
helm serve --repo-path . &
|
chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="./helm-charts" &
|
||||||
helm repo rm local
|
sleep 2
|
||||||
helm repo add local http://localhost:8879/charts
|
helm repo add local http://localhost:8879/charts
|
||||||
|
|
||||||
# Make the charts. These produce a tgz file
|
# Make the charts. These produce a tgz file
|
||||||
|
@ -29,6 +29,8 @@ init-%:
|
|||||||
|
|
||||||
lint-%: init-%
|
lint-%: init-%
|
||||||
if [ -d $* ]; then helm lint $*; fi
|
if [ -d $* ]; then helm lint $*; fi
|
||||||
|
@echo "Clobber dependencies from packaging"
|
||||||
|
rm -v -f $*/requirements.lock $*/requirements.yaml
|
||||||
|
|
||||||
build-%: lint-%
|
build-%: lint-%
|
||||||
if [ -d $* ]; then helm package $*; fi
|
if [ -d $* ]; then helm package $*; fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user