kind: Deployment
apiVersion: apps/v1
metadata:
  name: fioranoams12v1
  namespace: default
  labels:
    app: fioranoams12v1
spec:
  replicas: 1
  selector:
    matchLabels:
      app: fioranoams12v1
  template:
    metadata:
      labels:
        app: fioranoams12v1
    spec:
      containers:
        - name: cassandra-db
          image: cassandra
          ports:
           - containerPort: 9042
             name: cql
           - containerPort: 7000
             name: intra-node
           - containerPort: 7001
             name: tls-intra-node
           - containerPort: 7199
             name: jmx
          imagePullPolicy: IfNotPresent   
          volumeMounts:
            - mountPath: /var/lib/cassandra/data
              name: cassandra-db 
        - name: postgres-db
          image: postgres
          ports:
           - containerPort: 5432
          imagePullPolicy: IfNotPresent  
          envFrom:
            - configMapRef:
                name: postgres-config
          volumeMounts:
            - mountPath: /var/lib/postgresql/data
              name: postgres-db  
        - name: fiorano
          image: fiorano_ams
          imagePullPolicy: Never
          volumeMounts:
            - mountPath: /Fiorano/12.1.0/runtimedata
              name: fiorano-db 
        
      volumes:
        - name: cassandra-db
          persistentVolumeClaim:
            claimName: cassandra-pvc
        - name: fiorano-db
          persistentVolumeClaim:
            claimName: fiorano-pvc
        - name: postgres-db
          persistentVolumeClaim:
            claimName: postgres-pvc
