
A toleration needs to be added to all resources that create pods since the node-role.kubernetes.io/master taint will be restored to all master nodes. This ensures that the pods will run on the master node. Tested in an AIO-SX by enabling the taint and: - Deleting pods - Performing an application update - Removing and reinstalling the application - Deleting the ValidatingWebhookConfiguration and reapplying the app In every case mentioned the resources would come up again. Story: 2009232 Task: 43343 Change-Id: Ide2ce4ac66f01da412822f6fc7d658da80de4f32 Signed-off-by: Rafael Camargos <RafaelLucas.Camargos@windriver.com>
98 lines
2.5 KiB
RPMSpec
98 lines
2.5 KiB
RPMSpec
# Application tunables (maps to metadata)
|
|
%global app_name nginx-ingress-controller
|
|
%global helm_repo stx-platform
|
|
%global nginx_version 0.41.2
|
|
|
|
%global armada_folder /usr/lib/armada
|
|
|
|
# Install location
|
|
%global app_folder /usr/local/share/applications/helm
|
|
|
|
# Build variables
|
|
%global helm_folder /usr/lib/helm
|
|
%global toolkit_version 0.1.0
|
|
|
|
Summary: StarlingX Nginx Ingress Controller Application Armada Helm Charts
|
|
Name: stx-nginx-ingress-controller-helm
|
|
Version: 1.1
|
|
Release: %{tis_patch_ver}%{?_tis_dist}
|
|
License: Apache-2.0
|
|
Group: base
|
|
Packager: Wind River <info@windriver.com>
|
|
URL: unknown
|
|
|
|
Source0: helm-charts-ingress-nginx-%{nginx_version}.tar.gz
|
|
Source1: repositories.yaml
|
|
Source2: index.yaml
|
|
Source3: Makefile
|
|
Source4: metadata.yaml
|
|
Source5: nginx_ingress_controller_manifest.yaml
|
|
|
|
BuildArch: noarch
|
|
|
|
Patch01: 0001-add-toleration.patch
|
|
|
|
BuildRequires: helm
|
|
BuildRequires: chartmuseum
|
|
BuildRequires: python-k8sapp-nginx-ingress-controller
|
|
BuildRequires: python-k8sapp-nginx-ingress-controller-wheels
|
|
|
|
%description
|
|
StarlingX Nginx Ingress Controller Application Armada Helm Charts
|
|
|
|
%prep
|
|
%setup -n helm-charts
|
|
%patch01 -p1
|
|
|
|
%build
|
|
# Host a server for the charts
|
|
chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." &
|
|
sleep 2
|
|
helm repo add local http://localhost:8879/charts
|
|
|
|
# Create the tgz file
|
|
cp %{SOURCE3} charts
|
|
cd charts
|
|
make ingress-nginx
|
|
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
|
|
|
|
# Setup staging
|
|
mkdir -p %{app_staging}
|
|
cp %{SOURCE4} %{app_staging}
|
|
cp %{SOURCE5} %{app_staging}
|
|
mkdir -p %{app_staging}/charts
|
|
|
|
cp charts/*.tgz %{app_staging}/charts
|
|
cd %{app_staging}
|
|
|
|
# Populate metadata
|
|
sed -i 's/@APP_NAME@/%{app_name}/g' %{app_staging}/metadata.yaml
|
|
sed -i 's/@APP_VERSION@/%{version}-%{tis_patch_ver}/g' %{app_staging}/metadata.yaml
|
|
sed -i 's/@HELM_REPO@/%{helm_repo}/g' %{app_staging}/metadata.yaml
|
|
|
|
# Copy the plugins: installed in the buildroot
|
|
mkdir -p %{app_staging}/plugins
|
|
cp /plugins/%{app_name}/*.whl %{app_staging}/plugins
|
|
|
|
# package it up
|
|
find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
|
|
tar -zcf %{_builddir}/%{app_tarball} -C %{app_staging}/ .
|
|
|
|
# Cleanup staging
|
|
rm -fr %{app_staging}
|
|
|
|
%install
|
|
install -d -m 755 %{buildroot}/%{app_folder}
|
|
install -p -D -m 755 %{_builddir}/%{app_tarball} %{buildroot}/%{app_folder}
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{app_folder}/*
|