github.com/sentienttechnologies/studio-go-runner@v0.0.0-20201118202441-6d21f2ced8ee/examples/azure/deployment-1.11.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    SQS_CERTS: "certs/aws-sqs"
    11    MESSAGE_CRYPT: "certs/message"
    12    QUEUE_MATCH: "^rmq_.*$"
    13    AMPQ_URL: ""
    14  ---
    15  apiVersion: v1
    16  kind: ServiceAccount
    17  metadata:
    18    name: studioml-account
    19  imagePullSecrets:
    20  - name: studioml-go-docker-key
    21  ---
    22  apiVersion: rbac.authorization.k8s.io/v1
    23  kind: ClusterRole
    24  metadata:
    25    name: studioml-role
    26  rules:
    27  - apiGroups:
    28    - "*"
    29    resources:
    30    - configMaps
    31    verbs:
    32    - get
    33    - list
    34    - watch
    35  ---
    36  apiVersion: rbac.authorization.k8s.io/v1
    37  kind: RoleBinding
    38  metadata:
    39    name: studioml-role-bind
    40  subjects:
    41  - kind: ServiceAccount
    42    name: studioml-account
    43  roleRef:
    44    kind: ClusterRole
    45    name: studioml-role
    46    apiGroup: rbac.authorization.k8s.io
    47  ---
    48  apiVersion: apps/v1
    49  kind: Deployment
    50  metadata:
    51    name: studioml-go-runner-deployment
    52    labels:
    53      app: studioml-go-runner
    54  spec:
    55    progressDeadlineSeconds: 360
    56    selector:
    57      matchLabels:
    58        app: studioml-go-runner
    59    replicas: 1
    60    strategy:
    61      type: RollingUpdate
    62    template:
    63      metadata:
    64        labels:
    65          app: studioml-go-runner
    66      spec:
    67        serviceAccountName: studioml-account
    68        automountServiceAccountToken: false
    69        containers:
    70        - name: studioml-go-runner
    71          envFrom:
    72              - configMapRef:
    73                  name: studioml-env
    74          image: studioml/studio-go-runner
    75          #image: {{ expandenv "$azure_registry_name"}}.azurecr.io/{{ expandenv "$azure_registry_name"}}/{{.duat.module}}:{{.duat.version}}
    76          #image: nvidia/cuda:8.0-cudnn7-runtime-ubuntu16.04
    77          imagePullPolicy: Always
    78          resources:
    79            limits:
    80              nvidia.com/gpu: 1
    81              memory: "10Gi"
    82              cpu: "2"
    83          volumeMounts:
    84          - mountPath: /tmp
    85            name: tmp-volume
    86          - name: aws-sqs
    87            mountPath: "/runner/certs/aws-sqs/default"
    88            readOnly: true
    89          - name: message-encryption
    90            mountPath: "/runner/certs/message/encryption"
    91            readOnly: true
    92          - name: encryption-passphrase
    93            mountPath: "/runner/certs/message/passphrase"
    94            readOnly: true
    95        imagePullSecrets:
    96          - name: studioml-go-docker-key
    97        nodeSelector:
    98          beta.kubernetes.io/os: linux
    99        volumes:
   100          - name: tmp-volume
   101            emptyDir:
   102              sizeLimit: 80Gi
   103          - name: aws-sqs
   104            secret:
   105              optional: true
   106              secretName: studioml-runner-aws-sqs
   107              items:
   108              - key: credentials
   109                path: credentials
   110              - key: config
   111                path: config
   112          - name: message-encryption
   113            secret:
   114              optional: false
   115              secretName: studioml-runner-key-secret
   116              items:
   117              - key: ssh-privatekey
   118                path: ssh-privatekey
   119              - key: ssh-publickey
   120                path: ssh-publickey
   121          - name: encryption-passphrase
   122            secret:
   123              optional: false
   124              secretName: studioml-runner-passphrase-secret
   125              items:
   126              - key: ssh-passphrase
   127                path: ssh-passphrase