migrate
All checks were successful
lint-test-helm / helm-lint (push) Successful in 12s
renovate / renovate (push) Successful in 1m13s
render-manifests / render-manifests-helm (push) Successful in 6m53s

This commit is contained in:
2025-12-01 20:14:09 -06:00
parent 3e90af0eb5
commit 6da426af29
73 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
dependencies:
- name: app-template
repository: https://bjw-s-labs.github.io/helm-charts/
version: 4.4.0
digest: sha256:8fd52e5094f007d59b3a7544c3367f2ad9826acbff17d0972dcd68585a0334e4
generated: "2025-12-01T19:56:00.069183-06:00"

View File

@@ -0,0 +1,20 @@
apiVersion: v2
name: shelly-plug
version: 1.0.0
description: Shelly Plug
keywords:
- shelly-plug
- metrics
home: https://wiki.alexlebens.dev/s/18b5575c-3a57-4515-89a0-b23d6df8dec4
sources:
- https://github.com/geerlingguy/shelly-plug-prometheus
- https://hub.docker.com/_/php
- https://github.com/bjw-s/helm-charts/blob/main/charts/other/app-template/values.yaml
maintainers:
- name: alexlebens
dependencies:
- name: app-template
alias: shelly-plug
repository: https://bjw-s-labs.github.io/helm-charts/
version: 4.4.0
appVersion: 1.0.0

View File

@@ -0,0 +1,28 @@
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: shelly-plug-config-secret
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: shelly-plug-config-secret
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
spec:
secretStoreRef:
kind: ClusterSecretStore
name: vault
data:
- secretKey: SHELLY_HTTP_USERNAME
remoteRef:
conversionStrategy: Default
decodingStrategy: None
key: /shelly-plug/auth/it05sp
metadataPolicy: None
property: SHELLY_HTTP_USERNAME
- secretKey: SHELLY_HTTP_PASSWORD
remoteRef:
conversionStrategy: Default
decodingStrategy: None
key: /shelly-plug/auth/it05sp
metadataPolicy: None
property: SHELLY_HTTP_PASSWORD

View File

@@ -0,0 +1,19 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: shelly-plug
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: shelly-plug
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: shelly-plug
app.kubernetes.io/instance: {{ .Release.Name }}
endpoints:
- port: metrics
interval: 30s
scrapeTimeout: 10s
path: /metrics

View File

@@ -0,0 +1,74 @@
shelly-plug:
controllers:
main:
type: deployment
replicas: 1
strategy: Recreate
revisionHistoryLimit: 3
initContainers:
init-fetch-repo:
securityContext:
runAsUser: 0
image:
repository: alpine/git
tag: latest
pullPolicy: IfNotPresent
command:
- /bin/sh
- -ec
- |
cd /var/www/html
if [ -d ".git" ]; then
echo "Git repository found. Pulling latest changes..."
git pull
else
echo "Not a git repository. Initializing ..."
git init
git remote add origin https://github.com/geerlingguy/shelly-plug-prometheus.git
git fetch origin
git checkout origin/master -ft
fi
resources:
requests:
cpu: 10m
memory: 128Mi
containers:
main:
image:
repository: php
tag: 8.4.15-apache-bookworm
pullPolicy: IfNotPresent
env:
- name: SHELLY_HOSTNAME
value: it05sp.alexlebens.net
- name: SHELLY_GENERATION
value: 2
envFrom:
- secretRef:
name: shelly-plug-config-secret
resources:
requests:
cpu: 10m
memory: 64Mi
service:
main:
controller: main
ports:
metrics:
port: 80
targetPort: 80
protocol: TCP
persistence:
script:
storageClass: ceph-block
accessMode: ReadWriteOnce
size: 1Gi
retain: true
advancedMounts:
main:
init-fetch-repo:
- path: /var/www/html
readOnly: false
main:
- path: /var/www/html
readOnly: false