Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
86139754bd
|
|||
6127129b03
|
|||
6564722727
|
|||
a65b991307
|
|||
4ea8a3688b
|
29
.woodpecker.yml
Normal file
29
.woodpecker.yml
Normal file
@ -0,0 +1,29 @@
|
||||
steps:
|
||||
build:
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
repo: gitea.hottis.de/wn/pv-controller
|
||||
registry:
|
||||
from_secret: container_registry
|
||||
tags: latest,${CI_COMMIT_SHA},${CI_COMMIT_TAG}
|
||||
username:
|
||||
from_secret: container_registry_username
|
||||
password:
|
||||
from_secret: container_registry_password
|
||||
dockerfile: Dockerfile
|
||||
when:
|
||||
- event: [push, tag]
|
||||
|
||||
deploy:
|
||||
image: portainer/kubectl-shell:latest
|
||||
secrets:
|
||||
- source: kube_config
|
||||
target: KUBE_CONFIG_CONTENT
|
||||
commands:
|
||||
- export IMAGE_TAG=$CI_COMMIT_TAG
|
||||
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
|
||||
- export KUBECONFIG=/tmp/kubeconfig
|
||||
- cat ./deployment/install-yml.tmpl | sed -e 's,%IMAGETAG%,'$IMAGE_TAG','g | kubectl apply -f -
|
||||
when:
|
||||
- event: tag
|
||||
|
@ -22,7 +22,6 @@ RUN \
|
||||
|
||||
RUN \
|
||||
mkdir -p ${APP_DIR} && \
|
||||
mkdir -p ${CONF_DIR} && \
|
||||
useradd -d ${APP_DIR} -u 1000 user
|
||||
|
||||
COPY ./src/pv_controller/*.py ${APP_DIR}/
|
||||
|
14
config.ini
14
config.ini
@ -1,14 +0,0 @@
|
||||
[mqtt]
|
||||
broker = 172.16.2.16
|
||||
port = 1883
|
||||
# login =
|
||||
# password =
|
||||
# ca =
|
||||
# cert =
|
||||
# key =
|
||||
relaisSubscribeTopic = IoT/PV/Cmd
|
||||
meterPublishTopic = IoT/PV/Values
|
||||
meterPublishPeriod = 15
|
||||
|
||||
[modbus]
|
||||
gateway = 172.16.2.42
|
@ -1,13 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: pv-controller
|
||||
name: homea
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: pv-controller
|
||||
namespace: pv-controller
|
||||
namespace: homea
|
||||
data:
|
||||
MQTT__BROKER: "emqx01-anonymous-cluster-internal.broker.svc.cluster.local"
|
||||
MQTT__PORT: "1883"
|
||||
@ -20,7 +20,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pv-controller
|
||||
namespace: pv-controller
|
||||
namespace: homea
|
||||
labels:
|
||||
app: pv-controller
|
||||
spec:
|
||||
@ -35,7 +35,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: pv-controller
|
||||
image: wollud1969/pv-controller:1.0.6
|
||||
image: gitea.hottis.de/wn/pv-controller:%IMAGETAG%
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: pv-controller
|
Reference in New Issue
Block a user