apiVersion: apps/v1 kind: Deployment metadata: name: pubapi annotations: tag: "latest" spec: selector: matchLabels: service: pubapi template: metadata: labels: service: pubapi spec: serviceAccountName: nomulus containers: - name: pubapi image: gcr.io/GCP_PROJECT/nomulus ports: - containerPort: 8080 name: http startupProbe: httpGet: port: 8080 path: /ready/pubapi initialDelaySeconds: 1 timeoutSeconds: 60 successThreshold: 1 failureThreshold: 3 periodSeconds: 30 resources: requests: # explicit pod-slots 0 is required in order to downgrade node # class from performance, which has implicit pod-slots 1 cloud.google.com/pod-slots: 0 cpu: "500m" memory: "1Gi" limits: # explicit pod-slots 0 is required in order to downgrade node # class from performance, which has implicit pod-slots 1 cloud.google.com/pod-slots: 0 cpu: "1000m" memory: "2Gi" args: [ENVIRONMENT] env: - name: POD_ID valueFrom: fieldRef: fieldPath: metadata.name - name: JETTY_WORKER_INSTANCE valueFrom: fieldRef: fieldPath: metadata.name - name: NAMESPACE_ID valueFrom: fieldRef: fieldPath: metadata.namespace - name: CONTAINER_NAME value: pubapi --- apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: pubapi spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: pubapi minReplicas: 5 maxReplicas: 15 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 80 --- apiVersion: v1 kind: Service metadata: name: pubapi spec: selector: service: pubapi ports: - port: 80 targetPort: http name: http --- apiVersion: net.gke.io/v1 kind: ServiceExport metadata: name: pubapi