Add helm chart for node feature discovery
This packages up the upstream "node feature discovery" project[1] into a helm chart and includes it in the ISO. The expectation is that it's there if end-users want to use it, but it will not be installed by default. Rather than make a new RPM, the helm chart has been added to the existing stx-platform-helm package. Unlike the other charts in that package, for now it will be included in the load (to make it available right away). Once the helm charts from that application are properly installed on system installation then we can consider removing the node feature discovery helm chart from the filesystem as it will be available from the local helm repo. There are two primary files describing Kubernetes resources. They both originally came from version 0.3.0 of the upstream project but one of them needed to be renamed to work with "helm package" which restricts the allowable filename suffixes. The two upstream files have been modified to support helm overrides. This also required adding a template for the namespace, if a custom one is specified. [1] https://github.com/kubernetes-sigs/node-feature-discovery/ Change-Id: I6e7c8a629994ad4da3834cbefccb94cd01259cc5 Story: 2005193 Task: 29954 Signed-off-by: Chris Friesen <chris.friesen@windriver.com>
This commit is contained in:
parent
301e310b67
commit
25fdf868b4
@ -0,0 +1,15 @@
|
||||
#
|
||||
# Copyright (c) 2019 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
apiVersion: v1
|
||||
description: Node Feature Discovery
|
||||
home: https://github.com/kubernetes-sigs/node-feature-discovery
|
||||
maintainers:
|
||||
- name: node-feature-discovery Authors
|
||||
name: node-feature-discovery
|
||||
sources:
|
||||
- https://github.com/kubernetes-sigs/node-feature-discovery
|
||||
version: 0.3.0
|
@ -0,0 +1,17 @@
|
||||
kubernetes-sigs/node-feature-discovery
|
||||
======================================
|
||||
|
||||
This chart runs v0.3.0 of the node-feature-discovery as implemented
|
||||
at https://github.com/kubernetes-sigs/node-feature-discovery
|
||||
|
||||
This software enables node feature discovery for Kubernetes. It detects
|
||||
hardware features available on each node in a Kubernetes cluster, and
|
||||
advertises those features using node labels.
|
||||
|
||||
This chart uses a DaemonSet to spawn a pod on each node in the cluster
|
||||
to do the actual work.
|
||||
|
||||
The two files under the templates directory are taken directly from
|
||||
v0.3.0 at the link above. The Docker image specified is the one
|
||||
published by the upstream team.
|
||||
|
@ -0,0 +1,14 @@
|
||||
{{/*
|
||||
#
|
||||
# Copyright (c) 2019 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
*/}}
|
||||
|
||||
{{ if ne .Values.namespace "default" }}
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: {{ .Values.namespace }}
|
||||
{{ end }}
|
@ -0,0 +1,73 @@
|
||||
{{/*
|
||||
#
|
||||
# Copyright (c) 2019 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
*/}}
|
||||
|
||||
{
|
||||
"apiVersion": "apps/v1",
|
||||
"kind": "DaemonSet",
|
||||
"metadata": {
|
||||
"labels": {
|
||||
"app": {{ .Values.app_label }}
|
||||
},
|
||||
"namespace": {{ .Values.namespace }},
|
||||
"name": {{ .Release.Name }}
|
||||
},
|
||||
"spec": {
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"app": {{ .Values.app_label }}
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"labels": {
|
||||
"app": {{ .Values.app_label }}
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
{{ if and .Values.node_selector_key .Values.node_selector_value }}
|
||||
"nodeSelector": {
|
||||
{{ .Values.node_selector_key }}: {{ .Values.node_selector_value }}
|
||||
},
|
||||
{{ end }}
|
||||
"hostNetwork": true,
|
||||
"serviceAccount": {{ .Release.Name }},
|
||||
"containers": [
|
||||
{
|
||||
"env": [
|
||||
{
|
||||
"name": "NODE_NAME",
|
||||
"valueFrom": {
|
||||
"fieldRef": {
|
||||
"fieldPath": "spec.nodeName"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"image": "quay.io/kubernetes_incubator/node-feature-discovery:v0.3.0",
|
||||
"name": {{ .Release.Name }},
|
||||
"args": ["--sleep-interval={{ .Values.scan_interval }}s"],
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "host-sys",
|
||||
"mountPath": "/host-sys"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"volumes": [
|
||||
{
|
||||
"name": "host-sys",
|
||||
"hostPath": {
|
||||
"path": "/sys"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
{{/*
|
||||
#
|
||||
# Copyright (c) 2019 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
*/}}
|
||||
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
namespace: {{ .Values.namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ .Release.Name }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Release.Name }}
|
||||
namespace: {{ .Values.namespace }}
|
@ -0,0 +1,27 @@
|
||||
#
|
||||
# Copyright (c) 2019 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
# Default values for node-feature-discovery.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare name/value pairs to be passed into your templates.
|
||||
# name: value
|
||||
|
||||
# namespace to use for chart resources. Must be specified.
|
||||
namespace: default
|
||||
|
||||
# label for the daemonset to find its pods
|
||||
app_label: node-feature-discovery
|
||||
|
||||
# docker image to use for the pods
|
||||
image: quay.io/kubernetes_incubator/node-feature-discovery:v0.3.0
|
||||
|
||||
# interval (in secs) to scan the node features
|
||||
scan_interval: 60
|
||||
|
||||
# key/value pair to match against node labels to select which nodes
|
||||
# should run the node feature discovery. Defaults to all nodes.
|
||||
node_selector_key:
|
||||
node_selector_value:
|
Loading…
x
Reference in New Issue
Block a user