Compare commits

...

8 Commits

Author SHA1 Message Date
Ingvarr Zhmakin
1c7d6d403e [smarter-device-manager] New chart (#532) 2021-02-11 10:22:30 +01:00
ᗪєνιη ᗷυнʟ
a32e94cfca [couchpotato] delete couchpotato (#567) 2021-02-09 16:57:47 -05:00
ᗪєνιη ᗷυнʟ
91729b6b53 [couchpotato] deprecate chart (#566) 2021-02-09 16:55:18 -05:00
Jeff Billimek
8b932311c1 fix typo in UNIFI_STDOUT placement (#562) 2021-02-09 22:02:04 +01:00
ᗪєνιη ᗷυнʟ
a6edab35b7 [meta] updates to repo (#554) 2021-02-08 13:45:14 +01:00
Jeff Billimek
8c5ade2b2b [unifi] enhance unifi to log to stdout (#547)
* enhance unifi to log to stdout

Signed-off-by: Jeff Billimek <jeff@billimek.com>

* bump version after rebase from master
2021-02-06 11:49:42 -05:00
David Luong
a9218cd798 Allow service port to define captive portal port in deployment like gui and controller service (#557) 2021-02-06 08:33:09 -05:00
David Luong
f43d3ab7e7 Fixed unifi chart breaking from range restriction value on captive ingress (#555) 2021-02-05 20:01:32 -05:00
20 changed files with 323 additions and 171 deletions

View File

@@ -21,6 +21,10 @@ assignees: ''
<!-- Note: This should be a clear and concise description of what the bug is. -->
**Relevant Helm values:**
<!-- Note: Please include a snippet of the relevant values in (or a Pastebin/similar link to) your values.yaml. -->
**What did you expect to happen:**
**Anything else you would like to add:**

9
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
blank_issues_enabled: true
contact_links:
- name: Ask a question
url: https://github.com/k8s-at-home/charts/discussions
about: Please ask and answer questions here.
contact_links:
- name: Discuss on Discord
url: https://discord.com/invite/sTMX7Vh
about: Join our Discord community

View File

@@ -1,14 +0,0 @@
---
name: Question
about: Ask a question to the maintainer
title: ''
labels: question
assignees: ''
---
# Details
**Ask your question:**
<!-- Note: A clear and concise query of what you want to ask. -->

19
.github/PAUL.yaml vendored Normal file
View File

@@ -0,0 +1,19 @@
maintainers:
- billimek
- bjw-s
- carpenike
- onedr0p
labels: true
empty_description_check:
enabled: true
enforced: false
branch_destroyer:
enabled: true
protected_branches:
- master
- gh-pages
pull_requests:
automated_merge: false
cats_enabled: true
dogs_enabled: true
allow_approval: true

View File

@@ -23,15 +23,15 @@ You can then run `helm search repo k8s-at-home` to see the charts.
See [Artifact Hub](https://artifacthub.io/packages/search?org=k8s-at-home) or [charts](./charts/) for a complete list.
## Common Library
## Common library
The majority of the charts in this repository are using a common library we built. The reason we went with this pattern is a lot of applications are pretty similar in their requirements for Helm charts. Using a library makes maintaining much easier and keeps charts consistent in features. If contributing a new chart first try to make it using the library we built.
More information can be found [here](https://github.com/k8s-at-home/charts/tree/master/charts/common).
More information can be found in our [wiki](https://github.com/k8s-at-home/charts/wiki) and in the common chart directory [here](https://github.com/k8s-at-home/charts/tree/master/charts/common).
## Support
- Having problems with a chart or have a feature request? Open a new [issue](https://github.com/k8s-at-home/charts/issues/new/choose).
- Having problems with a chart? Open a new [issue](https://github.com/k8s-at-home/charts/issues/new/choose) or discuss in our [Discord](https://discord.gg/sTMX7Vh) in the `#support` channel.
- New idea? Discuss [here](https://github.com/k8s-at-home/charts/discussions) or in our [Discord](https://discord.gg/sTMX7Vh) in the `#charts` channel.
## Contributing

View File

@@ -1,21 +0,0 @@
apiVersion: v2
appVersion: latest
description: CouchPotato (CP) is an automatic NZB and torrent downloader.
name: couchpotato
version: 4.4.0
keywords:
- couchpotato
- usenet
- bittorrent
home: https://github.com/k8s-at-home/charts/tree/master/charts/couchpotato
icon: https://github.com/CouchPotato/CouchPotatoServer/raw/master/couchpotato/static/images/icons/android.png
sources:
- https://hub.docker.com/r/linuxserver/couchpotato/
- https://github.com/CouchPotato/CouchPotatoServer/
maintainers:
- name: billimek
email: jeff@billimek.com
dependencies:
- name: common
repository: https://k8s-at-home.com/charts/
version: 2.4.0

View File

@@ -1,8 +0,0 @@
approvers:
- billimek
- onedr0p
- bjw-s
reviewers:
- billimek
- onedr0p
- bjw-s

View File

@@ -1,78 +0,0 @@
# Couchpotato
This is a helm chart for [couchpotato](https://github.com/CouchPotato/CouchPotatoServer).
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/k8s-at-home/charts/issues/new/choose)**
## TL;DR;
```shell
$ helm repo add k8s-at-home https://k8s-at-home.com/charts/
$ helm install k8s-at-home/couchpotato
```
## Installing the Chart
To install the chart with the release name `my-release`:
```console
helm install --name my-release k8s-at-home/couchpotato
```
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```console
helm delete my-release --purge
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration
Read through the charts [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/couchpotato/values.yaml)
file. It has several commented out suggested values.
Additionally you can take a look at the common library [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/common/values.yaml) for more (advanced) configuration options.
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console
helm install couchpotato \
--set env.TZ="America/New_York" \
k8s-at-home/couchpotato
```
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the
chart. For example,
```console
helm install couchpotato k8s-at-home/couchpotato --values values.yaml
```
```yaml
image:
tag: ...
```
---
**NOTE**
If you get
```console
Error: rendered manifests contain a resource that already exists. Unable to continue with install: existing resource conflict: ...`
```
it may be because you uninstalled the chart with `skipuninstall` enabled, you need to manually delete the pvc or use `existingClaim`.
---
## Upgrading an existing Release to a new major version
A major chart version change (like 4.0.1 -> 5.0.0) indicates that there is an incompatible breaking change potentially needing manual actions.
### Upgrading from 2.x.x to 3.x.x
Due to migrating to a centralized common library some values in `values.yaml` have changed.
Examples:
* `service.port` has been moved to `service.port.port`.
* `persistence.type` has been moved to `controllerType`.
Refer to the library values.yaml for more configuration options.

View File

@@ -1 +0,0 @@
{{- include "common.notes.defaultNotes" . -}}

View File

@@ -1 +0,0 @@
{{ include "common.all" . }}

View File

@@ -1,40 +0,0 @@
# Default values for Couchpotato.
image:
repository: linuxserver/couchpotato
pullPolicy: Always
tag: latest
strategy:
type: Recreate
service:
port:
port: 5050
env: {}
# TZ: UTC
# PUID: 1001
# PGID: 1001
persistence:
config:
enabled: false
emptyDir: false
media:
enabled: false
emptyDir: false
mountPath: /media
## Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
# storageClass: "-"
# accessMode: ReadWriteOnce
# size: 1Gi
## Do not delete the pvc upon helm uninstall
# skipuninstall: false
# existingClaim: ""

View File

@@ -19,6 +19,6 @@
.project
.idea/
*.tmproj
.vscode
.vscode/
# OWNERS file for Kubernetes
OWNERS

View File

@@ -0,0 +1,22 @@
apiVersion: v2
name: smarter-device-manager
version: 1.0.0
appVersion: 1.1.2
description: Manage hardware resource allocation without a need for privileged containers
keywords:
- kubernetes
- cluster
- hardware
home: https://gitlab.com/arm-research/smarter/smarter-device-manager/
sources:
- https://gitlab.com/arm-research/smarter/smarter-device-manager/
- https://github.com/k8s-at-home/charts
dependencies:
- name: common
repository: https://k8s-at-home.com/charts/
version: 2.4.0
maintainers:
- name: bjw-s
email: me@bjw-s.dev
- name: lazyoldbear
email: 19270832+lazyoldbear@users.noreply.github.com

View File

@@ -0,0 +1,111 @@
# smarter device manager
This is a helm chart for [smarter-device-manager](https://gitlab.com/arm-research/smarter/smarter-device-manager/)
([see also](https://community.arm.com/developer/research/b/articles/posts/a-smarter-device-manager-for-kubernetes-on-the-edge)).
This tool discovers host hardware resources and manages their provisioning for the pods, decoupling host paths from them, and ensuring that pods don't compete for the same piece of hardware.
Typical use cases are Zigbee/Zwave USB dongles for other charts available in this repository (Zigbee2MQTT, ZwaveJS2MQTT).
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/k8s-at-home/charts/issues/new/choose)**
## TL;DR;
```shell
$ helm repo add k8s-at-home https://k8s-at-home.com/charts/
$ helm install k8s-at-home/smarter-device-manager
```
## Installing the Chart
To install the chart with the release name `my-release`:
```console
helm install --name my-release k8s-at-home/smarter-device-manager
```
Please consider overriding the default configuration through `values.yaml` file.
For example:
```yaml
config:
- devicematch: ^snd$
nummaxdevices: 20
- devicematch: ^rtc0$
nummaxdevices: 20
- devicematch: ^video[0-9]*$
nummaxdevices: 20
- devicematch: ^ttyACM[0-9]*$
nummaxdevices: 1
```
The above configuration allows up to twenty pods to make use of `/dev/snd`, `/dev/rtc0` and each of `/dev/video[0-9]*` devices.
Only one pod at a time can use any of the discovered host `/dev/ttyACM[0-9]*` devices. This means that if a pod has reserved a dongle at `/dev/ttyACM0`, another pod requesting the same device will stay pending.
Once the devices are discovered, they will be added as allocatable resources to the nodes:
```
$ kubectl describe nodes
...
Capacity:
cpu: 4
memory: 16104560Ki
pods: 110
smarter-devices/gpiochip0: 0
smarter-devices/i2c-0: 0
smarter-devices/snd: 20
smarter-devices/ttyUSB-Z-Stick-Gen5: 1
```
## Usage
### Important limitation
Please note that only the root of the host `/dev` directory is considered for discovery. _Therefore, `by-id` paths will not work and some `udev` rules may be necessary._
### Resource allocation
The hardware is requested by pods through `resources`, e.g.:
```yaml
resources:
limits:
smarter-devices/ttyUSB-Conbee-2: 1
requests:
smarter-devices/ttyUSB-Conbee-2: 1
```
In this case host device `/dev/ttyUSB-Conbee-2` will be given at the same path, and the pod will only be created when this device is available.
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```console
helm delete my-release --purge
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
Read through the charts [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/smarter-device-manager/values.yaml)
file. It has several commented out suggested values.
Additionally you can take a look at the common library [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/common/values.yaml) for more (advanced) configuration options.
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console
helm install my-release \
--set image.pullPolicy="Always" \
k8s-at-home/smarter-device-manager
```
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the
chart. For example,
```console
helm install my-release k8s-at-home/smarter-device-manager --values values.yaml
```
```yaml
image:
tag: ...
```
---
## Upgrading an existing Release to a new major version
A major chart version change (like 4.0.1 -> 5.0.0) indicates that there is an incompatible breaking change potentially needing manual actions.

View File

@@ -0,0 +1,77 @@
{{/* Make sure all variables are set properly */}}
{{- include "common.values.setup" . }}
{{/* Host paths */}}
{{- define "sdm.dev.volume" -}}
name: host-dev
hostPath:
path: {{ .Values.devPath | default "/dev" }}
{{- end -}}
{{- define "sdm.sys.volume" -}}
name: host-sys
hostPath:
path: {{ .Values.sysPath | default "/sys" }}
{{- end -}}
{{- define "sdm.device-plugins.volume" -}}
name: host-device-plugins
hostPath:
path: {{ .Values.devicePluginPath | default "/var/lib/kubelet/device-plugins" }}
{{- end -}}
{{- define "sdm.dev.volumeMount" -}}
name: host-dev
mountPath: /dev
{{- end -}}
{{- define "sdm.sys.volumeMount" -}}
name: host-sys
mountPath: /sys
{{- end -}}
{{- define "sdm.device-plugins.volumeMount" -}}
name: host-device-plugins
mountPath: /var/lib/kubelet/device-plugins
{{- end -}}
{{/* Append host paths and the configMap to the additionalVolumes and additionalVolumeMounts */}}
{{- define "sdm.configmap.volume" -}}
name: configuration
configMap:
name: {{ template "common.names.fullname" . }}
{{- end -}}
{{- $additionalVolumes := .Values.additionalVolumes -}}
{{- $volume := include "sdm.dev.volume" . | fromYaml -}}
{{- $additionalVolumes := append $additionalVolumes $volume -}}
{{- $volume := include "sdm.sys.volume" . | fromYaml -}}
{{- $additionalVolumes := append $additionalVolumes $volume -}}
{{- $volume := include "sdm.device-plugins.volume" . | fromYaml -}}
{{- $additionalVolumes := append $additionalVolumes $volume -}}
{{- $volume := include "sdm.configmap.volume" . | fromYaml -}}
{{- $additionalVolumes := append $additionalVolumes $volume -}}
{{- $_ := set .Values "additionalVolumes" (deepCopy $additionalVolumes) -}}
{{- define "sdm.configmap.volumeMount" -}}
name: configuration
mountPath: /root/config/conf.yaml
subPath: conf.yaml
{{- end -}}
{{- $additionalVolumeMounts := .Values.additionalVolumeMounts -}}
{{- $volumeMount := include "sdm.dev.volumeMount" . | fromYaml -}}
{{- $additionalVolumeMounts := append $additionalVolumeMounts $volumeMount -}}
{{- $volumeMount := include "sdm.sys.volumeMount" . | fromYaml -}}
{{- $additionalVolumeMounts := append $additionalVolumeMounts $volumeMount -}}
{{- $volumeMount := include "sdm.device-plugins.volumeMount" . | fromYaml -}}
{{- $additionalVolumeMounts := append $additionalVolumeMounts $volumeMount -}}
{{- $volumeMount := include "sdm.configmap.volumeMount" . | fromYaml -}}
{{- $additionalVolumeMounts := append $additionalVolumeMounts $volumeMount -}}
{{- $_ := set .Values "additionalVolumeMounts" (deepCopy $additionalVolumeMounts) -}}
{{/* DaemonSet controller, disabling defaults */}}
{{- $_ := set .Values "controllerType" "daemonset" }}
{{- $_ := set .Values.probes.liveness "enabled" false }}
{{- $_ := set .Values.probes.readiness "enabled" false }}
{{- $_ := set .Values.probes.startup "enabled" false }}
{{- $_ := set .Values.service "enabled" false }}
{{/* Render the templates */}}
{{ include "common.all" . }}

View File

@@ -0,0 +1,38 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "common.names.fullname" . }}
labels:
{{- include "common.labels" . | nindent 4 }}
data:
conf.yaml: |
{{- if not .Values.config }}
- devicematch: ^snd$
nummaxdevices: 20
#- devicematch: ^gpiomem$
# nummaxdevices: 40
#- devicematch: ^gpiochip[0-9]*$
# nummaxdevices: 20
#- devicematch: ^hci[0-9]*$
# nummaxdevices: 1
#- devicematch: ^i2c-[0-9]*$
# nummaxdevices: 1
#- devicematch: ^rtc0$
# nummaxdevices: 20
#- devicematch: ^video[0-9]*$
# nummaxdevices: 20
#- devicematch: ^vchiq$
# nummaxdevices: 20
#- devicematch: ^vcsm.*$
# nummaxdevices: 20
- devicematch: ^ttyUSB.*$
nummaxdevices: 1
#- devicematch: ^ttyACM[0-9]*$
# nummaxdevices: 1
#- devicematch: ^ttyTHS[0-9]*$
# nummaxdevices: 1
#- devicematch: ^ttyS[0-9]*$
# nummaxdevices: 1
{{- else }}
{{- toYaml .Values.config | nindent 4 }}
{{- end }}

View File

@@ -0,0 +1,32 @@
image:
repository: registry.gitlab.com/arm-research/smarter/smarter-device-manager
tag: v1.1.2
pullPolicy: IfNotPresent
# Override default configuration
# config:
# - devicematch: ^snd$
# nummaxdevices: 20
# - devicematch: ^ttyUSB.*$
# nummaxdevices: 1
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
devicePluginPath: "/var/lib/kubelet/device-plugins"
# devPath: "/special-dev/"
# sysPath: "/special-sys/"
# Setting priority class is not necessary, but is recommended.
# Ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
priorityClassName: system-node-critical
securityContext:
capabilities:
drop:
- ALL
allowPrivilegeEscalation: false
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

View File

@@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 5.14.23
description: Ubiquiti Network's Unifi Controller
name: unifi
version: 1.4.0
version: 1.5.1
keywords:
- ubiquiti
- unifi

View File

@@ -2,6 +2,7 @@
{{- $fullName := include "unifi.fullname" . -}}
{{- $ingressPath := .Values.captivePortalService.ingress.path -}}
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}}
{{- $captivePortalHttps := .Values.captivePortalService.https -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@@ -34,7 +35,7 @@ spec:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}-captiveportalservice
{{- if .Values.captivePortalService.https }}
{{- if $captivePortalHttps }}
servicePort: captive-https
{{- else }}
servicePort: captive-http

View File

@@ -70,10 +70,10 @@ spec:
protocol: UDP
{{- if .Values.captivePortalService.enabled }}
- name: captive-http
containerPort: 8880
containerPort: {{ .Values.captivePortalService.http }}
protocol: TCP
- name: captive-https
containerPort: 8843
containerPort: {{ .Values.captivePortalService.https }}
protocol: TCP
{{- end }}
- name: speedtest
@@ -122,6 +122,8 @@ spec:
value: "{{ .Values.UID }}"
- name: UNIFI_GID
value: "{{ .Values.GID }}"
- name: UNIFI_STDOUT
value: "true"
{{- if .Values.extraJvmOpts }}
- name: JVM_EXTRA_OPTS
value: "{{- join " " .Values.extraJvmOpts }}"