apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: isamruntime
  labels:
    app: isamruntime
spec:
  replicas: 1
  template: 
    metadata:
      labels:
        app: isamruntime
    spec:
      volumes:
        - name: isamconfigvol
          emptyDir: {}
      imagePullSecrets:
        - name: dockerlogin
      containers:
        - name: isamruntime
          image: store/ibmcorp/isam:9.0.4.0
          imagePullPolicy: Always
          ports:
            - containerPort: 443
          volumeMounts:
            - mountPath: /var/shared
              name: isamconfigvol
          securityContext:
            capabilities:
              add:
                - SYS_PTRACE
                - SYS_RESOURCE
          env:
            - name: SERVICE
              value: runtime
            - name: CONTAINER_TIMEZONE
              value: Australia/Brisbane
            - name: CONFIG_SERVICE_URL
              value: https://isamconfig:9443/shared_volume
            - name: CONFIG_SERVICE_USER_NAME
              valueFrom:
                secretKeyRef:
                  name: configreader
                  key: username
            - name: CONFIG_SERVICE_USER_PWD
              valueFrom:
                secretKeyRef:
                  name: configreader
                  key: password
---
apiVersion: v1
kind: Service
metadata:
  name: isamruntime
spec:
  ports:
    - port: 443
      name: isamruntime
      protocol: TCP
  selector:
    app: isamruntime
