Add support CWClientLibDataFeedParser in kubernetes deployment
authorPhilippe Pepiot <philippe.pepiot@logilab.fr>
Thu, 16 May 2019 17:42:02 +0200
changeset 104 03949823c563
parent 103 a6cd40f4a821
child 105 3f2b56402a8e
Add support CWClientLibDataFeedParser in kubernetes deployment We need to provide a cwclientlibrc file in instance directory
README.rst
deploy/deployment.yaml
--- a/README.rst	Thu May 16 17:41:21 2019 +0200
+++ b/README.rst	Thu May 16 17:42:02 2019 +0200
@@ -42,6 +42,15 @@
       --from-literal CW_BASE_URL=https://fresh.example.com
 
 
+You need to mount a cwclientlib configuration file to make
+CWClientLibDataFeedParser. If you don't use this feature, just create an empty
+file.
+
+Create a file named cwclientlibrc and run::
+
+   kubectl create secret generic fresh-cwclientlibrc --from-file=./cwclientlibrc
+
+
 Then deploy fresh with::
 
    kubectl apply -f deployment.yaml
--- a/deploy/deployment.yaml	Thu May 16 17:41:21 2019 +0200
+++ b/deploy/deployment.yaml	Thu May 16 17:42:02 2019 +0200
@@ -50,6 +50,9 @@
         - name: config
           configMap:
             name: fresh
+        - name: cwclientlibrc
+          secret:
+            secretName: fresh-cwclientlibrc
       containers:
         - name: fresh
           image: hub.extranet.logilab.fr/logilab/fresh
@@ -60,6 +63,9 @@
           volumeMounts:
             - name: static
               mountPath: /etc/cubicweb.d/fresh/data
+            - name: cwclientlibrc
+              mountPath: /etc/cubicweb.d/fresh/cwclientlibrc
+              subPath: cwclientlibrc
           resources:
             requests:
               cpu: 500m
@@ -109,6 +115,10 @@
     spec:
       imagePullSecrets:
         - name: regcred
+      volumes:
+        - name: cwclientlibrc
+          secret:
+            secretName: fresh-cwclientlibrc
       containers:
         - name: fresh
           image: hub.extranet.logilab.fr/logilab/fresh
@@ -116,6 +126,10 @@
           envFrom:
             - secretRef:
                 name: fresh-env
+          volumeMounts:
+            - name: cwclientlibrc
+              mountPath: /etc/cubicweb.d/fresh/cwclientlibrc
+              subPath: cwclientlibrc
           command: ["cubicweb-ctl", "scheduler", "fresh"]
           resources:
             requests: