github.com/jenkins-x/jx/v2@v2.1.155/pkg/cmd/step/test_data/split_monorepo/kubernetes/bar-deployment.yaml (about)

     1  apiVersion: v1
     2  kind: Service
     3  metadata:
     4    labels:
     5      app: bar
     6    name: bar
     7  spec:
     8    ports:
     9    - name: http
    10      port: 8080
    11      targetPort: 8080
    12    selector:
    13      app: bar
    14  ---
    15  apiVersion: apps/v1
    16  kind: Deployment
    17  metadata:
    18    labels:
    19      app: bar
    20    name: bar
    21  spec:
    22    replicas: 2
    23    selector:
    24      matchLabels:
    25        app: bar
    26    template:
    27      metadata:
    28        annotations:
    29          prometheus.io/scrape: 'true'
    30          prometheus.io/path: '/actuator/prometheus'
    31          prometheus.io/port: '8080'
    32        labels:
    33          app: bar
    34          visualize: 'true'
    35      spec:
    36        containers:
    37        - name: bar
    38          image: saturnism/gcp-spring-petclinic-bar:latest
    39          readinessProbe:
    40            exec:
    41              command:
    42              - curl
    43              - http://localhost:8080/actuator/info
    44          livenessProbe:
    45            exec:
    46              command:
    47              - curl
    48              - http://localhost:8080/actuator/health
    49            initialDelaySeconds: 20
    50          resources:
    51            requests:
    52              memory: 256Mi
    53              cpu: 200m
    54            limits:
    55              memory: 512Mi
    56              cpu: 2000m
    57          ports:
    58          - name: http
    59            containerPort: 8080