This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 35b8b0b00 Improve k8s configuration (#1809)
35b8b0b00 is described below
commit 35b8b0b0078bf08c4b12fb40cc3582af72e166fc
Author: luoluoyuyu <[email protected]>
AuthorDate: Fri Aug 4 01:40:54 2023 +0800
Improve k8s configuration (#1809)
---
installer/k8s/README.md | 154 +++++++++++++++++++++
.../k8s/templates/core/backend-deployment.yaml | 4 +
installer/k8s/templates/core/ui-configmap.yaml | 2 +-
installer/k8s/templates/core/ui-deployment.yaml | 4 +
.../extensions-all-iiot-deployment.yaml | 10 +-
.../extensions-all-iiot-service.yaml | 10 +-
.../external/consul/consul-deployment.yaml | 2 +-
.../templates/external/consul/consul-pv-pvc.yaml | 2 +-
.../templates/external/consul/consul-service.yaml | 10 +-
.../external/couchdb/couchdb-deployment.yaml | 2 +-
.../templates/external/couchdb/couchdb-pv-pvc.yaml | 2 +-
.../external/couchdb/couchdb-service.yaml | 6 +-
.../external/influxdb/influxdb-service.yaml | 14 +-
.../templates/external/kafka/kafka-deployment.yaml | 36 ++---
.../k8s/templates/external/kafka/kafka-pvc.yaml | 16 +--
.../templates/external/kafka/kafka-service.yaml | 11 +-
.../templates/external/nats/nats-deployment.yaml | 4 +-
.../k8s/templates/external/nats/nats-service.yaml | 8 +-
.../external/zookeeper/zookeeper-deployment.yaml | 28 ++--
.../external/zookeeper/zookeeper-pvc.yaml | 16 +--
.../external/zookeeper/zookeeper-service.yaml | 10 +-
installer/k8s/values.yaml | 53 +++++--
22 files changed, 303 insertions(+), 101 deletions(-)
diff --git a/installer/k8s/README.md b/installer/k8s/README.md
index cfb01b3c8..56b4a8e2c 100644
--- a/installer/k8s/README.md
+++ b/installer/k8s/README.md
@@ -82,6 +82,160 @@ We retain the created persistent volume. You need to
manually delete it:
```bash
rm -rf ${HOME}/streampipes-k8s
```
+##Parameters
+
+###Common parameters
+| Parameter Name | Description
| Value |
+|--------------------------------------------------|---------------------------------------------------------|-----------------------------------------|
+| deployment | Deployment type (lite or
full) | lite |
+| preferredBroker | Preferred broker for
deployment | "nats" |
+| pullPolicy | Image pull policy
| "Always" |
+| restartPolicy | Restart policy for the
container | Always |
+| persistentVolumeReclaimPolicy | Reclaim policy for
persistent volumes | "Delete" |
+| persistentVolumeAccessModes | Access mode for
persistent volumes | "ReadWriteOnce"
|
+| initialDelaySeconds | Initial delay for
liveness and readiness probes | 60
|
+| periodSeconds | Interval between liveness
and readiness probes | 30 |
+| failureThreshold | Number of consecutive
failures for readiness probes | 30 |
+| hostPath | Host path for the
application | ""
|
+
+###Streampipes common parameters
+| Parameter Name | Description
| Value |
+|-------------------------------------------------|---------------------------------------------------------|------------------------------------------|
+| streampipes.version | StreamPipes version
| "0.93.0-SNAPSHOT" |
+| streampipes.registry | StreamPipes registry URL
| "apachestreampipes" |
+| streampipes.core.appName | StreamPipes backend
application name | "backend" |
+| streampipes.core.port | StreamPipes backend port
| 8030 |
+| streampipes.core.persistence.storageClassName | Storage class name for
backend PVs | "hostpath" |
+| streampipes.core.persistence.storageSize | Size of the backend PV
| "1Gi" |
+| streampipes.core.persistence.claimName | Name of the backend
PersistentVolumeClaim | "backend-pvc" |
+| streampipes.core.persistence.pvName | Name of the backend
PersistentVolume | "backend-pv" |
+| streampipes.core.service.name | Name of the backend
service | "backend" |
+| streampipes.core.service.port | Port for the backend
service | 8030 |
+| streampipes.ui.appName | StreamPipes UI application
name | "ui" |
+| streampipes.ui.resolverActive | Flag for enabling DNS
resolver for Nginx proxy | true |
+| streampipes.ui.port | StreamPipes UI port
| 8088 |
+| streampipes.ui.resolver | DNS resolver for Nginx
proxy | "kube-dns.kube-system.svc.cluster.local" |
+| streampipes.ui.service.name | Name of the UI service
| "ui" |
+| streampipes.ui.service.type | Type of the UI service
| "ClusterIP" |
+| streampipes.ui.service.nodePort | Node port for the UI
service | 8088 |
+| streampipes.ui.service.port | Port for the UI service
| 8088 |
+| streampipes.ingress.active | Flag for enabling Ingress
for StreamPipes | false |
+| streampipes.ingress.annotations | Annotations for Ingress
| {} |
+| streampipes.ingress.host | Hostname for Ingress
| "" |
+| streampipes.ingressroute.active | Flag for enabling
IngressRoute for StreamPipes | true
|
+| streampipes.ingressroute.annotations | Annotations for
IngressRoute | {}
|
+| streampipes.ingressroute.entryPoints | Entry points for
IngressRoute | ["web", "websecure"]
|
+| streampipes.ingressroute.host | Hostname for IngressRoute
| "" |
+| streampipes.ingressroute.certResolverActive | Flag for enabling
certificate resolver for IngressRoute | true
|
+| streampipes.ingressroute.certResolver | Certificate resolver for
IngressRoute | "" |
+
+
+###Extensions common parameters
+| Parameter Name | Description
| Value |
+|-------------------------------------------------|---------------------------------------------------------|------------------------------------------|
+| extensions.iiot.appName | IIoT extensions
application name | extensions-all-iiot
|
+| extensions.iiot.port | Port for the IIoT
extensions application | 8090
|
+| extensions.iiot.service.name | Name of the IIoT
extensions service | extensions-all-iiot1
|
+| extensions.iiot.service.port | Port for the IIoT
extensions service | 8090
|
+
+
+###External common parameters
+
+####Consul common parameters
+| Parameter Name | Description
| Value |
+|-------------------------------------------------|----------------------------------------------------------|-----------------|
+| external.consul.appName | Consul application name
| "consul" |
+| external.consul.version | Consul version
| 1.14.3 |
+| external.consul.port1 | Port 1 for Consul service
| 8500 |
+| external.consul.port2 | Port 2 for Consul service
| 8600 |
+| external.consul.persistence.storageClassName | Storage class name for
Consul PVs | "hostpath" |
+| external.consul.persistence.storageSize | Size of the Consul PV
| "1Gi" |
+| external.consul.persistence.claimName | Name of the Consul
PersistentVolumeClaim | "consul-pvc"
|
+| external.consul.persistence.pvName | Name of the Consul
PersistentVolume | "consul-pv"
|
+| external.consul.service.name | Name of the Consul service
| "consul" |
+| external.consul.service.port1 | Port 1 for the Consul
service | 8500 |
+| external.consul.service.port2 | Port 2 for the Consul
service | 8600 |
+
+####Couchdb common parameters
+| Parameter Name | Description
| Value |
+|-------------------------------------------------|----------------------------------------------------------|-----------------|
+| external.couchdb.appName | CouchDB application name
| "couchdb" |
+| external.couchdb.version | CouchDB version
| 3.3.1 |
+| external.couchdb.user | CouchDB admin username
| "admin" |
+| external.couchdb.password | CouchDB admin password
| "admin" |
+| external.couchdb.port | Port for the CouchDB
service | 5984 |
+| external.couchdb.service.name | Name of the CouchDB
service | "couchdb"
|
+| external.couchdb.service.port | Port for the CouchDB
service | 5984 |
+| external.couchdb.persistence.storageClassName | Storage class name for
CouchDB PVs | "hostpath" |
+| external.couchdb.persistence.storageSize | Size of the CouchDB PV
| "1Gi" |
+| external.couchdb.persistence.claimName | Name of the CouchDB
PersistentVolumeClaim | "couchdb-pvc"
|
+| external.couchdb.persistence.pvName | Name of the CouchDB
PersistentVolume | "couchdb-pv"
|
+
+####Influxdb common parameters
+| Parameter Name | Description
| Value |
+|-------------------------------------------------|----------------------------------------------------------|-----------------|
+| external.influxdb.appName | InfluxDB application name
| "influxdb" |
+| external.influxdb.version | InfluxDB version
| 2.6 |
+| external.influxdb.username | InfluxDB admin username
| "admin" |
+| external.influxdb.password | InfluxDB admin password
| "sp-admin" |
+| external.influxdb.adminToken | InfluxDB admin token
| "sp-admin" |
+| external.influxdb.initOrg | InfluxDB initial
organization | "sp"
|
+| external.influxdb.initBucket | InfluxDB initial bucket
| "sp" |
+| external.influxdb.initMode | InfluxDB initialization
mode | "setup" |
+| external.influxdb.port1 | Port 1 for the InfluxDB
service | 8083 |
+| external.influxdb.port2 | Port 2 for the InfluxDB
service | 8086 |
+| external.influxdb.port3 | Port 3 for the InfluxDB
service | 8090 |
+| external.influxdb.service.name | Name of the InfluxDB
service | "influxdb" |
+| external.influxdb.service.port1 | Port 1 for the InfluxDB
service | 8083 |
+| external.influxdb.service.port2 | Port 2 for the InfluxDB
service | 8086 |
+| external.influxdb.service.port3 | Port 3 for the InfluxDB
service | 8090 |
+| external.influxdb.persistence.storageClassName | Storage class name for
InfluxDB PVs | "hostpath" |
+| external.influxdb.persistence.storageSize | Size of the InfluxDB PV
| "1Gi" |
+| external.influxdb.persistence.storageSizeV1 | Size of the InfluxDB PV
for v1 databases | "1Gi" |
+| external.influxdb.persistence.claimName | Name of the InfluxDBv2
PersistentVolumeClaim | "influxdb2-pvc" |
+| external.influxdb.persistence.claimNameV1 | Name of the InfluxDBv1
PersistentVolumeClaim | "influxdb-pvc" |
+| external.influxdb.persistence.pvName | Name of the InfluxDBv2
PersistentVolume | "influxdb2-pv" |
+| external.influxdb.persistence.pvNameV1 | Name of the InfluxDBv1
PersistentVolume | "influxdb-pv" |
+
+
+####Nats common parameters
+| Parameter Name | Description
| Value |
+|-------------------------------------------------|----------------------------------------------------------|-----------------|
+| external.nats.appName | NATS application name
| "nats" |
+| external.nats.port | Port for the NATS service
| 4222 |
+| external.nats.version | NATS version
| |
+| external.nats.service.type | Type of the NATS service
| "NodePort" |
+| external.nats.service.externalTrafficPolicy | External traffic policy
for the NATS service | "Local" |
+| external.nats.service.name | Name of the NATS service
| "nats1" |
+| external.nats.service.port | Port for the NATS service
| 4222 |
+
+
+####Kafka common parameters
+| Parameter Name | Description
| Value |
+|-------------------------------------------------|----------------------------------------------------------|-----------------|
+| external.kafka.appName | Kafka application name
| "kafka" |
+| external.kafka.version | Kafka version
| 2.2.0 |
+| external.kafka.port | Port for the Kafka service
| 9092 |
+| external.kafka.service.name | Name of the Kafka service
| "kafka" |
+| external.kafka.service.port | Port for the Kafka service
| 9092 |
+| external.kafka.persistence.storageClassName | Storage class name for
Kafka PVs | "hostpath" |
+| external.kafka.persistence.storageSize | Size of the Kafka PV
| "1Gi" |
+| external.kafka.persistence.claimName | Name of the Kafka
PersistentVolumeClaim | "kafka-pvc"
|
+| external.kafka.persistence.pvName | Name of the Kafka
PersistentVolume | "kafka-pv"
|
+
+
+####Zookeeper common parameters
+| Parameter Name | Description
| Value |
+|-------------------------------------------------|----------------------------------------------------------|-----------------|
+| external.zookeeper.appName | ZooKeeper application name
| "zookeeper" |
+| external.zookeeper.version | ZooKeeper version
| 3.4.13 |
+| external.zookeeper.port | Port for the ZooKeeper
service | 2181 |
+| external.zookeeper.service.name | Name of the ZooKeeper
service | "zookeeper" |
+| external.zookeeper.service.port | Port for the ZooKeeper
service | 2181 |
+| external.zookeeper.persistence.storageClassName | Storage class name for
ZooKeeper PVs | "hostpath" |
+| external.zookeeper.persistence.storageSize | Size of the ZooKeeper PV
| "1Gi" |
+| external.zookeeper.persistence.claimName | Name of the ZooKeeper
PersistentVolumeClaim | "zookeeper-pvc" |
+| external.zookeeper.persistence.pvName | Name of the ZooKeeper
PersistentVolume | "zookeeper-pv" |
## Bugs and Feature Requests
diff --git a/installer/k8s/templates/core/backend-deployment.yaml
b/installer/k8s/templates/core/backend-deployment.yaml
index 9cfbc7214..06580bd17 100644
--- a/installer/k8s/templates/core/backend-deployment.yaml
+++ b/installer/k8s/templates/core/backend-deployment.yaml
@@ -36,6 +36,10 @@ spec:
persistentVolumeClaim:
claimName: {{ .Values.streampipes.core.persistence.claimName }}
restartPolicy: {{ .Values.restartPolicy }}
+ initContainers:
+ - name: init-wait-consul-couchdb
+ image: alpine
+ command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1 {{
.Values.external.consul.service.name }} {{
.Values.external.consul.service.port1 }} && nc -zvw1 {{
.Values.external.couchdb.service.name }} {{
.Values.external.couchdb.service.port }} && exit 0 || sleep 3; done; exit 1"]
containers:
- name: {{ .Values.streampipes.core.appName }}
image: {{ .Values.streampipes.registry }}/backend:{{
.Values.streampipes.version }}
diff --git a/installer/k8s/templates/core/ui-configmap.yaml
b/installer/k8s/templates/core/ui-configmap.yaml
index 8afc386e7..57475c2a1 100644
--- a/installer/k8s/templates/core/ui-configmap.yaml
+++ b/installer/k8s/templates/core/ui-configmap.yaml
@@ -37,7 +37,7 @@ data:
gzip_http_version 1.1;
location /streampipes-backend {
- set $upstream backend.{{ .Release.Namespace }}.svc.cluster.local:8030;
+ set $upstream backend.{{ .Release.Namespace }}.svc.cluster.local:{{
.Values.streampipes.core.service.port }};
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
diff --git a/installer/k8s/templates/core/ui-deployment.yaml
b/installer/k8s/templates/core/ui-deployment.yaml
index e6afa24c4..0a09a5bfa 100644
--- a/installer/k8s/templates/core/ui-deployment.yaml
+++ b/installer/k8s/templates/core/ui-deployment.yaml
@@ -32,6 +32,10 @@ spec:
configMap:
name: nginx-conf
restartPolicy: {{ .Values.restartPolicy }}
+ initContainers:
+ - name: init-wait-consul-couchdb-core
+ image: alpine
+ command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1
{{.Values.external.consul.service.name }}
{{.Values.external.consul.service.port1 }} && nc -zvw1
{{.Values.external.couchdb.service.name }}
{{.Values.external.couchdb.service.port }} && nc -zvw1
{{.Values.streampipes.core.service.name }}
{{.Values.streampipes.core.service.port }} && exit 0 || sleep 3; done; exit 1"]
containers:
- name: {{ .Values.streampipes.ui.appName }}
image: {{ .Values.streampipes.registry }}/ui:{{
.Values.streampipes.version }}
diff --git
a/installer/k8s/templates/extensions/pipeline-elements/extensions-all-iiot-deployment.yaml
b/installer/k8s/templates/extensions/pipeline-elements/extensions-all-iiot-deployment.yaml
index f4fb316c0..06dd4188c 100644
---
a/installer/k8s/templates/extensions/pipeline-elements/extensions-all-iiot-deployment.yaml
+++
b/installer/k8s/templates/extensions/pipeline-elements/extensions-all-iiot-deployment.yaml
@@ -16,18 +16,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
- name: extensions-all-iiot
+ name: {{ .Values.extensions.iiot.appName }}
spec:
selector:
matchLabels:
- app: extensions-all-iiot
+ app: {{ .Values.extensions.iiot.appName }}
replicas: 1
template:
metadata:
labels:
- app: extensions-all-iiot
+ app: {{ .Values.extensions.iiot.appName }}
spec:
restartPolicy: {{ .Values.restartPolicy }}
+ initContainers:
+ - name: init-wait-{{.Values.streampipes.core.service.name}}
+ image: alpine
+ command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1
{{.Values.streampipes.core.service.name}} {{
.Values.streampipes.core.service.port }} && exit 0 || sleep 3; done; exit 1"]
containers:
- name: extensions-all-iiot
image: {{ .Values.streampipes.registry }}/extensions-all-iiot:{{
.Values.streampipes.version }}
diff --git
a/installer/k8s/templates/extensions/pipeline-elements/extensions-all-iiot-service.yaml
b/installer/k8s/templates/extensions/pipeline-elements/extensions-all-iiot-service.yaml
index e87874625..c52f52b2e 100644
---
a/installer/k8s/templates/extensions/pipeline-elements/extensions-all-iiot-service.yaml
+++
b/installer/k8s/templates/extensions/pipeline-elements/extensions-all-iiot-service.yaml
@@ -16,14 +16,14 @@
apiVersion: v1
kind: Service
metadata:
- name: extensions-all-iiot
+ name: {{ .Values.extensions.iiot.service.name }}
labels:
- name: extensions-all-iiot
+ name: {{ .Values.extensions.iiot.appName }}
spec:
selector:
- app: extensions-all-iiot
+ app: {{ .Values.extensions.iiot.appName }}
ports:
- name: main
protocol: TCP
- port: 8090
- targetPort: 8090
+ port: {{ .Values.extensions.iiot.port }}
+ targetPort: {{ .Values.extensions.iiot.service.port }}
diff --git a/installer/k8s/templates/external/consul/consul-deployment.yaml
b/installer/k8s/templates/external/consul/consul-deployment.yaml
index 699dd7d34..065f1515e 100644
--- a/installer/k8s/templates/external/consul/consul-deployment.yaml
+++ b/installer/k8s/templates/external/consul/consul-deployment.yaml
@@ -82,4 +82,4 @@ spec:
port: {{ .Values.external.consul.port1 }}
initialDelaySeconds: {{ .Values.initialDelaySeconds }}
periodSeconds: {{ .Values.periodSeconds }}
- failureThreshold: {{ .Values.failureThreshold }}
+ failureThreshold: {{ .Values.failureThreshold }}
\ No newline at end of file
diff --git a/installer/k8s/templates/external/consul/consul-pv-pvc.yaml
b/installer/k8s/templates/external/consul/consul-pv-pvc.yaml
index c20f6b6b8..200350e46 100644
--- a/installer/k8s/templates/external/consul/consul-pv-pvc.yaml
+++ b/installer/k8s/templates/external/consul/consul-pv-pvc.yaml
@@ -25,4 +25,4 @@ spec:
- {{ .Values.persistentVolumeAccessModes }}
resources:
requests:
- storage: {{ .Values.external.consul.persistence.storageSize }}
+ storage: {{ .Values.external.consul.persistence.storageSize }}
\ No newline at end of file
diff --git a/installer/k8s/templates/external/consul/consul-service.yaml
b/installer/k8s/templates/external/consul/consul-service.yaml
index a14104a0c..48aec18b3 100644
--- a/installer/k8s/templates/external/consul/consul-service.yaml
+++ b/installer/k8s/templates/external/consul/consul-service.yaml
@@ -16,16 +16,16 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ .Values.external.consul.appName }}
+ name: {{ .Values.external.consul.service.name }}
spec:
selector:
app: {{ .Values.external.consul.appName }}
ports:
- name: main
protocol: TCP
- port: 8500
- targetPort: 8500
+ port: {{ .Values.external.consul.port1 }}
+ targetPort: {{ .Values.external.consul.service.port1 }}
- name: test
protocol: TCP
- port: 8600
- targetPort: 8600
+ port: {{ .Values.external.consul.port2 }}
+ targetPort: {{ .Values.external.consul.service.port2 }}
\ No newline at end of file
diff --git a/installer/k8s/templates/external/couchdb/couchdb-deployment.yaml
b/installer/k8s/templates/external/couchdb/couchdb-deployment.yaml
index 828539297..50c7cab5e 100644
--- a/installer/k8s/templates/external/couchdb/couchdb-deployment.yaml
+++ b/installer/k8s/templates/external/couchdb/couchdb-deployment.yaml
@@ -66,4 +66,4 @@ spec:
port: {{ .Values.external.couchdb.port }}
initialDelaySeconds: {{ .Values.initialDelaySeconds }}
periodSeconds: {{ .Values.periodSeconds }}
- failureThreshold: {{ .Values.failureThreshold }}
+ failureThreshold: {{ .Values.failureThreshold }}
\ No newline at end of file
diff --git a/installer/k8s/templates/external/couchdb/couchdb-pv-pvc.yaml
b/installer/k8s/templates/external/couchdb/couchdb-pv-pvc.yaml
index e48c46241..d88c403a8 100644
--- a/installer/k8s/templates/external/couchdb/couchdb-pv-pvc.yaml
+++ b/installer/k8s/templates/external/couchdb/couchdb-pv-pvc.yaml
@@ -25,4 +25,4 @@ spec:
- {{ .Values.persistentVolumeAccessModes }}
resources:
requests:
- storage: {{ .Values.external.couchdb.persistence.storageSize }}
+ storage: {{ .Values.external.couchdb.persistence.storageSize }}
\ No newline at end of file
diff --git a/installer/k8s/templates/external/couchdb/couchdb-service.yaml
b/installer/k8s/templates/external/couchdb/couchdb-service.yaml
index 3b126c521..6144f24cc 100644
--- a/installer/k8s/templates/external/couchdb/couchdb-service.yaml
+++ b/installer/k8s/templates/external/couchdb/couchdb-service.yaml
@@ -16,12 +16,12 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ .Values.external.couchdb.appName }}
+ name: {{ .Values.external.couchdb.service.name }}
spec:
selector:
app: {{ .Values.external.couchdb.appName }}
ports:
- name: main
protocol: TCP
- port: 5984
- targetPort: 5984
+ port: {{ .Values.external.couchdb.port }}
+ targetPort: {{ .Values.external.couchdb.service.port }}
\ No newline at end of file
diff --git a/installer/k8s/templates/external/influxdb/influxdb-service.yaml
b/installer/k8s/templates/external/influxdb/influxdb-service.yaml
index 986430f10..b9902c4f8 100644
--- a/installer/k8s/templates/external/influxdb/influxdb-service.yaml
+++ b/installer/k8s/templates/external/influxdb/influxdb-service.yaml
@@ -16,20 +16,20 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ .Values.external.influxdb.appName }}
+ name: {{ .Values.external.influxdb.service.name }}
spec:
selector:
app: {{ .Values.external.influxdb.appName }}
ports:
- name: main
protocol: TCP
- port: 8083
- targetPort: 8083
+ port: {{ .Values.external.influxdb.port1 }}
+ targetPort: {{ .Values.external.influxdb.service.port1 }}
- name: api
protocol: TCP
- port: 8086
- targetPort: 8086
+ port: {{ .Values.external.influxdb.service.port2 }}
+ targetPort: {{ .Values.external.influxdb.service.port2 }}
- name: internal
protocol: TCP
- port: 8090
- targetPort: 8090
+ port: {{ .Values.external.influxdb.service.port3 }}
+ targetPort: {{ .Values.external.influxdb.service.port3 }}
\ No newline at end of file
diff --git a/installer/k8s/templates/external/kafka/kafka-deployment.yaml
b/installer/k8s/templates/external/kafka/kafka-deployment.yaml
index 46793d56c..a8db6331b 100644
--- a/installer/k8s/templates/external/kafka/kafka-deployment.yaml
+++ b/installer/k8s/templates/external/kafka/kafka-deployment.yaml
@@ -17,46 +17,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
- name: kafka
+ name: {{ .Values.external.kafka.appName }}
spec:
selector:
matchLabels:
- app: kafka
+ app: {{ .Values.external.kafka.appName }}
replicas: 1
template:
metadata:
labels:
- app: kafka
+ app: {{ .Values.external.kafka.appName }}
spec:
restartPolicy: {{ .Values.restartPolicy }}
initContainers:
- name: init-wait-consul
image: alpine
- command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1 zookeeper
2181 && exit 0 || sleep 3; done; exit 1"]
+ command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1 {{
.Values.external.zookeeper.service.name }} {{
.Values.external.zookeeper.service.port }} && exit 0 || sleep 3; done; exit 1"]
volumes:
- - name: kafka-pv
+ - name: {{ .Values.external.kafka.persistence.pvName }}
persistentVolumeClaim:
- claimName: kafka-pvc
+ claimName: {{ .Values.external.kafka.persistence.claimName }}
containers:
- - name: kafka
- image: fogsyio/kafka:{{ .Values.external.kafkaVersion }}
+ - name: {{ .Values.external.kafka.appName }}
+ image: fogsyio/kafka:{{ .Values.external.kafka.version }}
imagePullPolicy: {{ .Values.pullPolicy }}
ports:
- - containerPort: {{ .Values.external.kafkaPort }}
+ - containerPort: {{ .Values.external.kafka.port }}
volumeMounts:
- mountPath: "/kafka"
- name: kafka-pv
+ name: {{ .Values.external.kafka.persistence.pvName }}
env:
# Known issue with kafka running in kubernetes:
# https://github.com/wurstmeister/kafka-docker/issues/122
- name: KAFKA_PORT
- value: "{{ .Values.external.kafkaProt }}"
+ value: "{{ .Values.external.kafka.port }}"
- name: KAFKA_ZOOKEEPER_CONNECT
- value: "zookeeper:{{ .Values.external.zookeeperPort }}"
+ value: "zookeeper:{{ .Values.external.zookeeper.port }}"
- name: KAFKA_LISTENERS
- value: "PLAINTEXT://:{{ .Values.external.kafkaPort }}"
+ value: "PLAINTEXT://:{{ .Values.external.kafka.port }}"
- name: KAFKA_ADVERTISED_LISTENERS
- value: "PLAINTEXT://kafka:{{ .Values.external.kafkaProt }}"
+ value: "PLAINTEXT://kafka:{{ .Values.external.kafka.port }}"
- name: KAFKA_INTER_BROKER_LISTENER_NAME
value: "PLAINTEXT"
- name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
@@ -69,20 +69,20 @@ spec:
value: "10000000"
livenessProbe:
tcpSocket:
- port: {{ .Values.external.kafkaPort }}
+ port: {{ .Values.external.kafka.port }}
initialDelaySeconds: {{ .Values.initialDelaySeconds }}
periodSeconds: {{ .Values.periodSeconds }}
failureThreshold: {{ .Values.failureThreshold }}
readinessProbe:
tcpSocket:
- port: {{ .Values.external.kafkaPort }}
+ port: {{ .Values.external.kafka.port }}
initialDelaySeconds: {{ .Values.initialDelaySeconds }}
periodSeconds: {{ .Values.periodSeconds }}
failureThreshold: {{ .Values.failureThreshold }}
startupProbe:
tcpSocket:
- port: {{ .Values.external.kafkaPort }}
+ port: {{ .Values.external.kafka.port }}
initialDelaySeconds: {{ .Values.initialDelaySeconds }}
periodSeconds: {{ .Values.periodSeconds }}
failureThreshold: {{ .Values.failureThreshold }}
-{{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/installer/k8s/templates/external/kafka/kafka-pvc.yaml
b/installer/k8s/templates/external/kafka/kafka-pvc.yaml
index d9b2f359a..c4844fae3 100644
--- a/installer/k8s/templates/external/kafka/kafka-pvc.yaml
+++ b/installer/k8s/templates/external/kafka/kafka-pvc.yaml
@@ -17,11 +17,11 @@
apiVersion: v1
kind: PersistentVolume
metadata:
- name: kafka-pv
+ name: {{ .Values.external.kafka.persistence.pvName }}
spec:
- storageClassName: local-storage-kafka
+ storageClassName: {{ .Values.external.kafka.persistence.storageClassName }}
capacity:
- storage: 50M
+ storage: {{ .Values.external.kafka.persistence.storageSize}}
accessModes:
- {{ .Values.persistentVolumeAccessModes }}
persistentVolumeReclaimPolicy: {{ .Values.persistentVolumeReclaimPolicy }}
@@ -32,13 +32,13 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
- app: kafka
- name: kafka-pvc
+ app: {{ .Values.external.kafka.appName }}
+ name: {{ .Values.external.kafka.persistence.claimName }}
spec:
- storageClassName: local-storage-kafka
+ storageClassName: {{ .Values.external.kafka.persistence.storageClassName }}
accessModes:
- {{ .Values.persistentVolumeAccessModes }}
resources:
requests:
- storage: 50M
-{{- end }}
+ storage: {{ .Values.external.kafka.persistence.storageSize }}
+{{- end }}
\ No newline at end of file
diff --git a/installer/k8s/templates/external/kafka/kafka-service.yaml
b/installer/k8s/templates/external/kafka/kafka-service.yaml
index aa63f3f43..acad6101c 100644
--- a/installer/k8s/templates/external/kafka/kafka-service.yaml
+++ b/installer/k8s/templates/external/kafka/kafka-service.yaml
@@ -17,14 +17,15 @@
apiVersion: v1
kind: Service
metadata:
- name: kafka
+ name: {{ .Values.external.kafka.service.name }}
labels:
- name: kafka
+ name: {{ .Values.external.kafka.appName }}
spec:
selector:
- app: kafka
+ app: {{ .Values.external.kafka.appName }}
ports:
- name: main
protocol: TCP
- port: 9092
-{{- end }}
+ port: {{ .Values.external.kafka.port }}
+ targetPort: {{ .Values.external.kafka.service.port }}
+{{- end }}
\ No newline at end of file
diff --git a/installer/k8s/templates/external/nats/nats-deployment.yaml
b/installer/k8s/templates/external/nats/nats-deployment.yaml
index e9c13df4a..bafe09562 100644
--- a/installer/k8s/templates/external/nats/nats-deployment.yaml
+++ b/installer/k8s/templates/external/nats/nats-deployment.yaml
@@ -32,13 +32,13 @@ spec:
initContainers:
- name: init-wait-consul
image: alpine
- command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1 consul
8500 && exit 0 || sleep 3; done; exit 1"]
+ command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1 {{
.Values.external.consul.appName }} {{ .Values.external.consul.port1 }} && exit
0 || sleep 3; done; exit 1"]
containers:
- name: {{ .Values.external.nats.appName }}
image: nats
imagePullPolicy: {{ .Values.pullPolicy }}
ports:
- - containerPort: {{ .Values.external.nats.port}}
+ - containerPort: {{ .Values.external.nats.port }}
livenessProbe:
tcpSocket:
port: {{ .Values.external.nats.port}}
diff --git a/installer/k8s/templates/external/nats/nats-service.yaml
b/installer/k8s/templates/external/nats/nats-service.yaml
index cfc9d3f8b..a44d58367 100644
--- a/installer/k8s/templates/external/nats/nats-service.yaml
+++ b/installer/k8s/templates/external/nats/nats-service.yaml
@@ -17,16 +17,16 @@
apiVersion: v1
kind: Service
metadata:
- name: nats
+ name: {{ .Values.external.nats.service.name }}
labels:
- name: nats
+ name: {{ .Values.external.nats.appName }}
spec:
selector:
- app: nats
+ app: {{ .Values.external.nats.appName }}
type: {{ .Values.external.nats.service.type }}
externalTrafficPolicy: {{
.Values.external.nats.service.externalTrafficPolicy }}
ports:
- name: main
protocol: TCP
- port: 4222
+ port: {{ .Values.external.nats.port }}
{{- end }}
diff --git
a/installer/k8s/templates/external/zookeeper/zookeeper-deployment.yaml
b/installer/k8s/templates/external/zookeeper/zookeeper-deployment.yaml
index 72c114366..07314cdeb 100644
--- a/installer/k8s/templates/external/zookeeper/zookeeper-deployment.yaml
+++ b/installer/k8s/templates/external/zookeeper/zookeeper-deployment.yaml
@@ -17,39 +17,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
- name: zookeeper
+ name: {{ .Values.external.zookeeper.appName }}
spec:
selector:
matchLabels:
- app: zookeeper
+ app: {{ .Values.external.zookeeper.appName }}
replicas: 1
template:
metadata:
labels:
- app: zookeeper
+ app: {{ .Values.external.zookeeper.appName }}
spec:
restartPolicy: {{ .Values.restartPolicy }}
volumes:
- - name: zookeeper-pv
+ - name: {{ .Values.external.zookeeper.persistence.pvName }}
persistentVolumeClaim:
- claimName: zookeeper-pvc
+ claimName: {{ .Values.external.zookeeper.persistence.claimName }}
containers:
#TODO: wurstmeister/zookeeper:latest is running ZK 3.4.13. Once this
# changes, the mount path needs to be adapted
- - name: zookeeper
- image: fogsyio/zookeeper:{{ .Values.external.zookeeperVersion }}
+ - name: {{ .Values.external.zookeeper.appName }}
+ image: fogsyio/zookeeper:{{ .Values.external.zookeeper.version }}
imagePullPolicy: {{ .Values.pullPolicy }}
ports:
- - containerPort: {{ .Values.external.zookeeperPort }}
+ - containerPort: {{ .Values.external.zookeeper.port }}
volumeMounts:
- - mountPath: "/opt/zookeeper-{{ .Values.external.zookeeperVersion
}}/data"
- name: zookeeper-pv
+ - mountPath: "/opt/zookeeper-{{ .Values.external.zookeeper.version
}}/data"
+ name: {{ .Values.external.zookeeper.persistence.pvName }}
livenessProbe:
exec:
command:
- sh
- -c
- - echo ruok | nc localhost {{ .Values.external.zookeeperPort }}
+ - echo ruok | nc localhost {{ .Values.external.zookeeper.port
}}
initialDelaySeconds: {{ .Values.initialDelaySeconds }}
periodSeconds: {{ .Values.periodSeconds }}
failureThreshold: {{ .Values.failureThreshold }}
@@ -58,7 +58,7 @@ spec:
command:
- sh
- -c
- - echo ruok | nc localhost {{ .Values.external.zookeeperPort }}
+ - echo ruok | nc localhost {{ .Values.external.zookeeper.port
}}
initialDelaySeconds: {{ .Values.initialDelaySeconds }}
periodSeconds: {{ .Values.periodSeconds }}
failureThreshold: {{ .Values.failureThreshold }}
@@ -67,8 +67,8 @@ spec:
command:
- sh
- -c
- - echo ruok | nc localhost {{ .Values.external.zookeeperPort }}
+ - echo ruok | nc localhost {{ .Values.external.zookeeper.port
}}
initialDelaySeconds: {{ .Values.initialDelaySeconds }}
periodSeconds: {{ .Values.periodSeconds }}
failureThreshold: {{ .Values.failureThreshold }}
-{{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/installer/k8s/templates/external/zookeeper/zookeeper-pvc.yaml
b/installer/k8s/templates/external/zookeeper/zookeeper-pvc.yaml
index 679ad2062..465963d6e 100644
--- a/installer/k8s/templates/external/zookeeper/zookeeper-pvc.yaml
+++ b/installer/k8s/templates/external/zookeeper/zookeeper-pvc.yaml
@@ -17,11 +17,11 @@
apiVersion: v1
kind: PersistentVolume
metadata:
- name: zookeeper-pv
+ name: {{ .Values.external.zookeeper.persistence.pvName }}
spec:
- storageClassName: local-storage-zookeeper
+ storageClassName: {{ .Values.external.zookeeper.persistence.storageClassName
}}
capacity:
- storage: 20M
+ storage: {{ .Values.external.zookeeper.persistence.storageSize }}
accessModes:
- {{ .Values.persistentVolumeAccessModes }}
persistentVolumeReclaimPolicy: {{ .Values.persistentVolumeReclaimPolicy }}
@@ -32,13 +32,13 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
- app: zookeeper
- name: zookeeper-pvc
+ app: {{ .Values.external.zookeeper.appName }}
+ name: {{ .Values.external.zookeeper.persistence.claimName }}
spec:
- storageClassName: local-storage-zookeeper
+ storageClassName: {{ .Values.external.zookeeper.persistence.storageClassName
}}
accessModes:
- {{ .Values.persistentVolumeAccessModes }}
resources:
requests:
- storage: 20M
-{{- end }}
+ storage: {{ .Values.external.zookeeper.persistence.storageSize }}
+{{- end }}
\ No newline at end of file
diff --git a/installer/k8s/templates/external/zookeeper/zookeeper-service.yaml
b/installer/k8s/templates/external/zookeeper/zookeeper-service.yaml
index 8d5440d94..492d0558e 100644
--- a/installer/k8s/templates/external/zookeeper/zookeeper-service.yaml
+++ b/installer/k8s/templates/external/zookeeper/zookeeper-service.yaml
@@ -17,13 +17,13 @@
apiVersion: v1
kind: Service
metadata:
- name: zookeeper
+ name: {{ .Values.external.zookeeper.service.name }}
spec:
selector:
- app: zookeeper
+ app: {{ .Values.external.zookeeper.appName }}
ports:
- name: main
protocol: TCP
- port: 2181
- targetPort: 2181
-{{- end }}
+ port: {{ .Values.external.zookeeper.port }}
+ targetPort: {{ .Values.external.zookeeper.port }}
+{{- end }}
\ No newline at end of file
diff --git a/installer/k8s/values.yaml b/installer/k8s/values.yaml
index 0a17c6601..c7755d8c9 100644
--- a/installer/k8s/values.yaml
+++ b/installer/k8s/values.yaml
@@ -23,6 +23,7 @@ persistentVolumeAccessModes: "ReadWriteOnce"
initialDelaySeconds: 60
periodSeconds: 30
failureThreshold: 30
+hostPath: ""
streampipes:
version: "0.93.0-SNAPSHOT"
@@ -41,6 +42,7 @@ streampipes:
ui:
appName: "ui"
resolverActive: true
+ port: 8088
# DNS resolver when using the Nginx proxy
resolver: "kube-dns.kube-system.svc.cluster.local"
service:
@@ -48,7 +50,6 @@ streampipes:
type: "ClusterIP"
nodePort: 8088
port: 8088
- port: 8088
ingress:
active: false
annotations: {}
@@ -67,7 +68,11 @@ streampipes:
extensions:
iiot:
+ appName: extensions-all-iiot
port: 8090
+ service:
+ name: extensions-all-iiot1
+ port: 8090
external:
consul:
@@ -90,6 +95,9 @@ external:
user: "admin"
password: "admin"
port: 5984
+ service:
+ name: "couchdb"
+ port: 5984
persistence:
storageClassName: "hostpath"
storageSize: "1Gi"
@@ -105,6 +113,14 @@ external:
initBucket: "sp"
# For database migration in v0.91.0 - set init mode to 'upgrade' to
migrate an existing installation
initMode: "setup"
+ port1: 8083
+ port2: 8086
+ port3: 8090
+ service:
+ name: "influxdb"
+ port1: 8083
+ port2: 8086
+ port3: 8090
persistence:
storageClassName: "hostpath"
storageSize: "1Gi"
@@ -113,20 +129,39 @@ external:
claimNameV1: "influxdb-pvc"
pvName: "influxdb2-pv"
pvNameV1: "influxdb-pv"
- port1: 8083
- port2: 8086
- port3: 8090
nats:
appName: "nats"
port: 4222
+ version:
service:
type: "NodePort"
externalTrafficPolicy: "Local"
- version:
- kafkaVersion: 2.2.0
- kafkaPort: 9092
- zookeeperVersion: 3.4.13
- zookeeperPort: 2181
+ name: "nats1"
+ port: 4222
+ kafka:
+ appName: "kafka"
+ version: 2.2.0
+ port: 9092
+ service:
+ name: "kafka"
+ port: 9092
+ persistence:
+ storageClassName: "hostpath"
+ storageSize: "1Gi"
+ claimName: "kafka-pvc"
+ pvName: "kafka-pv"
+ zookeeper:
+ appName: "zookeeper"
+ version: 3.4.13
+ port: 2181
+ service:
+ name: "zookeeper"
+ port: 2181
+ persistence:
+ storageClassName: "hostpath"
+ storageSize: "1Gi"
+ claimName: "zookeeper-pvc"
+ pvName: "zookeeper-pv"