apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: isamwebseal
  labels:
    app: isamwebseal
spec:
  replicas: 1
  template: 
    metadata:
      labels:
        app: isamwebseal
    spec:
      volumes:
        - name: isamconfigvol
          emptyDir: {}
      imagePullSecrets:
        - name: dockerlogin
      containers:
        - name: isamwebseal
          image: store/ibmcorp/isam:9.0.4.0
          ports:
            - containerPort: 443
          volumeMounts:
            - mountPath: /var/shared
              name: isamconfigvol
          securityContext:
            capabilities:
              add:
                - SYS_PTRACE
                - SYS_RESOURCE
          env:
            - name: SERVICE
              value: webseal
            - name: INSTANCE
              value: default
            - 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
---
# for external service access, see https://console.bluemix.net/docs/containers/cs_apps.html#cs_apps_public_nodeport
apiVersion: v1
kind: Service
metadata:
  name: isamwebseal
spec:
  ports:
    - port: 443
      name: isamwebseal
      protocol: TCP
      nodePort: 30443
  selector:
    app: isamwebseal
  type: NodePort
