Merge "Add GPU plugin to app-intel-device-plugins"
This commit is contained in:
commit
3f17e24e52
@ -1,5 +1,6 @@
|
|||||||
helm-charts/upstream/intel-device-plugins-operator-helm
|
helm-charts/upstream/intel-device-plugins-operator-helm
|
||||||
helm-charts/upstream/intel-device-plugins-dsa-helm
|
helm-charts/upstream/intel-device-plugins-dsa-helm
|
||||||
|
helm-charts/upstream/intel-device-plugins-gpu-helm
|
||||||
helm-charts/upstream/intel-device-plugins-qat-helm
|
helm-charts/upstream/intel-device-plugins-qat-helm
|
||||||
helm-charts/custom/intel-device-plugins-secret-observer-helm
|
helm-charts/custom/intel-device-plugins-secret-observer-helm
|
||||||
python3-k8sapp-intel-device-plugins-operator
|
python3-k8sapp-intel-device-plugins-operator
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
intel-device-plugins-gpu-helm (0.30-0) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Initial release.
|
||||||
|
|
||||||
|
-- Md Irshad Sheikh <mdirshad.sheikh@windriver.com> Tue, 4 June 2024 05:48:16 -0400
|
@ -0,0 +1,15 @@
|
|||||||
|
Source: intel-device-plugins-gpu-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: intel-device-plugins-gpu-helm
|
||||||
|
Section: libs
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${misc:Depends}
|
||||||
|
Description: StarlingX Intel Device Plugins GPU Helm Charts
|
||||||
|
This package contains helm charts for the Intel Device Plugins application.
|
@ -0,0 +1,41 @@
|
|||||||
|
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: intel-device-plugins-operator-helm
|
||||||
|
Source: https://opendev.org/starlingx/app-intel-device-plugins/
|
||||||
|
|
||||||
|
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,29 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
export DH_VERBOSE = 1
|
||||||
|
|
||||||
|
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 ROOT = debian/tmp
|
||||||
|
export APP_FOLDER = $(ROOT)/usr/lib/helm
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
override_dh_auto_build:
|
||||||
|
|
||||||
|
mkdir -p intel-device-plugins-gpu
|
||||||
|
cp Chart.yaml intel-device-plugins-gpu
|
||||||
|
cp -r templates/ intel-device-plugins-gpu
|
||||||
|
cp values.yaml intel-device-plugins-gpu
|
||||||
|
|
||||||
|
make intel-device-plugins-gpu
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
|
# Install the app tar file.
|
||||||
|
install -d -m 755 $(APP_FOLDER)
|
||||||
|
install -p -D -m 755 intel-device-plugins-gpu*.tgz $(APP_FOLDER)
|
||||||
|
|
||||||
|
override_dh_auto_test:
|
@ -0,0 +1 @@
|
|||||||
|
3.0 (quilt)
|
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
debname: intel-device-plugins-gpu-helm
|
||||||
|
debver: 0.30-0
|
||||||
|
dl_path:
|
||||||
|
name: intel-device-plugins-gpu-v0.30.0.tgz
|
||||||
|
url: https://github.com/intel/helm-charts/releases/download/intel-device-plugins-gpu-0.30.0/intel-device-plugins-gpu-0.30.0.tgz
|
||||||
|
sha256sum: de21d597167ff1c72eaeb4266deeb08466c6995754fd06a5ccd2665ff4dc229d
|
||||||
|
src_files:
|
||||||
|
- intel-device-plugins-gpu-helm/files/Makefile
|
||||||
|
revision:
|
||||||
|
stx_patch: -1
|
||||||
|
dist: $STX_DIST
|
||||||
|
GITREVCOUNT:
|
||||||
|
SRC_DIR: ${MY_REPO}/stx/app-intel-device-plugins/helm-charts/upstream/intel-device-plugins-gpu-helm
|
||||||
|
BASE_SRCREV: b03870271175204eddf3fe11e2149d4440f28674
|
@ -0,0 +1,42 @@
|
|||||||
|
#
|
||||||
|
# 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_VERSION) $*; fi
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo "Clean all build artifacts"
|
||||||
|
rm -f */templates/_partials.tpl */templates/_globals.tpl
|
||||||
|
rm -f *tgz */charts/*tgz
|
||||||
|
rm -rf */charts */tmpcharts
|
||||||
|
|
||||||
|
%:
|
||||||
|
@:
|
@ -15,6 +15,7 @@ HELM_CHART_INTEL_DEVICE_PLUGINS_OPERATOR = 'intel-device-plugins-operator'
|
|||||||
|
|
||||||
# Helm: Supported charts:
|
# Helm: Supported charts:
|
||||||
HELM_CHART_INTEL_DEVICE_PLUGINS_DSA = 'intel-device-plugins-dsa'
|
HELM_CHART_INTEL_DEVICE_PLUGINS_DSA = 'intel-device-plugins-dsa'
|
||||||
|
HELM_CHART_INTEL_DEVICE_PLUGINS_GPU = 'intel-device-plugins-gpu'
|
||||||
HELM_CHART_INTEL_DEVICE_PLUGINS_QAT = 'intel-device-plugins-qat'
|
HELM_CHART_INTEL_DEVICE_PLUGINS_QAT = 'intel-device-plugins-qat'
|
||||||
HELM_CHART_SECRET_OBSERVER = 'secret-observer'
|
HELM_CHART_SECRET_OBSERVER = 'secret-observer'
|
||||||
HELM_CHART_SECRET_OBSERVER_RELEASE = 'intel-device-plugins-secret-observer'
|
HELM_CHART_SECRET_OBSERVER_RELEASE = 'intel-device-plugins-secret-observer'
|
||||||
|
@ -0,0 +1,75 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2024 Wind River Systems, Inc.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
from sysinv.common import exception
|
||||||
|
from sysinv.helm import base
|
||||||
|
|
||||||
|
from k8sapp_intel_device_plugins_operator.common import constants as app_constants
|
||||||
|
from oslo_log import log as logging
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class IntelDevicePluginsGpuHelm(base.FluxCDBaseHelm):
|
||||||
|
"""Class to encapsulate helm operations for the intel-device-plugins-gpu chart."""
|
||||||
|
|
||||||
|
SUPPORTED_NAMESPACES = base.BaseHelm.SUPPORTED_NAMESPACES + \
|
||||||
|
[app_constants.HELM_NS_INTEL_DEVICE_PLUGINS_OPERATOR]
|
||||||
|
SUPPORTED_APP_NAMESPACES = {
|
||||||
|
app_constants.HELM_APP_INTEL_DEVICE_PLUGINS_OPERATOR:
|
||||||
|
base.BaseHelm.SUPPORTED_NAMESPACES +
|
||||||
|
[app_constants.HELM_NS_INTEL_DEVICE_PLUGINS_OPERATOR],
|
||||||
|
}
|
||||||
|
|
||||||
|
CHART = app_constants.HELM_CHART_INTEL_DEVICE_PLUGINS_GPU
|
||||||
|
HELM_RELEASE = app_constants.HELM_CHART_INTEL_DEVICE_PLUGINS_GPU
|
||||||
|
|
||||||
|
SERVICE_NAME = app_constants.HELM_CHART_INTEL_DEVICE_PLUGINS_GPU
|
||||||
|
|
||||||
|
def _is_enabled(self, app_name, chart_name, namespace):
|
||||||
|
"""
|
||||||
|
Check if the chart is enable at a system level
|
||||||
|
|
||||||
|
:param app_name: Application name
|
||||||
|
:param chart_name: Chart supplied with the application
|
||||||
|
:param namespace: Namespace where the chart will be executed
|
||||||
|
|
||||||
|
Returns true by default if an exception occurs as most charts are
|
||||||
|
enabled.
|
||||||
|
"""
|
||||||
|
return super(IntelDevicePluginsGpuHelm, self)._is_enabled(
|
||||||
|
app_name, chart_name, namespace)
|
||||||
|
|
||||||
|
def execute_kustomize_updates(self, operator):
|
||||||
|
"""
|
||||||
|
Update the elements of FluxCD kustomize manifests.
|
||||||
|
|
||||||
|
This allows a helm chart plugin to use the FluxCDKustomizeOperator to
|
||||||
|
make dynamic structural changes to the application manifest based on the
|
||||||
|
current conditions in the platform
|
||||||
|
|
||||||
|
Changes currenty include updates to the top level kustomize manifest to
|
||||||
|
disable helm releases.
|
||||||
|
|
||||||
|
:param operator:
|
||||||
|
an instance of the FluxCDKustomizeOperator
|
||||||
|
"""
|
||||||
|
if not self._is_enabled(operator.APP, self.CHART,
|
||||||
|
app_constants.HELM_NS_INTEL_DEVICE_PLUGINS_OPERATOR):
|
||||||
|
operator.helm_release_resource_delete(self.HELM_RELEASE)
|
||||||
|
|
||||||
|
def get_overrides(self, namespace=None):
|
||||||
|
overrides = {
|
||||||
|
app_constants.HELM_NS_INTEL_DEVICE_PLUGINS_OPERATOR: {}
|
||||||
|
}
|
||||||
|
|
||||||
|
if namespace in self.SUPPORTED_NAMESPACES:
|
||||||
|
return overrides[namespace]
|
||||||
|
elif namespace:
|
||||||
|
raise exception.InvalidHelmNamespace(
|
||||||
|
chart=self.CHART, namespace=namespace)
|
||||||
|
else:
|
||||||
|
return overrides
|
@ -38,6 +38,8 @@ systemconfig.helm_plugins.intel_device_plugins_operator =
|
|||||||
002_intel-device-plugins-qat = k8sapp_intel_device_plugins_operator.helm.intel_device_plugins_qat:IntelDevicePluginsQatHelm
|
002_intel-device-plugins-qat = k8sapp_intel_device_plugins_operator.helm.intel_device_plugins_qat:IntelDevicePluginsQatHelm
|
||||||
003_intel-device-plugins-dsa = k8sapp_intel_device_plugins_operator.helm.intel_device_plugins_dsa:IntelDevicePluginsDsaHelm
|
003_intel-device-plugins-dsa = k8sapp_intel_device_plugins_operator.helm.intel_device_plugins_dsa:IntelDevicePluginsDsaHelm
|
||||||
004_secret-observer = k8sapp_intel_device_plugins_operator.helm.secret_observer:SecretObserverHelm
|
004_secret-observer = k8sapp_intel_device_plugins_operator.helm.secret_observer:SecretObserverHelm
|
||||||
|
005_intel-device-plugins-gpu = k8sapp_intel_device_plugins_operator.helm.intel_device_plugins_gpu:IntelDevicePluginsGpuHelm
|
||||||
|
|
||||||
systemconfig.fluxcd.kustomize_ops =
|
systemconfig.fluxcd.kustomize_ops =
|
||||||
intel-device-plugins-operator = k8sapp_intel_device_plugins_operator.kustomize.kustomize_intel_device_plugins:IntelDevicePluginsFluxCDKustomizeOperator
|
intel-device-plugins-operator = k8sapp_intel_device_plugins_operator.kustomize.kustomize_intel_device_plugins:IntelDevicePluginsFluxCDKustomizeOperator
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ Build-Depends: debhelper-compat (= 13),
|
|||||||
python3-k8sapp-intel-device-plugins-operator,
|
python3-k8sapp-intel-device-plugins-operator,
|
||||||
python3-k8sapp-intel-device-plugins-operator-wheels,
|
python3-k8sapp-intel-device-plugins-operator-wheels,
|
||||||
intel-device-plugins-dsa-helm,
|
intel-device-plugins-dsa-helm,
|
||||||
|
intel-device-plugins-gpu-helm,
|
||||||
intel-device-plugins-qat-helm,
|
intel-device-plugins-qat-helm,
|
||||||
intel-device-plugins-operator-helm,
|
intel-device-plugins-operator-helm,
|
||||||
intel-device-plugins-secret-observer-helm,
|
intel-device-plugins-secret-observer-helm,
|
||||||
|
@ -6,6 +6,7 @@ maintain_attributes: true
|
|||||||
|
|
||||||
disabled_charts:
|
disabled_charts:
|
||||||
- intel-device-plugins-dsa
|
- intel-device-plugins-dsa
|
||||||
|
- intel-device-plugins-gpu
|
||||||
- intel-device-plugins-qat
|
- intel-device-plugins-qat
|
||||||
|
|
||||||
upgrades:
|
upgrades:
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2024 Wind River Systems, Inc.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
@ -0,0 +1,5 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2024 Wind River Systems, Inc.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
@ -0,0 +1,38 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2024 Wind River Systems, Inc.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
apiVersion: "helm.toolkit.fluxcd.io/v2beta1"
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: intel-device-plugins-gpu
|
||||||
|
labels:
|
||||||
|
chart_group: intel-device-plugins-operator-charts
|
||||||
|
spec:
|
||||||
|
releaseName: intel-device-plugins-gpu
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: intel-device-plugins-gpu
|
||||||
|
version: REPLACE_HELM_CHART_VERSION
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: stx-platform
|
||||||
|
dependsOn:
|
||||||
|
- name: intel-device-plugins-operator
|
||||||
|
interval: 1m
|
||||||
|
timeout: 30m
|
||||||
|
test:
|
||||||
|
enable: false
|
||||||
|
install:
|
||||||
|
disableHooks: false
|
||||||
|
upgrade:
|
||||||
|
disableHooks: false
|
||||||
|
valuesFrom:
|
||||||
|
- kind: Secret
|
||||||
|
name: gpu-static-overrides
|
||||||
|
valuesKey: gpu-static-overrides.yaml
|
||||||
|
- kind: Secret
|
||||||
|
name: gpu-system-overrides
|
||||||
|
valuesKey: gpu-system-overrides.yaml
|
@ -0,0 +1,18 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2024 Wind River Systems, Inc.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
namespace: intel-device-plugins-operator
|
||||||
|
resources:
|
||||||
|
- helmrelease.yaml
|
||||||
|
secretGenerator:
|
||||||
|
- name: gpu-static-overrides
|
||||||
|
files:
|
||||||
|
- gpu-static-overrides.yaml
|
||||||
|
- name: gpu-system-overrides
|
||||||
|
files:
|
||||||
|
- gpu-system-overrides.yaml
|
||||||
|
generatorOptions:
|
||||||
|
disableNameSuffixHash: true
|
@ -10,6 +10,7 @@ namespace: intel-device-plugins-operator
|
|||||||
resources:
|
resources:
|
||||||
- base
|
- base
|
||||||
- intel-device-plugins-dsa
|
- intel-device-plugins-dsa
|
||||||
|
- intel-device-plugins-gpu
|
||||||
- intel-device-plugins-operator
|
- intel-device-plugins-operator
|
||||||
- intel-device-plugins-qat
|
- intel-device-plugins-qat
|
||||||
- secret-observer
|
- secret-observer
|
||||||
|
Loading…
Reference in New Issue
Block a user