kind: Deployment
apiVersion: apps/v1
metadata:
  name: teamcity
  namespace: default
spec:
  selector:
    matchLabels:
      app: teamcity
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: teamcity
    spec:
      containers:
      - name: teamcity
        image: jetbrains/teamcity-server
        ports:
          - name: teamcity
            containerPort: 8111
        volumeMounts:
          - mountPath: "/data/teamcity_server/datadir"
            name: teamcitydata
      volumes:
        - name: teamcitydata
          persistentVolumeClaim:
            claimName: teamcitydata
