Will-Lo commented on a change in pull request #2781: [GOBBLIN-913] Add MySQL 
and configurations to cluster
URL: https://github.com/apache/incubator-gobblin/pull/2781#discussion_r340794003
 
 

 ##########
 File path: gobblin-kubernetes/gobblin-service/dev-cluster/application.yaml
 ##########
 @@ -0,0 +1,110 @@
+# In the future, build the kubernetes cluster from the official docker account
+# Also ensure that proper tagging/versioning is done i.e. remove :latest tag 
and instead use the digest of the container
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: 'gaas-deployment'
+  labels:
+    app: gaas-deployment
+spec:
+  selector:
+    matchLabels:
+      app: gaas
+  replicas: 1
+  template:
+    metadata:
+      name: 'gaas'
+      labels:
+        app: gaas
+    spec:
+      volumes:
+        - name: shared-jobs
+          persistentVolumeClaim:
+            claimName: shared-jobs-claim
+        - name: shared-template-catalogs
+          persistentVolumeClaim:
+            claimName: shared-template-catalogs-claim
+        - name: gaas-config
+          configMap:
+            name: gaas-config
+      containers:
+        - name: gobblin-service
+          image: will97/gobblin-as-a-service:latest
+          command: ["./bin/entrypoint.sh"]
+          args: ["--args", "-DmysqlCredentials.user=$(MYSQL_USERNAME) 
-DmysqlCredentials.password=$(MYSQL_PASSWORD)"]
+          env:
+            - name: MYSQL_USERNAME
+              valueFrom:
+                secretKeyRef:
+                  name: mysql-credentials
+                  key: username
+            - name: MYSQL_PASSWORD
+              valueFrom:
+                secretKeyRef:
+                  name: mysql-credentials
+                  key: password
+          volumeMounts:
+            - name: shared-jobs
+              mountPath: /tmp/gobblin-as-service/jobs
+            - name: shared-template-catalogs
+              mountPath: /tmp/templateCatalog
+            - name: gaas-config
+              mountPath: /home/gobblin/conf/gobblin-as-service/application.conf
+              subPath: gaas-application.conf
+      # dependency on mysql to be initialized before gaas can be initialized
+      initContainers:
 
 Review comment:
   Other features of K8s to help with dependencies between pods that I'm aware 
of besides `initContainers` is to define a custom `readiness probe` and 
`readiness probe` to help with applications that take longer to boot up, I 
think we could incorporate that in the future as well to have a more robust 
startup 

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


With regards,
Apache Git Services

Reply via email to