You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/08/01 14:02:37 UTC

[GitHub] dgrove-oss commented on a change in pull request #265: Add alarm provider

dgrove-oss commented on a change in pull request #265: Add alarm provider
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/265#discussion_r206891254
 
 

 ##########
 File path: helm/providers/charts/alarm/templates/pkgAlarmProvider.yaml
 ##########
 @@ -0,0 +1,79 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ .Values.alarmprovider.name | quote }}
+  namespace: {{ .Release.Namespace | quote }}
+  labels:
+    name: alarmprovider
+spec:
+  replicas: {{ .Values.alarmprovider.replicaCount }}
+  template:
+    metadata:
+      labels:
+        name: {{ .Values.alarmprovider.name | quote }}
+    spec:
+      restartPolicy: {{ .Values.alarmprovider.restartPolicy }}
+      volumes:
+        - name: alarm-logs
+          persistentVolumeClaim:
+            claimName: {{ .Values.alarmprovider.persistence.pvcName | quote }}
+      containers:
+      - name: {{ .Values.alarmprovider.name | quote }}
+        imagePullPolicy: {{ .Values.alarmprovider.imagePullPolicy | quote }}
+        image: {{ .Values.alarmprovider.image | quote }}
+        ports:
+        - name: kafkaprovider
+          containerPort: {{ .Values.alarmprovider.apiPort }}
+        env:
+        - name: "DB_PROTOCOL"
+          valueFrom:
+            configMapKeyRef:
+              name: db.config
+              key: db_protocol
+        - name: "DB_HOST"
+          valueFrom:
+            configMapKeyRef:
+              name: db.config
+              key: db_host_port
+        - name: "DB_USERNAME"
+          valueFrom:
+            secretKeyRef:
+              name: db.auth
+              key: db_username
+        - name: "DB_PASSWORD"
+          valueFrom:
+            secretKeyRef:
+              name: db.auth
+              key: db_password
+        - name: "DB_PREFIX"
+          value: "{{- .Values.alarmprovider.dbPrefix -}}"
+        - name: "ROUTER_HOST"
+          valueFrom:
+            configMapKeyRef:
+              name: whisk.config
+              key: whisk_api_host_nameAndPort
+        - name: "ENDPOINT_AUTH"
+          valueFrom:
+            configMapKeyRef:
+              name: whisk.config
+              key: whisk_api_host_nameAndPort
+        volumeMounts:
+          - name: alarm-logs
+            mountPath: /logs
+
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
 
 Review comment:
   There are probably two ways forward than, either use a StatefulSet instead of a Deployment so you can use volumeClaimTemplates or leave it as is and just a command in the Values.yaml that alarmProvider.numReplicas currently must have the value 1.   I think the StatefulSet is probably preferable, but either option would be ok.   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services