# Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
# 
apiVersion: apps/v1
kind: Deployment
metadata:
  name: rails-app
  labels:
    app: rails
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rails
  template:
    metadata:
      labels:
        app: rails
    spec:
      restartPolicy: Always
      containers:
      - name: rails
        image: gcr.io/project/app:version
        command:
        - rails
        ports:
        - containerPort: 8080
        envFrom:
        - configMapRef:
            name: rails-app-config
        env:
        - name: JAVA_OPTS
          value: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Djava.security.egd=file:/dev/./urandom
        imagePullPolicy: Always
  minReadySeconds: 5
