mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-02-03 07:49:03 +00:00
[modem-stats] migrate to common (#823)
* [modem-stats] migrate to common Signed-off-by: Nicholas Wilde <ncwilde43@gmail.com> * Added influxdb dependency Signed-off-by: Nicholas Wilde <ncwilde43@gmail.com> * Removed influxdb dependency Signed-off-by: Nicholas Wilde <ncwilde43@gmail.com> Co-authored-by: ᗪєνιη ᗷυнʟ <onedr0p@users.noreply.github.com>
This commit is contained in:
parent
2a88f60800
commit
c2a547db04
@ -1,16 +1,20 @@
|
||||
apiVersion: v2
|
||||
name: modem-stats
|
||||
version: 3.0.3
|
||||
version: 4.0.0
|
||||
appVersion: 1.0.0
|
||||
description: periodic cable modem data collection and save the results to InfluxDB
|
||||
keywords:
|
||||
- sb6183
|
||||
- influxdb
|
||||
- sb6183
|
||||
- influxdb
|
||||
home: https://github.com/k8s-at-home/charts/tree/master/charts/stable/modem-stats
|
||||
icon: https://i.imgur.com/NprLyFf.png
|
||||
sources:
|
||||
- https://github.com/k8s-at-home/SB6183-stats-for-influxdb
|
||||
- https://github.com/k8s-at-home/charts
|
||||
- https://github.com/k8s-at-home/SB6183-stats-for-influxdb
|
||||
- https://github.com/k8s-at-home/charts
|
||||
maintainers:
|
||||
- name: billimek
|
||||
email: jeff@billimek.com
|
||||
- name: billimek
|
||||
email: jeff@billimek.com
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://library-charts.k8s-at-home.com
|
||||
version: 2.3.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
# modem-stats
|
||||
|
||||
![Version: 3.0.3](https://img.shields.io/badge/Version-3.0.3-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
|
||||
![Version: 4.0.0](https://img.shields.io/badge/Version-4.0.0-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
|
||||
|
||||
periodic cable modem data collection and save the results to InfluxDB
|
||||
|
||||
@ -17,6 +17,7 @@ periodic cable modem data collection and save the results to InfluxDB
|
||||
|
||||
| Repository | Name | Version |
|
||||
|------------|------|---------|
|
||||
| https://library-charts.k8s-at-home.com | common | 2.3.1 |
|
||||
|
||||
## TL;DR
|
||||
|
||||
@ -75,20 +76,16 @@ The configuration is set as a block of text through a configmap and mouted as a
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| config.delay | int | `3600` | how many seconds to wait between checks |
|
||||
| config.influxdb.database | string | `"cable_modem_stats"` | InfluxDB database |
|
||||
| config.influxdb.host | string | `"influxdb-influxdb"` | InfluxDB hostname |
|
||||
| config.influxdb.port | int | `8086` | InfluxDB port |
|
||||
| config.influxdb.ssl | bool | `false` | InfluxDB connection using SSL |
|
||||
| config.modem.url | string | `"http://192.168.100.1/RgConnect.asp"` | sb6183 stats URL page |
|
||||
| debug | bool | `false` | Display debugging output |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | modem-stats image pull policy |
|
||||
| image.repository | string | `"billimek/sb6183-for-influxdb"` | modem-stats image |
|
||||
| image.tag | string | `"latest"` | modem-stats image tag |
|
||||
| nodeSelector | object | `{}` | |
|
||||
| podAnnotations | object | `{}` | Key-value pairs to add as pod annotations |
|
||||
| replicaCount | int | `1` | |
|
||||
| resources | object | `{}` | |
|
||||
| config | string | string | modem-stats' config.ini configuration |
|
||||
| env | object | `{}` | |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | |
|
||||
| image.repository | string | `"billimek/sb6183-for-influxdb"` | |
|
||||
| image.tag | string | `"latest"` | |
|
||||
| probes.liveness.enabled | bool | `false` | |
|
||||
| probes.readiness.enabled | bool | `false` | |
|
||||
| probes.startup.enabled | bool | `false` | |
|
||||
| service.enabled | bool | `false` | |
|
||||
| strategy.type | string | `"Recreate"` | |
|
||||
|
||||
## Changelog
|
||||
|
||||
@ -96,6 +93,20 @@ All notable changes to this application Helm chart will be documented in this fi
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
### [4.0.0]
|
||||
|
||||
#### Added
|
||||
|
||||
- N/A
|
||||
|
||||
#### Changed
|
||||
|
||||
- **BREAKING** Migrate to the common library, a lot of configuration has changed.
|
||||
|
||||
#### Removed
|
||||
|
||||
- N/A
|
||||
|
||||
### [3.0.1]
|
||||
|
||||
#### Added
|
||||
@ -110,6 +121,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
|
||||
- N/A
|
||||
|
||||
[4.0.0]: #4.0.0
|
||||
[3.0.1]: #3.0.1
|
||||
|
||||
## Support
|
||||
@ -120,4 +132,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
- Join our [Discord](https://discord.gg/sTMX7Vh) community
|
||||
|
||||
----------------------------------------------
|
||||
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)
|
||||
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)
|
@ -9,6 +9,20 @@ All notable changes to this application Helm chart will be documented in this fi
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
### [4.0.0]
|
||||
|
||||
#### Added
|
||||
|
||||
- N/A
|
||||
|
||||
#### Changed
|
||||
|
||||
- **BREAKING** Migrate to the common library, a lot of configuration has changed.
|
||||
|
||||
#### Removed
|
||||
|
||||
- N/A
|
||||
|
||||
### [3.0.1]
|
||||
|
||||
#### Added
|
||||
@ -23,5 +37,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
|
||||
- N/A
|
||||
|
||||
[4.0.0]: #4.0.0
|
||||
[3.0.1]: #3.0.1
|
||||
{{- end -}}
|
||||
|
@ -1,7 +1 @@
|
||||
You can connect to the container running modem-stats. To open a shell session in the pod run the following:
|
||||
|
||||
- kubectl exec -i -t --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "modem-stats.fullname" . }} -o jsonpath='{.items[0].metadata.name}') /bin/sh
|
||||
|
||||
To trail the logs for the modem-stats pod run the following:
|
||||
|
||||
- kubectl logs -f --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "modem-stats.fullname" . }} -o jsonpath='{ .items[0].metadata.name }')
|
||||
{{- include "common.notes.defaultNotes" . -}}
|
||||
|
@ -1,27 +0,0 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "modem-stats.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 "modem-stats.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 -}}
|
32
charts/stable/modem-stats/templates/common.yaml
Normal file
32
charts/stable/modem-stats/templates/common.yaml
Normal file
@ -0,0 +1,32 @@
|
||||
---
|
||||
{{/* Make sure all variables are set properly */}}
|
||||
{{- include "common.values.setup" . }}
|
||||
|
||||
{{/* Append the configMap to the additionalVolumes */}}
|
||||
{{- define "modem-stats.configmap.volume" -}}
|
||||
name: modem-stats-settings
|
||||
configMap:
|
||||
name: {{ template "common.names.fullname" . }}-config
|
||||
{{- end -}}
|
||||
|
||||
{{- $volume := include "modem-stats.configmap.volume" . | fromYaml -}}
|
||||
{{- if $volume -}}
|
||||
{{- $additionalVolumes := append .Values.additionalVolumes $volume }}
|
||||
{{- $_ := set .Values "additionalVolumes" (deepCopy $additionalVolumes) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Append the configMap volume to the additionalVolumeMounts */}}
|
||||
{{- define "modem-stats.configmap.volumeMount" -}}
|
||||
name: modem-stats-settings
|
||||
mountPath: /src/config.ini
|
||||
subPath: config.ini
|
||||
{{- end -}}
|
||||
|
||||
{{- $volumeMount := include "modem-stats.configmap.volumeMount" . | fromYaml -}}
|
||||
{{- if $volumeMount -}}
|
||||
{{- $additionalVolumeMounts := append .Values.additionalVolumeMounts $volumeMount }}
|
||||
{{- $_ := set .Values "additionalVolumeMounts" (deepCopy $additionalVolumeMounts) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "common.all" . }}
|
@ -1,31 +1,10 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "modem-stats.fullname" . }}
|
||||
name: {{ template "common.names.fullname" . }}-config
|
||||
labels:
|
||||
app: {{ template "modem-stats.name" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
{{- include "common.labels" . | nindent 4 }}
|
||||
data:
|
||||
config.ini: |
|
||||
[GENERAL]
|
||||
Delay = {{ .Values.config.delay }}
|
||||
{{- if .Values.debug }}
|
||||
Output = True
|
||||
{{- else }}
|
||||
Output = False
|
||||
{{- end }}
|
||||
[INFLUXDB]
|
||||
Address = {{ .Values.config.influxdb.host }}
|
||||
Port = {{ .Values.config.influxdb.port }}
|
||||
Database = {{ .Values.config.influxdb.database }}
|
||||
Username = {{ .Values.config.influxdb.username }}
|
||||
Password = {{ .Values.config.influxdb.password }}
|
||||
{{- if .Values.config.influxdb.ssl }}
|
||||
Verify_SSL = True
|
||||
{{- else }}
|
||||
Verify_SSL = False
|
||||
{{- end }}
|
||||
[MODEM]
|
||||
URL = {{ .Values.config.modem.url }}
|
||||
{{- .Values.config | nindent 4 }}
|
||||
|
@ -1,49 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "modem-stats.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "modem-stats.name" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "modem-stats.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
replicas: {{ default 1 .Values.replicas }}
|
||||
revisionHistoryLimit: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "modem-stats.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- if .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.podAnnotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 12 }}
|
||||
volumeMounts:
|
||||
- name: {{ template "modem-stats.name" . }}
|
||||
mountPath: /src/config.ini
|
||||
subPath: config.ini
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: {{ template "modem-stats.name" . }}
|
||||
configMap:
|
||||
name: {{ template "modem-stats.fullname" . }}
|
||||
items:
|
||||
- key: config.ini
|
||||
path: config.ini
|
@ -1,48 +1,44 @@
|
||||
# Default values for modem-stats.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
replicaCount: 1
|
||||
#
|
||||
# IMPORTANT NOTE
|
||||
#
|
||||
# This chart inherits from our common library chart. You can check the default values/options here:
|
||||
# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml
|
||||
#
|
||||
|
||||
image:
|
||||
# -- modem-stats image
|
||||
repository: billimek/sb6183-for-influxdb
|
||||
# -- modem-stats image tag
|
||||
tag: latest
|
||||
# -- modem-stats image pull policy
|
||||
pullPolicy: IfNotPresent
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
nodeSelector: {}
|
||||
# -- Display debugging output
|
||||
debug: false
|
||||
config:
|
||||
# -- how many seconds to wait between checks
|
||||
delay: 3600
|
||||
influxdb:
|
||||
# -- InfluxDB hostname
|
||||
host: influxdb-influxdb
|
||||
# -- InfluxDB port
|
||||
port: 8086
|
||||
# -- InfluxDB database
|
||||
database: cable_modem_stats
|
||||
# -- InfluxDB username
|
||||
# username:
|
||||
# -- InfluxDB password
|
||||
# password:
|
||||
|
||||
# -- InfluxDB connection using SSL
|
||||
ssl: false
|
||||
modem:
|
||||
# -- sb6183 stats URL page
|
||||
url: http://192.168.100.1/RgConnect.asp
|
||||
strategy:
|
||||
type: Recreate
|
||||
|
||||
# -- Key-value pairs to add as pod annotations
|
||||
podAnnotations: {}
|
||||
env: {}
|
||||
|
||||
# -- modem-stats' config.ini configuration
|
||||
# @default -- string
|
||||
config: |
|
||||
[GENERAL]
|
||||
Delay = 3600
|
||||
Output = False
|
||||
[INFLUXDB]
|
||||
Address = influxdb-influxdb
|
||||
Port = 8086
|
||||
Database = cable_modem_stats
|
||||
Username =
|
||||
Password =
|
||||
Verify_SSL = False
|
||||
[MODEM]
|
||||
URL = http://192.168.100.1/RgConnect.asp
|
||||
|
||||
service:
|
||||
enabled: false
|
||||
|
||||
## Probes configuration
|
||||
probes:
|
||||
liveness:
|
||||
enabled: false
|
||||
readiness:
|
||||
enabled: false
|
||||
startup:
|
||||
enabled: false
|
||||
|
Loading…
Reference in New Issue
Block a user