Merge "Add helm chart for node feature discovery"

Change-Id: I380ac1124582583287e42da649784fe15b477dd4
Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
Zuul 2019-04-30 13:52:50 +00:00 committed by Scott Little
commit cf3d3cd10d
6 changed files with 187 additions and 0 deletions

View File

@ -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

View File

@ -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.

View File

@ -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 }}

View File

@ -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"
}
}
]
}
}
}
}

View File

@ -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 }}

View File

@ -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: