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 dex chart to specify apiVersion.

Change-Id: I1497a5da3f0d67291ff2f8cf3a97826b134def0a
Story: 2007000
Task: 39329
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-09 09:48:16 -04:00
parent 775376f17e
commit caa98f3bee
3 changed files with 27 additions and 46 deletions

View File

@ -28,6 +28,7 @@ Patch01: 0001-Update-Dex-chart-for-Kubernetes-API-1.16.patch
Patch02: 0002-add-image-pull-secrets.patch
Patch03: 0003-Add-affinity-support.patch
Patch04: 0004-Automatically-roll-deployments.patch
Patch05: 0005-Update-Dex-chart-for-Helm-v3.patch
BuildArch: noarch
@ -43,27 +44,11 @@ StarlingX OIDC auth Helm charts
%patch02 -p1
%patch03 -p1
%patch04 -p1
%patch05 -p1
%build
# initialize helm
# 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
# This chart does not require chartmuseum server since
# it has no dependency on local or stable repos.
# Make the charts. These produce a tgz file
cp %{SOURCE3} stable
which make

View File

@ -0,0 +1,21 @@
From f81bba1fa22a1762d5c077f04835f593273fc4e3 Mon Sep 17 00:00:00 2001
From: Jim Gauld <james.gauld@windriver.com>
Date: Fri, 20 Mar 2020 19:23:49 -0400
Subject: [PATCH] Update Dex chart for Helm v3
---
stable/dex/Chart.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/stable/dex/Chart.yaml b/stable/dex/Chart.yaml
index 1ca2f7b..794579b 100644
--- a/stable/dex/Chart.yaml
+++ b/stable/dex/Chart.yaml
@@ -1,3 +1,4 @@
+apiVersion: v1
name: dex
version: 0.8.0
appVersion: 2.14.0
--
1.8.3.1

View File

@ -32,38 +32,13 @@ StarlingX OIDC auth Helm charts
%setup
%build
# initialize helm
# 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
# Host a server for the charts
helm serve --repo-path . &
helm repo rm local
helm repo add local http://localhost:8879/charts
# This chart does not require chartmuseum server since
# it has no dependency on local or stable repos.
# Make the charts. These produce a tgz file
cd helm-charts
make oidc-client
cd -
# Terminate helm server (the last backgrounded task)
kill %1
# Create a chart tarball compliant with sysinv kube-app.py
%define app_staging %{_builddir}/staging
%define app_tarball %{app_name}-%{version}-%{tis_patch_ver}.tgz