All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.service-deployment-template.yml Maven / Gradle / Ivy

There is a newer version: 2.14
Show newest version
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: ${artifactId}
  name: ${artifactId}
  namespace: default
spec:
  replicas: ${replicas}
  minReadySeconds: ${minReadySeconds}
  selector:
    matchLabels:
      app: ${artifactId}
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: ${artifactId}
    spec:
      containers:
        - name: ${artifactId}
          image: ${imageName}
          imagePullPolicy: Always
          ports:
            - name: liveness-port
              containerPort: ${server.port}
          resources:
            requests:
              cpu: 100m
              memory: 512Mi
            limits:
              cpu: 500m
              memory: 1024Mi
          readinessProbe:
            httpGet:
              path: /
              port: liveness-port
            failureThreshold: 5
            periodSeconds: 10
            initialDelaySeconds: 60
          livenessProbe:
            httpGet:
              path: /
              port: liveness-port
            failureThreshold: 5
            periodSeconds: 10
            initialDelaySeconds: 60
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: ${artifactId}
  name: ${artifactId}
  namespace: default
spec:
  type: NodePort
  ports:
    - port: ${server.port}
      protocol: TCP
      name: http
  selector:
    app: ${artifactId}
  sessionAffinity: None




© 2015 - 2024 Weber Informatics LLC | Privacy Policy