Skip to content

Commit

Permalink
HELM: initial set of charts
Browse files Browse the repository at this point in the history
  • Loading branch information
ArangoGutierrez committed Jan 30, 2023
1 parent 7d7235a commit 7d04399
Show file tree
Hide file tree
Showing 10 changed files with 1,260 additions and 0 deletions.
23 changes: 23 additions & 0 deletions deploy/helm/node-feature-discovery-operator/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
16 changes: 16 additions & 0 deletions deploy/helm/node-feature-discovery-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v2
name: node-feature-discovery-operator
description: |
The Node Feature Discovery Operator is a Kubernetes operator that deploys and
manages the Node Feature Discovery (NFD) lifecycle.
type: application
version: 0.1.0
appVersion: "0.5.0"
sources:
- https://github.com/kubernetes-sigs/node-feature-discovery-operator
home: https://github.com/kubernetes-sigs/node-feature-discovery-operator
keywords:
- feature-discovery
- feature-detection
- node-labels
662 changes: 662 additions & 0 deletions deploy/helm/node-feature-discovery-operator/crds/nfd-api-crds.yaml

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions deploy/helm/node-feature-discovery-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "node-feature-discovery-operator.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "node-feature-discovery-operator.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "node-feature-discovery-operator.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "node-feature-discovery-operator.labels" -}}
helm.sh/chart: {{ include "node-feature-discovery-operator.chart" . }}
{{ include "node-feature-discovery-operator.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "node-feature-discovery-operator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "node-feature-discovery-operator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "node-feature-discovery-operator.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "node-feature-discovery-operator.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
data:
controller_manager_config.yaml: |+
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
kind: ControllerManagerConfig
health:
healthProbeBindAddress: :8081
metrics:
bindAddress: 127.0.0.1:8080
webhook:
port: 9443
leaderElection:
leaderElect: true
resourceName: 39f5e5c3.nodefeaturediscoveries.nfd.kubernetes.io
kind: ConfigMap
metadata:
name: nfd-manager-config
namespace: {{ .Values.namespace }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
control-plane: controller-manager
name: {{ include "node-feature-discovery-operator.fullname" . }}-controller-manager
namespace: {{ .Values.namespace }}
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
template:
metadata:
labels:
control-plane: controller-manager
spec:
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
- args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
command:
- /node-feature-discovery-operator
env:
- name: WATCH_NAMESPACE
value: {{ .Values.namespace }}
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: node-feature-discovery-operator
- name: NODE_FEATURE_DISCOVERY_IMAGE
value: "{{ .Values.operand.image.repository }}:{{ .Values.operand.image.tag | default "master" }}"
image: "{{ .Values.image.repository }}:v{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
name: manager
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
terminationGracePeriodSeconds: 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Namespace
apiVersion: v1
metadata:
name: {{ .Values.namespace }}
labels:
control-plane: controller-manager
Loading

0 comments on commit 7d04399

Please sign in to comment.