github.com/sentienttechnologies/studio-go-runner@v0.0.0-20201118202441-6d21f2ced8ee/examples/docker/deployment.yaml (about) 1 # Copyright (c) 2019-2020 Cognizant Digital Business, Evolutionary AI. All rights reserved. Issued under the Apache 2.0 License. 2 --- 3 apiVersion: v1 4 kind: ConfigMap 5 metadata: 6 name: studioml-env 7 data: 8 LOGXI_FORMAT: "happy,maxcol=1024" 9 LOGXI: "*=DBG" 10 QUEUE_MATCH: "^rmq_.*$" 11 AMQP_URL: "amqp://guest:guest@rabbitmq-service:5672/" 12 CLEAR_TEXT_MESSAGES: "true" 13 --- 14 apiVersion: v1 15 kind: ServiceAccount 16 metadata: 17 name: studioml-account 18 imagePullSecrets: 19 - name: studioml-go-docker-key 20 --- 21 apiVersion: rbac.authorization.k8s.io/v1 22 kind: ClusterRole 23 metadata: 24 name: studioml-role 25 rules: 26 - apiGroups: 27 - "" 28 resources: 29 - configmaps 30 verbs: 31 - get 32 - list 33 - watch 34 --- 35 apiVersion: rbac.authorization.k8s.io/v1 36 kind: RoleBinding 37 metadata: 38 name: studioml-role-bind 39 subjects: 40 - kind: ServiceAccount 41 name: studioml-account 42 roleRef: 43 kind: ClusterRole 44 name: studioml-role 45 apiGroup: rbac.authorization.k8s.io 46 --- 47 apiVersion: apps/v1 48 kind: Deployment 49 metadata: 50 name: rabbitmq 51 labels: 52 app: rabbitmq 53 spec: 54 progressDeadlineSeconds: 360 55 selector: 56 matchLabels: 57 app: rabbitmq 58 replicas: 1 59 strategy: 60 type: RollingUpdate 61 template: 62 metadata: 63 labels: 64 app: rabbitmq 65 spec: 66 serviceAccountName: studioml-account 67 automountServiceAccountToken: true 68 containers: 69 - name: rabbitmq 70 image: rabbitmq:3-management 71 env: 72 -name: RABBITMQ_ERLANG_COOKIE 73 value: 'secret' 74 resources: 75 requests: 76 memory: "3Gi" 77 cpu: ".5" 78 limits: 79 memory: "3Gi" 80 cpu: ".5" 81 ports: 82 - containerPort: 5672 83 - containerPort: 15672 84 --- 85 apiVersion: v1 86 kind: Service 87 metadata: 88 name: rabbitmq-service 89 spec: 90 type: LoadBalancer 91 selector: 92 app: rabbitmq 93 ports: 94 - name: client-port 95 protocol: TCP 96 port: 15672 97 targetPort: 15672 98 - name: admin-port 99 protocol: TCP 100 port: 5672 101 targetPort: 5672 102 --- 103 apiVersion: apps/v1 104 kind: Deployment 105 metadata: 106 name: studioml-go-runner-deployment 107 labels: 108 app: studioml-go-runner 109 spec: 110 progressDeadlineSeconds: 360 111 selector: 112 matchLabels: 113 app: studioml-go-runner 114 replicas: 1 115 strategy: 116 type: RollingUpdate 117 template: 118 metadata: 119 labels: 120 app: studioml-go-runner 121 spec: 122 serviceAccountName: studioml-account 123 automountServiceAccountToken: true 124 containers: 125 - name: studioml-go-runner 126 envFrom: 127 - configMapRef: 128 name: studioml-env 129 image: docker.io/leafai/studio-go-runner:0.9.27-master-aaaagnrahyf 130 imagePullPolicy: Always 131 resources: 132 requests: 133 memory: "4Gi" 134 cpu: "3" 135 limits: 136 memory: "4Gi" 137 cpu: "3"