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)

This updates ingress chart to specify apiVersion.

Change-Id: Ie41cde4ad450b63a78a0a677995e9c28eefd9798
Story: 2007000
Task: 39327
Depends-On: https://review.opendev.org/719962
Signed-off-by: Jim Gauld <james.gauld@windriver.com>
This commit is contained in:
Jim Gauld 2020-04-08 16:05:36 -04:00
parent eae559de41
commit c00ff664f1
4 changed files with 37 additions and 62 deletions

View File

@ -27,8 +27,10 @@ Patch09: 0009-Fix-ipv6-address-issue-causing-mariadb-ingress-not-ready.patch
Patch10: 0010-Fix-rabbitmq-could-not-bind-port-to-ipv6-address-iss.patch
Patch11: 0011-Enable-override-of-mariadb-server-probe-parameters.patch
Patch12: 0012-Mariadb-use-utf8_general_ci-collation-as-default.patch
Patch13: 0013-Update-ingress-chart-for-Helm-v3.patch
BuildRequires: helm
BuildRequires: chartmuseum
%description
Openstack Helm Infra charts
@ -47,27 +49,12 @@ Openstack Helm Infra charts
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%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 %{SOURCE1} %{helm_home}/repository/repositories.yaml
# Host a server for the charts
helm serve /tmp/charts --address localhost:8879 --url http://localhost:8879/charts &
helm repo rm local
chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." &
sleep 2
helm repo add local http://localhost:8879/charts
# Make the charts. These produce tgz files

View File

@ -0,0 +1,24 @@
From 06ca3c8594c73d2aacc3958f6e94a4911e2caa8a Mon Sep 17 00:00:00 2001
From: Jim Gauld <james.gauld@windriver.com>
Date: Mon, 6 Apr 2020 09:17:47 -0400
Subject: [PATCH] Update ingress chart for Helm v3
---
ingress/Chart.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/ingress/Chart.yaml b/ingress/Chart.yaml
index 70d7467..a9030e2 100644
--- a/ingress/Chart.yaml
+++ b/ingress/Chart.yaml
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+apiVersion: v1
description: OpenStack-Helm Ingress Controller
name: ingress
version: 0.1.0
--
1.8.3.1

View File

@ -30,6 +30,7 @@ Patch08: 0008-Check-return-value-of-get-subnets-before-iterate-for.patch
BuildRequires: helm
BuildRequires: openstack-helm-infra
BuildRequires: chartmuseum
Requires: openstack-helm-infra
%description
@ -47,31 +48,12 @@ Openstack Helm charts
%patch08 -p1
%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 %{SOURCE1} %{helm_home}/repository/repositories.yaml
# Stage a local repo index that can be updated by the build
cp %{SOURCE2} %{helm_home}/repository/local/index.yaml
# Stage helm-toolkit in the local repo
cp %{helm_folder}/helm-toolkit-%{toolkit_version}.tgz .
# Host a server for the charts
helm serve --repo-path . &
helm repo rm local
chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." &
sleep 2
helm repo add local http://localhost:8879/charts
# Make the charts. These produce a tgz file

View File

@ -19,6 +19,7 @@ BuildArch: noarch
BuildRequires: helm
BuildRequires: openstack-helm-infra
BuildRequires: chartmuseum
Requires: openstack-helm-infra
Requires: openstack-helm
Requires: python-k8sapp-openstack-wheels
@ -30,31 +31,12 @@ StarlingX Openstack Application Helm charts
%setup
%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
cp %{helm_folder}/helm-toolkit-%{toolkit_version}.tgz .
cp %{helm_folder}/helm-toolkit-%{toolkit_version}.tgz helm-charts/
# Host a server for the charts
helm serve --repo-path . &
helm repo rm local
chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="./helm-charts" &
sleep 2
helm repo add local http://localhost:8879/charts
# Make the charts. These produce a tgz file
@ -71,7 +53,7 @@ cd -
kill %1
# remove helm-toolkit. This will be packaged with openstack-helm-infra
rm ./helm-toolkit-%{toolkit_version}.tgz
rm ./helm-charts/helm-toolkit-%{toolkit_version}.tgz
%install
# helm_folder is created by openstack-helm-infra