# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you 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: StatefulSet
metadata:
  name: ops-cuda-runtime
  namespace: nuvolaris  
spec:  
  replicas: 1
  selector:
    matchLabels:
      name: ops-cuda-runtime
  template:
    metadata:
      labels:
        name: ops-cuda-runtime
        app: ops-cuda-runtime
    spec:
      restartPolicy: Always
      containers:
        - name: ops-cuda-runtime
          image: apache/openserverless-runtime-python:v3.11cuda-2409251000
          command: ["proxy"]
          env:
          - name: "OW_ACTIVATE_PROXY_SERVER"
            value: "1"
          ports:
          - containerPort: 8080
            name: proxy
---
apiVersion: v1
kind: Service
metadata:
  name: ops-cuda-service
  namespace: nuvolaris
  labels:
    name: ops-cuda-service
    app: ops-cuda-service
spec:
  selector:
    name: ops-cuda-runtime
  clusterIP: None
  ports:
  - name: proxy
    port: 8080