C-state Management Application Helm Charts
This commit adds `cstate-management` application's helm charts. Subsequent commits will be added to effectively establish `cstate-management` as a StarlingX application. Test Plan: PASS: Check whether helm charts Debian package is built successfully. PASS: Check whether helm chart installs successfully. Story: 2011105 Task: 50177 Authored-By: Vinicius Lobo <vinicius.rochalobo@windriver.com> Co-Authored-By: Guilherme Santos <guilherme.santos@windriver.com> Change-Id: Ieb3220d66e133696beccb1b59fa62b440d59be60 Signed-off-by: Guilherme Santos <guilherme.santos@windriver.com>
This commit is contained in:
parent
315f265bd6
commit
abf61cc2f6
1
debian_build_layer.cfg
Normal file
1
debian_build_layer.cfg
Normal file
@ -0,0 +1 @@
|
||||
flock
|
1
debian_pkg_dirs
Normal file
1
debian_pkg_dirs
Normal file
@ -0,0 +1 @@
|
||||
helm-charts/custom/cstate-management-helm
|
@ -0,0 +1,43 @@
|
||||
#
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Copyright (c) 2024 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# It's necessary to set this because some environments don't link sh -> bash.
|
||||
SHELL := /bin/bash
|
||||
TASK := build
|
||||
|
||||
EXCLUDES := doc tests tools logs tmp
|
||||
CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.)))
|
||||
|
||||
.PHONY: $(EXCLUDES) $(CHARTS)
|
||||
|
||||
all: $(CHARTS)
|
||||
|
||||
$(CHARTS):
|
||||
@if [ -d $@ ]; then \
|
||||
echo; \
|
||||
echo "===== Processing [$@] chart ====="; \
|
||||
make $(TASK)-$@; \
|
||||
fi
|
||||
|
||||
init-%:
|
||||
if [ -f $*/Makefile ]; then make -C $*; fi
|
||||
|
||||
lint-%: init-%
|
||||
if [ -d $* ]; then helm lint $*; fi
|
||||
|
||||
build-%: lint-%
|
||||
if [ -d $* ]; then \
|
||||
helm package --version $(CHART_BASE_VERSION) --app-version $(CHART_APP_VERSION) $*; \
|
||||
fi
|
||||
|
||||
clean:
|
||||
@echo "Clean all build artifacts"
|
||||
rm -f */templates/_partials.tpl */templates/_globals.tpl
|
||||
rm -rf */charts */tmpcharts
|
||||
|
||||
%:
|
||||
@:
|
@ -0,0 +1,5 @@
|
||||
This directory contains all StarlingX charts that need to be built for this
|
||||
application. Some charts are common across applications. These common charts
|
||||
reside in the stx-config/kubernetes/helm-charts directory. To include these in
|
||||
this application update the build_srpm.data file and use the COPY_LIST_TO_TAR
|
||||
mechanism to populate these common charts.
|
@ -0,0 +1,11 @@
|
||||
#
|
||||
# Copyright (c) 2024 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
apiVersion: v2
|
||||
name: cstate-management
|
||||
description: C-state management helm chart
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: v0.1.0
|
@ -0,0 +1,92 @@
|
||||
#
|
||||
# Copyright (c) 2024 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: {{ .Chart.Name }}
|
||||
namespace: {{ .Values.namespace }}
|
||||
labels:
|
||||
release: {{ .Chart.AppVersion }}
|
||||
app: {{ .Chart.Name }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Chart.Name }}
|
||||
release: {{ .Chart.AppVersion }}
|
||||
template:
|
||||
metadata:
|
||||
namespace: {{ .Values.namespace }}
|
||||
labels:
|
||||
app: {{ .Chart.Name }}
|
||||
release: {{ .Chart.AppVersion }}
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.imagePullSecrets.name }}
|
||||
containers:
|
||||
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ .Values.imagePullPolicy }}
|
||||
tty: true
|
||||
stdin: true
|
||||
securityContext:
|
||||
privileged: true
|
||||
name: {{ .Chart.Name }}
|
||||
env:
|
||||
- name: PYTHONPATH
|
||||
value: /opt/cstate-management
|
||||
command: ["python3", "run.py"]
|
||||
ports:
|
||||
- containerPort: 32000
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: hostkubelet
|
||||
mountPath: /var/lib/kubelet
|
||||
readOnly: false
|
||||
- name: hostcpu
|
||||
mountPath: /sys/devices/system/cpu
|
||||
readOnly: false
|
||||
- name: hostcpuset
|
||||
mountPath: /sys/fs/cgroup/cpuset
|
||||
- name: nodepath
|
||||
mountPath: /sys/devices/system/node
|
||||
- name: hostplatform
|
||||
mountPath: /etc/platform
|
||||
- name: crictl
|
||||
mountPath: /usr/bin/crictl
|
||||
- name: crictlyaml
|
||||
mountPath: /etc/crictl.yaml
|
||||
- name: crictlusryaml
|
||||
mountPath: /usr/etc/crictl.yaml
|
||||
- name: containerd
|
||||
mountPath: /var/run/containerd/
|
||||
volumes:
|
||||
- name: hostkubelet
|
||||
hostPath:
|
||||
path: /var/lib/kubelet
|
||||
- name: hostcpu
|
||||
hostPath:
|
||||
path: /sys/devices/system/cpu
|
||||
- name: hostcpuset
|
||||
hostPath:
|
||||
path: /sys/fs/cgroup/cpuset
|
||||
- name: nodepath
|
||||
hostPath:
|
||||
path: /sys/devices/system/node
|
||||
- name: hostplatform
|
||||
hostPath:
|
||||
path: /etc/platform
|
||||
- name: crictl
|
||||
hostPath:
|
||||
path: /usr/bin/crictl
|
||||
- name: crictlyaml
|
||||
hostPath:
|
||||
path: /etc/crictl.yaml
|
||||
- name: crictlusryaml
|
||||
hostPath:
|
||||
path: /usr/etc/crictl.yaml
|
||||
- name: containerd
|
||||
hostPath:
|
||||
path: /var/run/containerd/
|
@ -0,0 +1,24 @@
|
||||
#
|
||||
# Copyright (c) 2024 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Chart.Name }}-service
|
||||
namespace: {{ .Values.namespace }}
|
||||
labels:
|
||||
release: {{ .Chart.AppVersion }}
|
||||
app: {{ .Chart.Name }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
internalTrafficPolicy: {{ .Values.service.internalTrafficPolicy }}
|
||||
selector:
|
||||
app: {{ .Chart.Name }}
|
||||
release: {{ .Chart.AppVersion }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: {{ .Values.service.targetPort }}
|
||||
protocol: TCP
|
@ -0,0 +1,24 @@
|
||||
# Copyright (c) 2024 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Default values for c-state management.
|
||||
|
||||
---
|
||||
namespace: cstate-management
|
||||
|
||||
image:
|
||||
repository: docker.io/starlingx/cstate-management
|
||||
tag: stx.10.0-v0.1.0
|
||||
|
||||
spec:
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
imagePullSecrets:
|
||||
name: default-registry-key
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 32000
|
||||
targetPort: 32000
|
||||
internalTrafficPolicy: Local
|
@ -0,0 +1,5 @@
|
||||
cstate-management-helm (0.1-0) unstable; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Vinicius Lobo <vinicius.rochalobo@windriver.com> Mon, 22 Apr 2024 16:25:42 +0000
|
@ -0,0 +1,15 @@
|
||||
Source: cstate-management-helm
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
helm,
|
||||
Standards-Version: 4.5.1
|
||||
Homepage: https://www.starlingx.io
|
||||
|
||||
Package: cstate-management-helm
|
||||
Section: libs
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}
|
||||
Description: StarlingX C-state Management Chart
|
||||
This package contains helm chart for the C-state Management application.
|
@ -0,0 +1,41 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: cstate-management-helm
|
||||
Source: https://opendev.org/starlingx/app-cstate-management/
|
||||
|
||||
Files: *
|
||||
Copyright: (c) 2024 Wind River Systems, Inc
|
||||
License: Apache-2
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
.
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
.
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
.
|
||||
On Debian-based systems the full text of the Apache version 2.0 license
|
||||
can be found in `/usr/share/common-licenses/Apache-2.0'.
|
||||
|
||||
# If you want to use GPL v2 or later for the /debian/* files use
|
||||
# the following clauses, or change it to suit. Delete these two lines
|
||||
Files: debian/*
|
||||
Copyright: 2024 Wind River Systems, Inc
|
||||
License: Apache-2
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
.
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
.
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
.
|
||||
On Debian-based systems the full text of the Apache version 2.0 license
|
||||
can be found in `/usr/share/common-licenses/Apache-2.0'.
|
@ -0,0 +1 @@
|
||||
usr/lib/helm/*
|
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/make -f
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
export ROOT = debian/tmp
|
||||
export APP_FOLDER = $(ROOT)/usr/lib/helm
|
||||
|
||||
export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
|
||||
export PATCH_VERSION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.')
|
||||
export CHART_BASE_VERSION = $(shell echo $(DEB_VERSION) | sed 's/-/./' | cut -d '.' -f 1-3)
|
||||
export CHART_VERSION = $(CHART_BASE_VERSION)+STX.$(PATCH_VERSION)
|
||||
export CHART_APP_VERSION=v$(CHART_BASE_VERSION)
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
mkdir -p build
|
||||
mv Makefile cstate-management build
|
||||
cd build && make CHART_VERSION=$(CHART_VERSION) cstate-management
|
||||
|
||||
override_dh_auto_install:
|
||||
# Install the app tar file.
|
||||
install -d -m 755 $(APP_FOLDER)
|
||||
install -p -D -m 755 build/cstate-management*.tgz $(APP_FOLDER)
|
||||
|
||||
override_dh_auto_test:
|
||||
|
||||
override_dh_usrlocal:
|
@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
debname: cstate-management-helm
|
||||
debver: 0.1-0
|
||||
src_path: cstate-management-helm
|
||||
revision:
|
||||
dist: $STX_DIST
|
||||
GITREVCOUNT:
|
||||
SRC_DIR: ${MY_REPO}/stx/app-cstate-management/helm-charts/custom/cstate-management-helm
|
||||
BASE_SRCREV: dae78a8cccdfc11f34d195daf7d05b4c8c022b71
|
Loading…
x
Reference in New Issue
Block a user