Add FluxCD version of platform-integ-app
Add new manifest files for the FluxCD version of platform-integ-apps This creates two tarballs, one for aramada and one for FluxCD * job-ceph-pools-audit.yaml change to support helmv3 Differences from armada-app: * Helm-toolkit release is disabled as it is included in other charts Test (AIO-SX): PASS: Application is applied Story: 2009138 Task: 45118 Depends-on: https://review.opendev.org/c/starlingx/config/+/838321 Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com> Change-Id: I417d6b7cf6a12968f36a1045dc98c2c26579a9b8
This commit is contained in:
parent
d6619931eb
commit
5b0784c7c2
@ -1 +1,3 @@
|
||||
stx-platform-helm
|
||||
stx-platform-helm-fluxcd
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
SRC_DIR="stx-platform-helm"
|
||||
|
||||
COPY_LIST="$PKG_BASE/$SRC_DIR/files/*"
|
||||
|
||||
|
||||
COPY_LIST_TO_TAR="\
|
||||
$STX_BASE/helm-charts/node-feature-discovery/node-feature-discovery/helm-charts \
|
||||
"
|
||||
|
@ -31,6 +31,14 @@ BuildRequires: python-k8sapp-platform-wheels
|
||||
%description
|
||||
The StarlingX K8S application for platform integration
|
||||
|
||||
%package fluxcd
|
||||
Summary: The StarlingX K8S Fluxcd application for platform integration
|
||||
Group: base
|
||||
License: Apache-2.0
|
||||
|
||||
%description fluxcd
|
||||
The StarlingX K8S Fluxcd application for platform integration
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
@ -57,7 +65,10 @@ 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
|
||||
%define app_tarball_armada %{app_name}-%{version}-%{tis_patch_ver}.tgz
|
||||
%define app_tarball_fluxcd %{app_name}-fluxcd-%{version}-%{tis_patch_ver}.tgz
|
||||
%define armada_app_path %{_builddir}/%{app_tarball_armada}
|
||||
%define fluxcd_app_path %{_builddir}/%{app_tarball_fluxcd}
|
||||
|
||||
# Setup staging
|
||||
mkdir -p %{app_staging}
|
||||
@ -76,21 +87,45 @@ sed -i 's/@HELM_REPO@/%{helm_repo}/g' %{app_staging}/metadata.yaml
|
||||
mkdir -p %{app_staging}/plugins
|
||||
cp /plugins/%{app_name}/*.whl %{app_staging}/plugins
|
||||
|
||||
# package it up
|
||||
# calculate checksum
|
||||
find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
|
||||
tar -zcf %{_builddir}/%{app_tarball} -C %{app_staging}/ .
|
||||
|
||||
# package armada app
|
||||
tar -zcf %armada_app_path -C %{app_staging}/ .
|
||||
|
||||
# switch back to source root
|
||||
cd -
|
||||
|
||||
# Prepare app_staging for fluxcd package
|
||||
rm -f %{app_staging}/manifest.yaml
|
||||
|
||||
cp -R fluxcd-manifests %{app_staging}/
|
||||
|
||||
# calculate checksum of all files in app_staging
|
||||
cd %{app_staging}
|
||||
find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
|
||||
# package fluxcd app
|
||||
tar -zcf %fluxcd_app_path -C %{app_staging}/ .
|
||||
|
||||
# switch back to source root
|
||||
cd -
|
||||
|
||||
# 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}
|
||||
install -p -D -m 755 %armada_app_path %{buildroot}/%{app_folder}
|
||||
install -p -D -m 755 %fluxcd_app_path %{buildroot}/%{app_folder}
|
||||
install -d -m 755 ${RPM_BUILD_ROOT}/opt/extracharts
|
||||
# TODO (rchurch): remove
|
||||
install -p -D -m 755 helm-charts/node-feature-discovery-*.tgz ${RPM_BUILD_ROOT}/opt/extracharts
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{app_folder}/*
|
||||
%{app_folder}/%{app_tarball_armada}
|
||||
/opt/extracharts/*
|
||||
|
||||
%files fluxcd
|
||||
%defattr(-,root,root,-)
|
||||
%{app_folder}/%{app_tarball_fluxcd}
|
||||
|
@ -0,0 +1,13 @@
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
apiVersion: source.toolkit.fluxcd.io/v1beta1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: stx-platform
|
||||
spec:
|
||||
url: http://192.168.206.1:8080/helm_charts/stx-platform
|
||||
interval: 60m
|
@ -0,0 +1,8 @@
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
resources:
|
||||
- helmrepository.yaml
|
@ -0,0 +1,10 @@
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: kube-system
|
@ -0,0 +1,10 @@
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
tolerations:
|
||||
- key: "node-role.kubernetes.io/master"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
@ -0,0 +1,36 @@
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
apiVersion: "helm.toolkit.fluxcd.io/v2beta1"
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: ceph-pools-audit
|
||||
labels:
|
||||
chart_group: starlingx-ceph-charts
|
||||
spec:
|
||||
releaseName: stx-ceph-pools-audit
|
||||
chart:
|
||||
spec:
|
||||
chart: ceph-pools-audit
|
||||
version: 0.1.0
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: stx-platform
|
||||
interval: 5m
|
||||
timeout: 30m
|
||||
test:
|
||||
enable: false
|
||||
install:
|
||||
disableHooks: false
|
||||
upgrade:
|
||||
disableHooks: false
|
||||
valuesFrom:
|
||||
- kind: Secret
|
||||
name: ceph-pools-audit-static-overrides
|
||||
valuesKey: ceph-pools-audit-static-overrides.yaml
|
||||
- kind: Secret
|
||||
name: ceph-pools-audit-system-overrides
|
||||
valuesKey: ceph-pools-audit-system-overrides.yaml
|
@ -0,0 +1,18 @@
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
namespace: kube-system
|
||||
resources:
|
||||
- helmrelease.yaml
|
||||
secretGenerator:
|
||||
- name: ceph-pools-audit-static-overrides
|
||||
files:
|
||||
- ceph-pools-audit-static-overrides.yaml
|
||||
- name: ceph-pools-audit-system-overrides
|
||||
files:
|
||||
- ceph-pools-audit-system-overrides.yaml
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
@ -0,0 +1,11 @@
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
global:
|
||||
tolerations:
|
||||
- key: "node-role.kubernetes.io/master"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
@ -0,0 +1,36 @@
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
apiVersion: "helm.toolkit.fluxcd.io/v2beta1"
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: cephfs-provisioner
|
||||
labels:
|
||||
chart_group: starlingx-ceph-charts
|
||||
spec:
|
||||
releaseName: stx-cephfs-provisioner
|
||||
chart:
|
||||
spec:
|
||||
chart: cephfs-provisioner
|
||||
version: 0.1.0
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: stx-platform
|
||||
interval: 5m
|
||||
timeout: 30m
|
||||
test:
|
||||
enable: false
|
||||
install:
|
||||
disableHooks: false
|
||||
upgrade:
|
||||
disableHooks: false
|
||||
valuesFrom:
|
||||
- kind: Secret
|
||||
name: cephfs-provisioner-static-overrides
|
||||
valuesKey: cephfs-provisioner-static-overrides.yaml
|
||||
- kind: Secret
|
||||
name: cephfs-provisioner-system-overrides
|
||||
valuesKey: cephfs-provisioner-system-overrides.yaml
|
@ -0,0 +1,18 @@
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
namespace: kube-system
|
||||
resources:
|
||||
- helmrelease.yaml
|
||||
secretGenerator:
|
||||
- name: cephfs-provisioner-static-overrides
|
||||
files:
|
||||
- cephfs-provisioner-static-overrides.yaml
|
||||
- name: cephfs-provisioner-system-overrides
|
||||
files:
|
||||
- cephfs-provisioner-system-overrides.yaml
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
@ -0,0 +1,14 @@
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: kube-system
|
||||
resources:
|
||||
- base
|
||||
- cephfs-provisioner
|
||||
- ceph-pools-audit
|
||||
- rbd-provisioner
|
@ -0,0 +1,36 @@
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
apiVersion: "helm.toolkit.fluxcd.io/v2beta1"
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: rbd-provisioner
|
||||
labels:
|
||||
chart_group: starlingx-ceph-charts
|
||||
spec:
|
||||
releaseName: stx-rbd-provisioner
|
||||
chart:
|
||||
spec:
|
||||
chart: rbd-provisioner
|
||||
version: 0.1.0
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: stx-platform
|
||||
interval: 5m
|
||||
timeout: 30m
|
||||
test:
|
||||
enable: false
|
||||
install:
|
||||
disableHooks: false
|
||||
upgrade:
|
||||
disableHooks: false
|
||||
valuesFrom:
|
||||
- kind: Secret
|
||||
name: rbd-provisioner-static-overrides
|
||||
valuesKey: rbd-provisioner-static-overrides.yaml
|
||||
- kind: Secret
|
||||
name: rbd-provisioner-system-overrides
|
||||
valuesKey: rbd-provisioner-system-overrides.yaml
|
@ -0,0 +1,18 @@
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
namespace: kube-system
|
||||
resources:
|
||||
- helmrelease.yaml
|
||||
secretGenerator:
|
||||
- name: rbd-provisioner-static-overrides
|
||||
files:
|
||||
- rbd-provisioner-static-overrides.yaml
|
||||
- name: rbd-provisioner-system-overrides
|
||||
files:
|
||||
- rbd-provisioner-system-overrides.yaml
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
@ -0,0 +1,11 @@
|
||||
#
|
||||
# Copyright (c) 2022 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
global:
|
||||
tolerations:
|
||||
- key: "node-role.kubernetes.io/master"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
@ -47,7 +47,7 @@ spec:
|
||||
serviceAccountName: {{ $serviceAccountName }}
|
||||
restartPolicy: OnFailure
|
||||
nodeSelector:
|
||||
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value | toString | quote }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 12 }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user