infra/charts/templates/payments.yaml (72 lines of code) (raw):
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1
kind: Deployment
metadata:
name: payments
spec:
selector:
matchLabels:
app: payments
template:
metadata:
labels:
app: payments
spec:
serviceAccountName: "{{ .Values.service_account }}"
terminationGracePeriodSeconds: 5
securityContext:
runAsNonRoot: true
runAsGroup: 1000
runAsUser: 1000
fsGroup: 1000
containers:
- name: payments
image: us-docker.pkg.dev/point-of-sale-ci/pos-images/payments:v0.3.0-jss
securityContext:
privileged: false
allowPrivilegeEscalation: false
runAsNonRoot: true
capabilities:
drop:
- all
env:
- name: SPRING_PROFILES_ACTIVE
valueFrom:
configMapKeyRef:
name: spring-profile
key: SPRING_PROFILES_ACTIVE
- name: PROJECT_ID
valueFrom:
configMapKeyRef:
name: service-configs
key: PROJECT_ID
- name: SPANNER_ID
valueFrom:
configMapKeyRef:
name: service-configs
key: SPANNER_ID
- name: SPANNER_DATABASE
valueFrom:
configMapKeyRef:
name: service-configs
key: SPANNER_DATABASE
resources:
requests:
cpu: 500m
memory: 512Mi
limits:
cpu: 1000m
memory: 1Gi
readinessProbe:
httpGet:
path: /ready
port: 8080
initialDelaySeconds: 60
periodSeconds: 5
timeoutSeconds: 10
livenessProbe:
httpGet:
path: /healthy
port: 8080
initialDelaySeconds: 120
periodSeconds: 5
timeoutSeconds: 10