K8s manifests for the Grott Growatt proxy
Kubernetest manifests for the Grott proxy for the Growatt solar panel inverters by johnmeijer
┌────────────────────────────────────────────┐
│ │
│ Solar Panels │
│ │
└────────────────────────────────────────────┘
┌────────────────────────┐
┌─────────────────────┐ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Growatt Inverter│ │ Growatt servers │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
└───────────┬─────────┘ └────────────────────────┘
│ ┌─────────────────────────┐ ▲
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ grott running on k8s│ │
│ │ │ │
│ │ │ │
│ │ │ │
└─────────────────────────────►│ ├─────────────────────────────────┘
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└─────────────────────────┘
Generate your own Grott.ini
grott.ini
contains various things you might want to keep secret. I've embedded my own in here but used mozilla sops
to keep it secret.
# decrypting
sops --decrypt deploy/kubernetes/base/grott-configmap.enc.yaml --output > deploy/kubernetes/base/grott-configmap.yaml
## encrypting
sops --encrypt deploy/kubernetes/base/grott-configmap.yaml > deploy/kubernetes/base/grott-configmap.enc.yaml
To generate your own configmap.yaml
from your own grott.ini
then simply run this command:
kubectl create configmap grott-ini --from-file=grott.ini --output="yaml" --dry-run=client >deploy/kubernetes/base/grott-configmap.yaml
Building and deploying
# testing in kind
kind create cluster
(ENVIRONMENT="production"
kubectl kustomize "deploy/kubernetes/${ENVIRONMENT}" | \
kubectl apply -f -)
kind delete cluster
# deploy application stack
(ENVIRONMENT="production"
kubectl kustomize "deploy/kubernetes/${ENVIRONMENT}" | \
kubectl apply -f -)