start deployment stuff
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: udi-archive
|
name: %PRE%-udi-archive
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
@ -13,11 +13,11 @@ spec:
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: udi
|
name: %PRE%-udi
|
||||||
labels:
|
labels:
|
||||||
app: udi
|
app: udi
|
||||||
annotations:
|
annotations:
|
||||||
secret.reloader.stakater.com/reload: "udi-conf,udi-db-cred,mqtt-password"
|
secret.reloader.stakater.com/reload: "%PRE%-udi-conf,%PRE%-udi-db-cred,%PRE%-mqtt-password"
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
@ -33,16 +33,16 @@ spec:
|
|||||||
image: %IMAGE%
|
image: %IMAGE%
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: udi-db-cred
|
name: %PRE%-udi-db-cred
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: mqtt-password
|
name: %PRE%-mqtt-password
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: udi-conf
|
name: %PRE%-udi-conf
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /archive
|
- mountPath: /archive
|
||||||
name: udi-archive
|
name: udi-archive
|
||||||
volumes:
|
volumes:
|
||||||
- name: udi-archive
|
- name: udi-archive
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: udi-archive
|
claimName: %PRE%-udi-archive
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ type ConfigT struct {
|
|||||||
Mqtt struct {
|
Mqtt struct {
|
||||||
Broker string `json:"broker"`
|
Broker string `json:"broker"`
|
||||||
Username string `json:"username"`
|
Username string `json:"username"`
|
||||||
PasswordEnvVar string `json:"passwordEnvVar"`
|
|
||||||
Password string
|
Password string
|
||||||
TlsEnable string `json:"tlsEnable"`
|
TlsEnable string `json:"tlsEnable"`
|
||||||
} `json:"mqtt"`
|
} `json:"mqtt"`
|
||||||
@ -36,8 +35,6 @@ func LoadConfiguration() {
|
|||||||
log.Fatalf("Unable to parse configuration: %s", err)
|
log.Fatalf("Unable to parse configuration: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if Config.Mqtt.PasswordEnvVar != "" {
|
Config.Mqtt.Password = os.Getenv("MQTT_PASSWORD")
|
||||||
Config.Mqtt.Password = os.Getenv(Config.Mqtt.PasswordEnvVar)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user