You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by wi...@apache.org on 2020/05/14 14:00:28 UTC

[incubator-streampipes-installer] branch dev updated: [STREAMPIPES-125] Add Redis as an optional external service

This is an automated email from the ASF dual-hosted git repository.

wiener pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes-installer.git


The following commit(s) were added to refs/heads/dev by this push:
     new 9f611a1  [STREAMPIPES-125] Add Redis as an optional external service
     new 1c56203  Merge pull request #7 from grainier/STREAMPIPES-125
9f611a1 is described below

commit 9f611a1a13452a69cf6db07d742bc6f7ab04b0eb
Author: Grainier <gr...@wso2.com>
AuthorDate: Thu May 14 19:14:05 2020 +0530

    [STREAMPIPES-125] Add Redis as an optional external service
---
 .../redis/redis-deployment.yaml                    | 50 ++++++++++++++++++++++
 .../redis/redis-pvc.yaml                           | 27 ++++++++++++
 .../redis/redis-service.yaml                       | 29 +++++++++++++
 3 files changed, 106 insertions(+)

diff --git a/helm-chart/templates/optional-external-services/redis/redis-deployment.yaml b/helm-chart/templates/optional-external-services/redis/redis-deployment.yaml
new file mode 100644
index 0000000..1d5c00d
--- /dev/null
+++ b/helm-chart/templates/optional-external-services/redis/redis-deployment.yaml
@@ -0,0 +1,50 @@
+# 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: redis
+  labels:
+    db: redis
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: redis
+  template:
+    metadata:
+      labels:
+        app: redis
+        db: redis
+    spec:
+      volumes:
+        - name: redis-pv
+          persistentVolumeClaim:
+            claimName: redis-pvc
+      containers:
+        - name: redis
+          image: redis:{{ .Values.external.redisVersion }}
+          imagePullPolicy: {{ .Values.pullPolicy }}
+          args: ["--appendonly", "yes", "--save", "900", "1", "--save", "30", "1"]
+          tty: true
+          stdin: true
+          ports:
+            - containerPort: 6379
+          volumeMounts:
+            - mountPath: /data
+              name: redis-pv
+{{- end }}
diff --git a/helm-chart/templates/optional-external-services/redis/redis-pvc.yaml b/helm-chart/templates/optional-external-services/redis/redis-pvc.yaml
new file mode 100644
index 0000000..bd09504
--- /dev/null
+++ b/helm-chart/templates/optional-external-services/redis/redis-pvc.yaml
@@ -0,0 +1,27 @@
+# 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: PersistentVolumeClaim
+metadata:
+  name: redis-pvc
+spec:
+  accessModes:
+    - ReadWriteOnce
+  resources:
+    requests:
+      storage: 5Gi
+{{- end}}
diff --git a/helm-chart/templates/optional-external-services/redis/redis-service.yaml b/helm-chart/templates/optional-external-services/redis/redis-service.yaml
new file mode 100644
index 0000000..43ccc3d
--- /dev/null
+++ b/helm-chart/templates/optional-external-services/redis/redis-service.yaml
@@ -0,0 +1,29 @@
+# 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: redis
+spec:
+  selector:
+    db: redis
+  ports:
+    - name: main
+      protocol: TCP
+      port: 6379
+      targetPort: 6379
+{{- end}}