Application Research Workloads API

Score workload management operations

Documentation

Specifications

Code Examples

Schemas & Data

OpenAPI Specification

application-research-workloads-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Application Research CNAB Bundle API Resources Workloads API
  version: 1.0.0
  description: 'API for managing Cloud Native Application Bundles (CNAB).


    This API provides endpoints for managing CNAB bundles, claims, claim results,

    dependencies, parameter sources, relocation mappings, and installation status.

    '
  contact:
    name: CNAB Specification
    url: https://cnab.io
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://api.example.com/v1
  description: Production server
- url: https://staging-api.example.com/v1
  description: Staging server
security:
- bearerAuth: []
- apiKey: []
tags:
- name: Workloads
  description: Score workload management operations
paths:
  /workloads:
    get:
      tags:
      - Workloads
      summary: Application Research List all workloads
      description: Retrieves a list of all Score workload specifications
      operationId: listWorkloads
      parameters:
      - $ref: '#/components/parameters/LimitParam'
      - $ref: '#/components/parameters/OffsetParam'
      - $ref: '#/components/parameters/NameFilterParam'
      responses:
        '200':
          description: Successful response with list of workloads
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkloadList'
              examples:
                multipleWorkloads:
                  $ref: '#/components/examples/WorkloadListExample'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - Workloads
      summary: Application Research Create a new workload
      description: Creates a new Score workload specification
      operationId: createWorkload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScoreWorkload'
            examples:
              ecommerceFrontend:
                $ref: '#/components/examples/EcommerceFrontendExample'
              dataPipelineWorker:
                $ref: '#/components/examples/DataPipelineWorkerExample'
              mlInferenceService:
                $ref: '#/components/examples/MLInferenceServiceExample'
          application/x-yaml:
            schema:
              $ref: '#/components/schemas/ScoreWorkload'
      responses:
        '201':
          description: Workload created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScoreWorkload'
              examples:
                ecommerceFrontend:
                  $ref: '#/components/examples/EcommerceFrontendExample'
        '400':
          $ref: '#/components/responses/BadRequest'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalError'
  /workloads/{workloadName}:
    get:
      tags:
      - Workloads
      summary: Application Research Get a specific workload
      description: Retrieves a Score workload specification by name
      operationId: getWorkload
      parameters:
      - $ref: '#/components/parameters/WorkloadNameParam'
      responses:
        '200':
          description: Successful response with workload details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScoreWorkload'
              examples:
                ecommerceFrontend:
                  $ref: '#/components/examples/EcommerceFrontendExample'
                dataPipelineWorker:
                  $ref: '#/components/examples/DataPipelineWorkerExample'
                mlInferenceService:
                  $ref: '#/components/examples/MLInferenceServiceExample'
            application/x-yaml:
              schema:
                $ref: '#/components/schemas/ScoreWorkload'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
    put:
      tags:
      - Workloads
      summary: Application Research Update a workload
      description: Updates an existing Score workload specification
      operationId: updateWorkload
      parameters:
      - $ref: '#/components/parameters/WorkloadNameParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScoreWorkload'
            examples:
              ecommerceFrontend:
                $ref: '#/components/examples/EcommerceFrontendExample'
          application/x-yaml:
            schema:
              $ref: '#/components/schemas/ScoreWorkload'
      responses:
        '200':
          description: Workload updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScoreWorkload'
              examples:
                ecommerceFrontend:
                  $ref: '#/components/examples/EcommerceFrontendExample'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - Workloads
      summary: Application Research Delete a workload
      description: Deletes a Score workload specification
      operationId: deleteWorkload
      parameters:
      - $ref: '#/components/parameters/WorkloadNameParam'
      responses:
        '204':
          description: Workload deleted successfully
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /workloads/{workloadName}/containers:
    get:
      tags:
      - Workloads
      summary: Application Research List containers in a workload
      description: Retrieves all containers defined in a workload
      operationId: listWorkloadContainers
      parameters:
      - $ref: '#/components/parameters/WorkloadNameParam'
      responses:
        '200':
          description: Successful response with container list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContainerMap'
              examples:
                ecommerceContainers:
                  $ref: '#/components/examples/EcommerceContainersExample'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
  /workloads/{workloadName}/resources:
    get:
      tags:
      - Workloads
      summary: Application Research List resources in a workload
      description: Retrieves all resource dependencies defined in a workload
      operationId: listWorkloadResources
      parameters:
      - $ref: '#/components/parameters/WorkloadNameParam'
      responses:
        '200':
          description: Successful response with resource list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceMap'
              examples:
                ecommerceResources:
                  $ref: '#/components/examples/EcommerceResourcesExample'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  examples:
    EcommerceResourcesExample:
      summary: E-commerce frontend resources
      description: Resource definitions for the e-commerce frontend workload
      value:
        postgres-db:
          type: postgres
          class: managed
          id: ecommerce.products
        cache:
          type: redis
          class: cluster
          id: ecommerce.session-cache
        session-secrets:
          type: secret
          id: ecommerce.session
        object-storage:
          type: s3
          class: standard
          id: ecommerce.assets
        uploads-volume:
          type: volume
          class: ssd
        static-assets:
          type: volume
          class: standard
          id: ecommerce.static
        tls-certs:
          type: secret
          class: tls
          id: ecommerce.tls
        feature-flags:
          type: service
          id: shared.feature-flags
    MLInferenceServiceExample:
      summary: ML Inference Service Workload
      description: A machine learning inference service with model server, request router, and A/B testing controller
      value:
        apiVersion: score.dev/v1b1
        metadata:
          name: ml-inference-service
          annotations:
            app.kubernetes.io/component: inference
            app.kubernetes.io/part-of: ml-platform
            ml.company.io/model-name: product-recommendations
            ml.company.io/model-version: 4.2.1
            ml.company.io/framework: pytorch
            gpu.company.io/required: 'true'
        service:
          ports:
            http:
              port: 8080
              targetPort: 8080
              protocol: TCP
            grpc:
              port: 8081
              targetPort: 8081
              protocol: TCP
            metrics:
              port: 9090
              targetPort: 9090
              protocol: TCP
            admin:
              port: 8082
              targetPort: 8082
              protocol: TCP
        containers:
          model-server:
            image: myacr.azurecr.io/ml-serving/inference-server:4.2.1
            command:
            - python
            - -m
            - inference_server
            args:
            - --config=/etc/model-server/config.yaml
            - --model-path=/models/current
            - --http-port=8080
            - --grpc-port=8081
            - --metrics-port=9090
            - --admin-port=8082
            variables:
              MODEL_NAME: product-recommendations
              MODEL_VERSION: 4.2.1
              PYTORCH_CUDA_ALLOC_CONF: max_split_size_mb:512
              CUDA_VISIBLE_DEVICES: '0'
              OMP_NUM_THREADS: '4'
              MKL_NUM_THREADS: '4'
              TOKENIZERS_PARALLELISM: 'false'
              MODEL_REGISTRY_URL: ${resources.model-registry.url}
              MODEL_REGISTRY_TOKEN: ${resources.model-registry-credentials.token}
              FEATURE_STORE_HOST: ${resources.feature-store.host}
              FEATURE_STORE_PORT: ${resources.feature-store.port}
              CACHE_REDIS_HOST: ${resources.inference-cache.host}
              CACHE_REDIS_PORT: ${resources.inference-cache.port}
              CACHE_TTL_SECONDS: '300'
              MAX_BATCH_SIZE: '32'
              MAX_QUEUE_DELAY_MS: '100'
              REQUEST_TIMEOUT_MS: '5000'
              DB_CONNECTION_STRING: ${resources.prediction-log-db.connection_string}
              OTEL_EXPORTER_OTLP_ENDPOINT: ${resources.observability.otlp_endpoint}
              OTEL_SERVICE_NAME: ml-inference-service
              LOG_LEVEL: INFO
              PYTHONUNBUFFERED: '1'
            files:
              /etc/model-server/config.yaml:
                content: "server:\n  name: ml-inference-service\n  version: 4.2.1\n\nmodel:\n  name: product-recommendations\n  version: 4.2.1\n  type: pytorch\n  inputSchema:\n    type: object\n    properties:\n      user_id:\n        type: string\n      product_ids:\n        type: array\n        items:\n          type: string\n      context:\n        type: object\n  outputSchema:\n    type: object\n    properties:\n      recommendations:\n        type: array\n        items:\n          type: object\n          properties:\n            product_id:\n              type: string\n            score:\n              type: number\n      confidence:\n        type: number\n\ninference:\n  batchSize: 32\n  maxQueueDelay: 100ms\n  timeout: 5s\n  warmup:\n    enabled: true\n    samples: 100\n\ncaching:\n  enabled: true\n  ttl: 300s\n  keyPrefix: \"rec:v4:\"\n\nfeatureStore:\n  enabled: true\n  features:\n    - user_embeddings\n    - product_embeddings\n    - user_history\n    - trending_products\n\nmonitoring:\n  metrics:\n    enabled: true\n    histogramBuckets:\n      - 0.005\n      - 0.01\n      - 0.025\n      - 0.05\n      - 0.1\n      - 0.25\n      - 0.5\n      - 1.0\n  logging:\n    predictionSampling: 0.01\n    errorLogging: true\n"
                mode: '0644'
              /etc/model-server/labels.json:
                source: ./config/labels.json
                mode: '0644'
                noExpand: true
            volumes:
              /models/current:
                source: ${resources.model-storage.source}
                path: product-recommendations/v4.2.1
                readOnly: true
              /models/cache:
                source: ${resources.model-cache.source}
                readOnly: false
              /data/features:
                source: ${resources.feature-cache.source}
                readOnly: false
            resources:
              requests:
                memory: 8Gi
                cpu: '4'
              limits:
                memory: 32Gi
                cpu: '8'
            readinessProbe:
              httpGet:
                path: /v1/health/ready
                port: 8082
                scheme: HTTP
                httpHeaders:
                - name: Accept
                  value: application/json
            livenessProbe:
              httpGet:
                path: /v1/health/live
                port: 8082
                scheme: HTTP
          request-router:
            image: envoyproxy/envoy:v1.28.0
            args:
            - --config-path=/etc/envoy/envoy.yaml
            - --log-level=info
            files:
              /etc/envoy/envoy.yaml:
                content: "static_resources:\n  listeners:\n    - name: http_listener\n      address:\n        socket_address:\n          address: 0.0.0.0\n          port_value: 8080\n      filter_chains:\n        - filters:\n            - name: envoy.filters.network.http_connection_manager\n              typed_config:\n                \"@type\": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager\n                stat_prefix: ingress_http\n                route_config:\n                  name: local_route\n                  virtual_hosts:\n                    - name: inference\n                      domains: [\"*\"]\n                      routes:\n                        - match:\n                            prefix: \"/v1/predict\"\n                          route:\n                            cluster: model_server\n                            timeout: 10s\n                          request_headers_to_add:\n                            - header:\n                                key: X-Request-Start\n                                value: \"%START_TIME%\"\n                http_filters:\n                  - name: envoy.filters.http.router\n                    typed_config:\n                      \"@type\": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router\n  clusters:\n    - name: model_server\n      connect_timeout: 1s\n      type: STATIC\n      lb_policy: ROUND_ROBIN\n      load_assignment:\n        cluster_name: model_server\n        endpoints:\n          - lb_endpoints:\n              - endpoint:\n                  address:\n                    socket_address:\n                      address: 127.0.0.1\n                      port_value: 8080\n"
                mode: '0644'
            resources:
              requests:
                memory: 64M
                cpu: 100m
              limits:
                memory: 256M
                cpu: 500m
            readinessProbe:
              httpGet:
                path: /ready
                port: 8001
                scheme: HTTP
          ab-controller:
            image: myacr.azurecr.io/ml-serving/ab-controller:1.5.0
            variables:
              EXPERIMENT_CONFIG_PATH: /etc/experiments/config.yaml
              MODEL_SERVER_ENDPOINT: http://127.0.0.1:8082
              METRICS_ENDPOINT: ${resources.observability.metrics_endpoint}
              EXPERIMENT_DB_URL: ${resources.experiment-db.connection_string}
            files:
              /etc/experiments/config.yaml:
                content: "experiments:\n  - name: recommendation-algorithm-v4\n    enabled: true\n    variants:\n      - name: control\n        weight: 80\n        config:\n          algorithm: collaborative-filtering\n      - name: treatment\n        weight: 20\n        config:\n          algorithm: transformer-based\n    metrics:\n      - name: click_through_rate\n        type: ratio\n      - name: conversion_rate\n        type: ratio\n      - name: latency_p99\n        type: percentile\n        percentile: 99\n"
                mode: '0644'
            resources:
              requests:
                memory: 128M
                cpu: 100m
              limits:
                memory: 256M
                cpu: 250m
            readinessProbe:
              httpGet:
                path: /health
                port: 8090
                scheme: HTTP
            livenessProbe:
              exec:
                command:
                - /bin/sh
                - -c
                - test -f /tmp/healthy
        resources:
          model-registry:
            type: service
            id: ml-platform.model-registry
            metadata:
              annotations:
                ml.company.io/component: registry
            params:
              version: '2.0'
          model-registry-credentials:
            type: secret
            id: ml-platform.registry-auth
            params:
              keys:
              - token
              - refreshToken
          feature-store:
            type: service
            class: feast
            id: ml-platform.feature-store
            params:
              offlineStore: bigquery
              onlineStore: redis
          inference-cache:
            type: redis
            class: cluster
            id: ml-platform.inference-cache
            params:
              version: '7.2'
              maxMemoryPolicy: volatile-lru
              maxMemory: 4gb
          prediction-log-db:
            type: postgres
            class: analytics
            id: ml-platform.predictions
            metadata:
              annotations:
                analytics.company.io/retention: 90d
            params:
              version: '15'
              extensions:
              - timescaledb
              partitioning:
                type: time
                interval: daily
          experiment-db:
            type: postgres
            class: standard
            id: ml-platform.experiments
            params:
              version: '15'
              size: small
          model-storage:
            type: volume
            class: nfs
            id: ml-platform.models
            metadata:
              annotations:
                storage.company.io/backup: 'true'
            params:
              size: 500Gi
              accessMode: ReadOnlyMany
          model-cache:
            type: volume
            class: ssd
            params:
              size: 100Gi
              accessMode: ReadWriteOnce
          feature-cache:
            type: volume
            class: ephemeral
            params:
              size: 20Gi
          observability:
            type: service
            id: shared.observability
            params:
              traces: true
              metrics: true
              logs: true
              customMetrics:
              - prediction_latency
              - batch_size
              - cache_hit_rate
    EcommerceContainersExample:
      summary: E-commerce frontend containers
      description: Container definitions for the e-commerce frontend workload
      value:
        frontend:
          image: ghcr.io/myorg/ecommerce-frontend:2.5.0
          command:
          - /usr/bin/node
          args:
          - server.js
          - --config=/etc/app/config.json
          resources:
            requests:
              memory: 256M
              cpu: 250m
            limits:
              memory: 1Gi
              cpu: '1'
        nginx-sidecar:
          image: nginx:1.25-alpine
          resources:
            requests:
              memory: 64M
              cpu: 50m
            limits:
              memory: 128M
              cpu: 200m
    ConflictErrorExample:
      summary: Conflict error
      description: Example error response when workload already exists
      value:
        error:
          code: CONFLICT
          message: Workload 'ecommerce-frontend' already exists
    InternalErrorExample:
      summary: Internal server error
      description: Example error response for server errors
      value:
        error:
          code: INTERNAL_ERROR
          message: An unexpected error occurred
          details:
            requestId: req-abc123
    NotFoundErrorExample:
      summary: Not found error
      description: Example error response when workload is not found
      value:
        error:
          code: NOT_FOUND
          message: Workload 'my-workload' not found
    DataPipelineWorkerExample:
      summary: Data Pipeline Worker Workload
      description: A data processing worker with Kafka integration and metrics exporter
      value:
        apiVersion: score.dev/v1b1
        metadata:
          name: data-pipeline-worker
          annotations:
            app.kubernetes.io/component: worker
            app.kubernetes.io/part-of: data-platform
            processing.company.io/queue: high-priority
            monitoring.company.io/alerts: critical
        service:
          ports:
            metrics:
              port: 9090
              targetPort: 9090
              protocol: TCP
            health:
              port: 8081
              targetPort: 8081
              protocol: TCP
        containers:
          worker:
            image: 123456789012.dkr.ecr.us-west-2.amazonaws.com/data-worker:3.1.0
            command:
            - /app/worker
            args:
            - --config=/etc/worker/config.yaml
            - --workers=4
            - --batch-size=1000
            - --log-format=json
            variables:
              WORKER_ID: ${metadata.name}
              KAFKA_BROKERS: ${resources.kafka-cluster.brokers}
              KAFKA_TOPIC_INPUT: raw-events
              KAFKA_TOPIC_OUTPUT: processed-events
              KAFKA_CONSUMER_GROUP: data-pipeline-workers
              SCHEMA_REGISTRY_URL: ${resources.schema-registry.url}
              MONGODB_URI: ${resources.timeseries-db.uri}
              MONGODB_DATABASE: analytics
              S3_BUCKET: ${resources.data-lake.bucket}
              S3_REGION: ${resources.data-lake.region}
              AWS_ACCESS_KEY_ID: ${resources.aws-credentials.access_key_id}
              AWS_SECRET_ACCESS_KEY: ${resources.aws-credentials.secret_access_key}
              CHECKPOINT_INTERVAL_MS: '60000'
              MAX_POLL_RECORDS: '500'
              PROCESSING_TIMEOUT_MS: '30000'
              DEAD_LETTER_TOPIC: failed-events
              METRICS_PORT: '9090'
              HEALTH_PORT: '8081'
              OTEL_EXPORTER_OTLP_ENDPOINT: ${resources.observability.otlp_endpoint}
              OTEL_SERVICE_NAME: data-pipeline-worker
            files:
              /etc/worker/config.yaml:
                content: "worker:\n  name: ${metadata.name}\n  parallelism: 4\n  batchSize: 1000\n  flushInterval: 5s\n\nkafka:\n  consumer:\n    autoOffsetReset: earliest\n    enableAutoCommit: false\n    maxPollIntervalMs: 300000\n  producer:\n    acks: all\n    retries: 3\n    compressionType: snappy\n\nprocessing:\n  transforms:\n    - name: parse-json\n      type: json-parser\n    - name: enrich-geo\n      type: geo-lookup\n      config:\n        database: /data/geoip/GeoLite2-City.mmdb\n    - name: anonymize-pii\n      type: pii-filter\n      config:\n        fields:\n          - email\n          - phone\n          - ip_address\n    - name: aggregate-metrics\n      type: aggregator\n      config:\n        window: 1m\n        groupBy:\n          - country\n          - device_type\n\noutput:\n  formats:\n    - parquet\n    - json\n  partitioning:\n    type: time\n    granularity: hourly\n"
                mode: '0644'
              /etc/worker/schemas/event.avsc:
                source: ./schemas/event.avsc
                mode: '0644'
                noExpand: true
              /etc/worker/schemas/output.avsc:
                source: ./schemas/output.avsc
                mode: '0644'
                noExpand: true
            volumes:
              /data/geoip:
                source: ${resources.geoip-database.source}
                readOnly: true
              /data/checkpoints:
                source: ${resources.checkpoint-volume.source}
                readOnly: false
              /data/tmp:
                source: ${resources.scratch-volume.source}
                path: worker-tmp
                readOnly: false
            resources:
              requests:
                memory: 2Gi
                cpu: '1'
              limits:
                memory: 8Gi
                cpu: '4'
            readinessProbe:
              httpGet:
                path: /ready
                port: 8081
                scheme: HTTP
            livenessProbe:
              exec:
                command:
                - /app/healthcheck
                - --check=kafka-connection
                - --check=mongodb-connection
                - --timeout=10s
          metrics-exporter:
            image: prom/statsd-exporter:v0.24.0
            args:
            - --statsd.listen-udp=:9125
            - --web.listen-address=:9102
            - --statsd.mapping-config=/etc/statsd/mapping.yaml
            files:
              /etc/statsd/mapping.yaml:
                content: "mappings:\n  - match: \"worker.*.processing.*\"\n    name: \"worker_processing\"\n    labels:\n      worker_id: \"$1\"\n      metric: \"$2\"\n  - match: \"worker.*.kafka.*\"\n    name: \"worker_kafka\"\n    labels:\n      worker_id: \"$1\"\n      operation: \"$2\"\n  - match: \"worker.*.errors.*\"\n    name: \"worker_errors_total\"\n    labels:\n      worker_id: \"$1\"\n      error_type: \"$2\"\n"
                mode: '0644'
            resources:
              requests:
                memory: 32M
                cpu: 25m
              limits:
                memory: 64M
                cpu: 100m
            readinessProbe:
              httpGet:
                path: /metrics
                port: 9102
                scheme: HTTP
        resources:
          kafka-cluster:
            type: kafka
            class: managed
            id: data-platform.events
            metadata:
              annotations:
                kafka.company.io/retention: 7d
                kafka.company.io/partitions: '24'
            params:
              version: '3.5'
              securityProtocol: SASL_SSL
              saslMechanism: SCRAM-SHA-512
          schema-registry:
            type: service
            id: data-platform.schema-registry
            params:
              compatibilityLevel: BACKWARD
          timeseries-db:
            type: mongodb
            class: timeseries
            id: analytics.metrics
            params:
              version: '7.0'
              sharded: true
              replicaSet: analytics-rs
              writeConcern: majority
          data-lake:
            type: s3
            class: data-lake
            id: analytics.raw-data
            metadata:
              annotations:
                storage.company.io/tier: intelligent-tiering
            params:
              versioning: false
              lifecycle:
              - prefix: raw/
                transitionDays: 30
                storageClass: GLACIER
              - prefix: processed/
                expirationDays: 365
          aws-credentials:
            type: secret
            class: aws-iam
            id: data-platform.s3-access
            params:
              policy: s3-read-write
          geoip-database:
            type: volume
            class: configmap
            id: shared.geoip
            params:
              updateSchedule: weekly
          checkpoint-volume:
            type: volume
            class: ssd
            params:
              size: 100Gi
              accessMode: ReadWriteOnce
          scratch-volume:
            type: volume
            class: ephemeral
            params:
              size: 50Gi
          observability:
            type: service
            id: shared.observability
            params:
              traces: true
              metrics: true
              logs: true
    EcommerceFrontendExample:
      summary: E-commerce Frontend Workload
      description: A complete e-commerce frontend application with nginx sidecar
      value:
        apiVersion: score.dev/v1b1
        metadata:
          name: ecommerce-frontend
          annotations:
            app.kubernetes.io/part-of: ecommerce-platform
            app.kubernetes.io/version: 2.5.0
            team.company.io/owner: frontend-team
            deployment.company.io/tier: production
        service:
          ports:
            web:
              port: 443
              targetPort: 8080
              protocol: TCP
            metrics:
              port: 9090
              targetPort: 9090
              protocol: TCP
        containers:
          frontend:
            image: ghcr.io/myorg/ecommerce-frontend:2.5.0
            command:
            - /usr/bin/node
            args:
            - server.js
            - --config=/etc/app/config.json
            - --log-level=info
            variables:
              NODE_ENV: production
              API_BASE_URL: https://api.ecommerce.example.com
              CACHE_TTL: '3600'
              SESSION_SECRET: ${resources.session-secrets.secret}
              DATABASE_URL: ${resources.postgres-db.connection_string}
              REDIS_HOST: ${resources.cache.host}
              REDIS_PORT: ${resources.cache.port}
              STORAGE_BUCKET: ${resources.object-storage.bucket}
              CDN_URL: https://cdn.ecommerce.example.com
              FEATURE_FLAGS_ENDPOINT: ${resources.feature-flags.endpoint}
            files:
              /etc/app/config.json:
                content: "{\n  \"appName\": \"E-Commerce Frontend\",\n  \"version\": \"2.5.0\",\n  \"features\": {\n    \"darkMode\": true,\n    \"recommendations\": true,\n    \"liveChat\": false\n  },\n  \"analytics\": {\n    \"enabled\": true,\n    \"sampleRate\": 0.1\n  }\n}\n"
                mode: '0644'
              /etc/app/locales/en.json:
                source: ./locales/en.json
                mode: '0644'
              /etc/ssl/certs/internal-ca.crt:
                source: ./certs/internal-ca.crt
                mode: '0444'
                noExpand: true
              /etc/app/banner.png:
                binaryContent: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==
                mode: '0644'
            volumes:
              /data/uploads:
                source: ${resources.uploads-volume.source}
                readOnly: false
              /data/static:
                source: ${resources.static-assets.source}
                path: assets/v2
                readOnly: true
            resources:
              requests:
                memory: 256M
                cpu: 250m
              limits:
                memory: 1Gi
                cpu: '1'
            readinessProbe:
              httpGet:
                path: /health/ready
                port: 8080
                scheme: HTTP
                httpHeaders:
                - name: X-Health-Check
                  value: readiness
            livenessProbe:
              httpGet:
                path: /health/live
                port: 8080
                scheme: HTTP
          nginx-sidecar:
            image: nginx:1.25-alpine
            variables:
              NGINX_WORKER_PROCESSES: auto
              NGINX_WORKER_CONNECTIONS: '1024'
            files:
              /etc/nginx/nginx.conf:
                content: "worker_processes auto;\nevents {\n  worker_connections 1024;\n}\nhttp {\n  upstream frontend {\n    server 127.0.0.1:8080;\n  }\n  server {\n    listen 443 ssl;\n    ssl_certificate /etc/ssl/certs/tls.crt;\n    ssl_certificate_key /etc/ssl/private/tls.key;\n    location / {\n      proxy_pass http://frontend;\n      proxy_set_header Host $host;\n      proxy_s

# --- truncated at 32 KB (51 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/application-research/refs/heads/main/openapi/application-research-workloads-api-openapi.yml