apiVersion: apps/v1 
kind: Deployment 
metadata:
  namespace: openslice
  labels:
    org.etsi.osl.service: portalweb
  name: portalweb
spec:
  replicas: 1
  selector:
    matchLabels:
      org.etsi.osl.service: portalweb
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        org.etsi.osl.service: portalweb
    spec:
      containers:
        - name: openslice-portalweb
          image: openslice/org.etsi.osl.portal.web:latest
          ports:
            - containerPort: 80
          volumeMounts:
          - name: "portalweb-configuration"
            mountPath: /usr/share/nginx/html/nfvportal/js/config.js
            subPath: config.js
          - name: "portalweb-configuration-nginx"
            readOnly: true
            mountPath: "/etc/nginx/conf.d"
      volumes:
        - name: "portalweb-configuration"
          configMap:
            name: portalweb-config
            defaultMode: 420
        - name: "portalweb-configuration-nginx"
          configMap:
            name: portalweb-config-nginx
      restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
  namespace: openslice
  labels:
    org.etsi.osl.service: portalweb
  name: portalweb
spec:
  ports:
    - name: "portalwebport"
      port: 80
  selector:
    org.etsi.osl.service: portalweb
