You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/12/02 11:33:35 UTC

[streampipes] 02/02: Remove obsolete volumes, cleanup pvc handling (#818)

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

commit ae4a2ab23c499bd15d56a22534d37fcef11fe28f
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Thu Dec 1 14:49:16 2022 +0100

    Remove obsolete volumes, cleanup pvc handling (#818)
---
 .../extensions-all-jvm-deployment.yaml             |  7 ----
 .../extensions/pipeline-elements/files-pvc.yaml    | 42 ----------------------
 .../sources-vehicle-simulator-deployment.yaml      | 41 ---------------------
 .../sources-vehicle-simulator-service.yaml         | 31 ----------------
 .../sources-watertank-simulator-deployment.yaml    | 41 ---------------------
 .../k8s/templates/external/kafka/kafka-pvc.yaml    |  2 ++
 .../templates/external/nats/nats-deployment.yaml   |  4 ---
 .../external/zookeeper/zookeeper-pvc.yaml          |  2 ++
 8 files changed, 4 insertions(+), 166 deletions(-)

diff --git a/installer/k8s/templates/extensions/pipeline-elements/extensions-all-jvm-deployment.yaml b/installer/k8s/templates/extensions/pipeline-elements/extensions-all-jvm-deployment.yaml
index fb1cf7fe8..4edcdf554 100644
--- a/installer/k8s/templates/extensions/pipeline-elements/extensions-all-jvm-deployment.yaml
+++ b/installer/k8s/templates/extensions/pipeline-elements/extensions-all-jvm-deployment.yaml
@@ -27,16 +27,9 @@ spec:
       labels:
         app: extensions-all-jvm
     spec:
-      volumes:
-        - name: files-pv
-          persistentVolumeClaim:
-            claimName: files-pvc
       containers:
         - name: extensions-all-jvm
           image: {{ .Values.streampipes.registry }}/extensions-all-jvm:{{ .Values.streampipes.version }}
           imagePullPolicy: {{ .Values.pullPolicy }}
           ports:
             - containerPort: 8090
-          volumeMounts:
-            - mountPath: "/spImages"
-              name: files-pv
diff --git a/installer/k8s/templates/extensions/pipeline-elements/files-pvc.yaml b/installer/k8s/templates/extensions/pipeline-elements/files-pvc.yaml
deleted file mode 100644
index ee0fb646e..000000000
--- a/installer/k8s/templates/extensions/pipeline-elements/files-pvc.yaml
+++ /dev/null
@@ -1,42 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: PersistentVolume
-metadata:
-  name: files-pv
-spec:
-  storageClassName: local-storage-files
-  capacity:
-    storage: 250Mi
-  accessModes:
-    - {{ .Values.persistentVolumeAccessModes }}
-  persistentVolumeReclaimPolicy: {{ .Values.persistentVolumeReclaimPolicy }}
-  hostPath:
-    path: {{ .Values.hostPath }}/files
----
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
-  labels:
-    app: extensions-all-jvm
-  name: files-pvc
-spec:
-  storageClassName: local-storage-files
-  accessModes:
-    - {{ .Values.persistentVolumeAccessModes }}
-  resources:
-    requests:
-      storage: 250Mi
diff --git a/installer/k8s/templates/extensions/pipeline-elements/sources-vehicle-simulator-deployment.yaml b/installer/k8s/templates/extensions/pipeline-elements/sources-vehicle-simulator-deployment.yaml
deleted file mode 100644
index 083926d93..000000000
--- a/installer/k8s/templates/extensions/pipeline-elements/sources-vehicle-simulator-deployment.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-{{- if (eq .Values.deployment "full") }}
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: sources-vehicle-simulator
-spec:
-  selector:
-    matchLabels:
-      app: sources-vehicle-simulator
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        app: sources-vehicle-simulator
-    spec:
-      initContainers:
-        - name: init-wait-kafka
-          image: alpine
-          command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1 kafka 9092 && exit 0 || sleep 3; done; exit 1"]            
-      containers:
-        - name: sources-vehicle-simulator
-          image: {{ .Values.streampipes.registry }}/sources-vehicle-simulator:{{ .Values.streampipes.version }}
-          imagePullPolicy: {{ .Values.pullPolicy }}
-          ports:
-            - containerPort: 8090
-{{- end }}
diff --git a/installer/k8s/templates/extensions/pipeline-elements/sources-vehicle-simulator-service.yaml b/installer/k8s/templates/extensions/pipeline-elements/sources-vehicle-simulator-service.yaml
deleted file mode 100644
index ae02d2c0d..000000000
--- a/installer/k8s/templates/extensions/pipeline-elements/sources-vehicle-simulator-service.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-{{- if (eq .Values.deployment "full") }}
-apiVersion: v1
-kind: Service
-metadata:
-  name: sources-vehicle-simulator
-  labels:
-    name: sources-vehicle-simulator
-spec:
-  selector:
-    app: sources-vehicle-simulator
-  ports:
-    - name: main
-      protocol: TCP
-      port: 8090
-      targetPort: 8090
-{{- end }}
diff --git a/installer/k8s/templates/extensions/pipeline-elements/sources-watertank-simulator-deployment.yaml b/installer/k8s/templates/extensions/pipeline-elements/sources-watertank-simulator-deployment.yaml
deleted file mode 100644
index e0cf433ec..000000000
--- a/installer/k8s/templates/extensions/pipeline-elements/sources-watertank-simulator-deployment.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-{{- if (eq .Values.deployment "full") }}
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: sources-watertank-simulator
-spec:
-  selector:
-    matchLabels:
-      app: sources-watertank-simulator
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        app: sources-watertank-simulator
-    spec:
-      initContainers:
-        - name: init-wait-kafka
-          image: alpine
-          command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1 kafka 9092 && exit 0 || sleep 3; done; exit 1"]
-      containers:
-        - name: sinks-internal-jvm
-          image: {{ .Values.streampipes.registry }}/sources-watertank-simulator:{{ .Values.streampipes.version }}
-          imagePullPolicy: {{ .Values.pullPolicy }}
-          ports:
-            - containerPort: 8090
-{{- 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 894ae6c73..d9b2f359a 100644
--- a/installer/k8s/templates/external/kafka/kafka-pvc.yaml
+++ b/installer/k8s/templates/external/kafka/kafka-pvc.yaml
@@ -13,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+{{- if eq .Values.preferredBroker "kafka" }}
 apiVersion: v1
 kind: PersistentVolume
 metadata:
@@ -40,3 +41,4 @@ spec:
   resources:
     requests:
       storage: 50M
+{{- end }}
diff --git a/installer/k8s/templates/external/nats/nats-deployment.yaml b/installer/k8s/templates/external/nats/nats-deployment.yaml
index d9c27cf75..7c6860825 100644
--- a/installer/k8s/templates/external/nats/nats-deployment.yaml
+++ b/installer/k8s/templates/external/nats/nats-deployment.yaml
@@ -32,10 +32,6 @@ spec:
         - 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"]
-      volumes:
-        - name: kafka-pv
-          persistentVolumeClaim:
-            claimName: kafka-pvc
       containers:
         - name: nats
           image: nats
diff --git a/installer/k8s/templates/external/zookeeper/zookeeper-pvc.yaml b/installer/k8s/templates/external/zookeeper/zookeeper-pvc.yaml
index 741bc9b15..679ad2062 100644
--- a/installer/k8s/templates/external/zookeeper/zookeeper-pvc.yaml
+++ b/installer/k8s/templates/external/zookeeper/zookeeper-pvc.yaml
@@ -13,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+{{- if eq .Values.preferredBroker "kafka" }}
 apiVersion: v1
 kind: PersistentVolume
 metadata:
@@ -40,3 +41,4 @@ spec:
   resources:
     requests:
       storage: 20M
+{{- end }}