apiVersion: v1
kind: ReplicationController
metadata:
  name: artifactory
  namespace: {{ development_namespace }}
  labels:
    k8sdc-app: artifactory
    k8sdc.io/services-development: "true"
    version: v0
  annotations:
    k8sdc: "true"
spec:
  replicas: 1
  selector:
    k8sdc-app: artifactory
    version: v0
  template:
    metadata:
      labels:
        k8sdc-app: artifactory
        k8sdc.io/services-development: "true"
        version: v0
      annotations:
        k8sdc: "true"
    spec:
      containers:
      - name: artifactory
        image: mattgruter/artifactory
        volumeMounts:
        - name: artifactory-data-volume
          mountPath: /artifactory/data
        - name: artifactory-logs-volume
          mountPath: /artifactory/logs
        - name: artifactory-backup-volume
          mountPath: /artifactory/backup
      volumes:
      - name: artifactory-data-volume
        nfs:
          server: "{{ groups['k8sdc-master'] | first }}"
          path: /var/exports/services-development/artifactory/data
          readOnly: false
      - name: artifactory-logs-volume
        nfs:
          server: "{{ groups['k8sdc-master'] | first }}"
          path: /var/exports/services-development/artifactory/logs
          readOnly: false
      - name: artifactory-backup-volume
        nfs:
          server: "{{ groups['k8sdc-master'] | first }}"
          path: /var/exports/services-development/artifactory/backup
          readOnly: false