monitor-armada-app/monitor-helm-elastic/centos/monitor-helm-elastic.spec
John Kung d3751ee92a Update Elasticsearch 7.4.0 and resource limits
Upgrade to version 7.4.0 of Elastic
  Aligns with updated version and addresses issue with version 7.3.2 not
  monitoring elastic pod resource cpu, and memory utilization

Update logstash to use queue.type memory, and Readiness and Liveness
parameters in armada elastic charts.

Change-Id: I73f34732b25854ccd322f06ff8b0cdc150f46d0e
Story: 2005733
Task: 37161
Signed-off-by: John Kung <john.kung@windriver.com>
2019-10-17 09:36:51 -04:00

77 lines
1.9 KiB
RPMSpec

%global sha 2bd7616ceddbdf2eee88965e2028ee37d304c79c
%global helm_folder /usr/lib/helm
%global helmchart_version 0.1.0
%global _default_patch_flags --no-backup-if-mismatch --prefix=/tmp/junk
Summary: Monitor-Helm-Elastic charts
Name: monitor-helm-elastic
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
URL: https://github.com/elastic/helm-charts/
Source0: helm-charts-elastic-%{sha}.tar.gz
Source1: repositories.yaml
Source2: index.yaml
BuildArch: noarch
Patch01: 0001-add-makefile.patch
Patch02: 0002-Add-compatibility-for-k8s-1.16.patch
Patch03: 0003-use-oss-image.patch
Patch04: 0004-Update-to-Elastic-7.4.0-Release.patch
BuildRequires: helm
%description
Monitor Helm elasticsearch charts
%prep
%setup -n helm-charts-elastic
%patch01 -p1
%patch02 -p1
%patch03 -p1
%patch04 -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
# Host a server for the charts
helm serve --repo-path . &
helm repo rm local
helm repo add local http://localhost:8879/charts
# Create the tgz files
rm elasticsearch/Makefile
make elasticsearch
# terminate helm server (the last backgrounded task)
kill %1
%install
install -d -m 755 ${RPM_BUILD_ROOT}%{helm_folder}
install -p -D -m 755 *.tgz ${RPM_BUILD_ROOT}%{helm_folder}
%files
%defattr(-,root,root,-)
%{helm_folder}/*