k8s hlaeja device data
This commit is contained in:
@@ -40,6 +40,11 @@
|
|||||||
* [Config Map](#config-map-4)
|
* [Config Map](#config-map-4)
|
||||||
* [Deployment](#deployment-2)
|
* [Deployment](#deployment-2)
|
||||||
* [Service](#service-5)
|
* [Service](#service-5)
|
||||||
|
* [Device Data](#device-data)
|
||||||
|
* [Secret](#secret-5)
|
||||||
|
* [Config Map](#config-map-5)
|
||||||
|
* [Deployment](#deployment-3)
|
||||||
|
* [Service](#service-6)
|
||||||
<!-- TOC -->
|
<!-- TOC -->
|
||||||
|
|
||||||
----
|
----
|
||||||
@@ -410,3 +415,42 @@ this service should not be accessible from world only open in testing
|
|||||||
```bash
|
```bash
|
||||||
kubectl apply -f .\kube\03-hlaeja\03-device-configuration\04-service.yaml
|
kubectl apply -f .\kube\03-hlaeja\03-device-configuration\04-service.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Device Data
|
||||||
|
|
||||||
|
#### Secret
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl apply -f .\kube\03-hlaeja\04-device-data\01-secret.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
Set values:
|
||||||
|
|
||||||
|
- influxdb token
|
||||||
|
|
||||||
|
#### Config Map
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl apply -f .\kube\03-hlaeja\04-device-data\02-configmap.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
Set values:
|
||||||
|
|
||||||
|
- spring profile
|
||||||
|
- influxdb url
|
||||||
|
|
||||||
|
#### Deployment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl apply -f .\kube\03-hlaeja\04-device-data\03-deployment.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Service
|
||||||
|
|
||||||
|
this service should not be accessible from world only open in testing
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl apply -f .\kube\03-hlaeja\04-device-data\04-service.yaml
|
||||||
|
```
|
||||||
|
|||||||
12
kube/03-hlaeja/04-device-data/01-secret.yaml
Normal file
12
kube/03-hlaeja/04-device-data/01-secret.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: device-data
|
||||||
|
namespace: hlaeja
|
||||||
|
labels:
|
||||||
|
app: device-data
|
||||||
|
environment: testing
|
||||||
|
tier: backend
|
||||||
|
type: Opaque
|
||||||
|
stringData:
|
||||||
|
INFLUXDB_TOKEN: "influxdbToken=="
|
||||||
12
kube/03-hlaeja/04-device-data/02-configmap.yaml
Normal file
12
kube/03-hlaeja/04-device-data/02-configmap.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: device-data
|
||||||
|
namespace: hlaeja
|
||||||
|
labels:
|
||||||
|
app: device-data
|
||||||
|
environment: testing
|
||||||
|
tier: backend
|
||||||
|
data:
|
||||||
|
SPRING_PROFILES_ACTIVE: "testing"
|
||||||
|
INFLUXDB_URL: "http://influxdb"
|
||||||
32
kube/03-hlaeja/04-device-data/03-deployment.yaml
Normal file
32
kube/03-hlaeja/04-device-data/03-deployment.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: device-data
|
||||||
|
namespace: hlaeja
|
||||||
|
labels:
|
||||||
|
app: device-data
|
||||||
|
environment: testing
|
||||||
|
tier: backend
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: device-data
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: device-data
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: github
|
||||||
|
containers:
|
||||||
|
- name: device-data-app
|
||||||
|
image: ghcr.io/swordsteel/hlaeja-device-data:0.1.1
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: device-data
|
||||||
|
- secretRef:
|
||||||
|
name: device-data
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
20
kube/03-hlaeja/04-device-data/04-service.yaml
Normal file
20
kube/03-hlaeja/04-device-data/04-service.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: device-data
|
||||||
|
namespace: hlaeja
|
||||||
|
annotations:
|
||||||
|
metallb.universe.tf/address-pool: default
|
||||||
|
labels:
|
||||||
|
app: device-data
|
||||||
|
environment: testing
|
||||||
|
tier: backend
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
loadBalancerIP: 10.0.3.114
|
||||||
|
selector:
|
||||||
|
app: device-data
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 8080
|
||||||
Reference in New Issue
Block a user