k8-manifests/dev/api-server.yaml (62 lines of code) (raw):

# Copyright 2022 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. # [START anthosbaremetal_dev_api_server_deployment_api_server] apiVersion: apps/v1 kind: Deployment metadata: name: api-server spec: selector: matchLabels: app: api-server template: metadata: labels: app: api-server spec: serviceAccountName: default terminationGracePeriodSeconds: 5 securityContext: runAsNonRoot: true runAsGroup: 1000 runAsUser: 1000 fsGroup: 1000 containers: - name: api-server image: api-server securityContext: privileged: false allowPrivilegeEscalation: false runAsNonRoot: true capabilities: drop: - all env: - name: INVENTORY_EP valueFrom: configMapKeyRef: name: service-configs key: INVENTORY_EP - name: PAYMENTS_EP valueFrom: configMapKeyRef: name: service-configs key: PAYMENTS_EP resources: requests: cpu: 100m memory: 512Mi limits: cpu: 500m memory: 1Gi readinessProbe: httpGet: path: /api/ready port: 8080 initialDelaySeconds: 60 periodSeconds: 5 timeoutSeconds: 10 livenessProbe: httpGet: path: /api/healthy port: 8080 initialDelaySeconds: 120 periodSeconds: 5 timeoutSeconds: 10 # [END anthosbaremetal_dev_api_server_deployment_api_server]