Commit 7662de1c authored by mohammedabdulwahhab's avatar mohammedabdulwahhab Committed by GitHub
Browse files

feat: Add POST deployments endpoint to api-store service in Dynamo cloud (#582)


Co-authored-by: default avatarHannah Zhang <hannahz@nvidia.com>
Co-authored-by: default avatarJulien Mancuso <jmancuso@nvidia.com>
Co-authored-by: default avatarmabdulwahhab <mabdulwahhab@nvidia.com>
parent 0292feb5
......@@ -15,16 +15,18 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: dynamo-api-store
name: {{ include "helm.fullname" . }}
labels:
{{- include "helm.labels" . | nindent 4 }}
spec:
replicas: 1
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: dynamo-api-store
{{- include "helm.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
app: dynamo-api-store
{{- include "helm.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
......@@ -41,7 +43,8 @@ spec:
- name: "api-store"
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
imagePullPolicy: {{ .Values.storeImage.pullPolicy }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.dynamo.apiStore.port }}
......@@ -93,7 +96,6 @@ spec:
envFrom:
- secretRef:
name: dynamo-deployment-env
image: "{{ .Values.storeImage.repository }}:{{ .Values.storeImage.tag | default .Chart.AppVersion }}"
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
......
......@@ -12,12 +12,14 @@
# 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.
{{- if .Values.ingress.enabled -}}
---
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "helm.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "helm.fullname" . }}
name: {{ $fullName }}
labels:
{{- include "helm.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
......@@ -25,8 +27,8 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.ingress.className }}
ingressClassName: {{ . }}
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
......@@ -45,14 +47,12 @@ spec:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- with .pathType }}
pathType: {{ . }}
{{- end }}
pathType: {{ .pathType }}
backend:
service:
name: {{ include "helm.fullname" $ }}
name: {{ $fullName }}
port:
number: {{ $.Values.service.port }}
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
......@@ -15,15 +15,15 @@
apiVersion: v1
kind: Service
metadata:
name: "dynamo-server"
name: "dynamo-store"
labels:
{{- include "helm.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: {{ .Values.dynamo.apiServer.port }}
targetPort: {{ .Values.dynamo.apiStore.port }}
protocol: TCP
name: http
selector:
{{- include "helm.selectorLabels" . | nindent 4 }}
app: dynamo-api-store
\ No newline at end of file
......@@ -22,19 +22,11 @@ spec:
hosts:
- "{{ .Values.istio.host }}"
http:
- match:
- uri:
prefix: /api/
route:
- destination:
host: dynamo-server.{{ .Release.Namespace }}.svc.cluster.local
port:
number: 80
- match:
- uri:
prefix: /
route:
- destination:
host: dynamo-ui.{{ .Release.Namespace }}.svc.cluster.local
host: dynamo-store.{{ .Release.Namespace }}.svc.cluster.local
port:
number: 80
\ No newline at end of file
......@@ -17,7 +17,7 @@ replicaCount: 1
# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/
image:
repository: gitlab-master.nvidia.com:5005/aire/microservices/dynamo/api-server
repository: "nvcr.io/nvidian/nim-llm-dev/dynamo-api-store"
# This sets the pull policy for images.
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
......@@ -26,29 +26,11 @@ image:
# This is for the secretes for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
imagePullSecrets:
- name: nvcrimagepullsecret
- name: docker-imagepullsecret
# This is to override the chart name.
nameOverride: ""
fullnameOverride: ""
## @section objectStore
#
## Specifies the location and credentials for accessing the external Object Storage.
## @param endpoint fully qualidfied object store endpoint
## @param accessKey access key for auth
## @param accessSecret secret access key for auth
## @param region the region where bucket is hosted
## @param ssl enable ssl for object store transport
objectStore:
enabled: false
endpoint: ""
accessKey: ""
accessSecret: ""
region: ""
ssl: false
existingSecret: ""
existingSecretAccessKey: ""
existingSecretAccessSecret: ""
# This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/
serviceAccount:
# Specifies whether a service account should be created
......@@ -109,12 +91,10 @@ istio:
## In-cluster minio deployment configuration
## ref: https://github.com/bitnami/charts/blob/minio/13.3.1/bitnami/minio/values.yaml
## @param minio.enabled Enable minio deployment
## @param minio.apiIngress.enabled Enable ingress controller resource for MinIO API
## @param minio.apiIngress.ingressClassName IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
## @param minio.apiIngress.hostname Default host for the ingress resource
minio:
enabled: false
mode: standalone
auth:
rootUser: minioadmin
......@@ -123,6 +103,7 @@ minio:
enabled: true
size: 10Gi
storageClass: ""
mountPath: /data
annotations:
helm.sh/resource-policy: keep
apiIngress:
......@@ -131,6 +112,32 @@ minio:
hostname: ""
pathType: ImplementationSpecific
annotations: {}
podSecurityContext:
enabled: true
fsGroup: 1000
containerSecurityContext:
enabled: true
runAsUser: 1000
runAsNonRoot: true
readOnlyRootFilesystem: false
startupProbe:
enabled: true
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
service:
type: ClusterIP
ports:
api: 9000
console: 9001
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
......@@ -145,8 +152,6 @@ resources: {}
# memory: 128Mi
dynamo:
apiServer:
port: 8181
apiStore:
port: 8000
......
......@@ -120,9 +120,6 @@ dynamo:
cacheRepo: ''
snapshotMode: '' # options: full, redo, time
imagePullSecrets: []
kubernetesClusterDomain: cluster.local
metricsService:
......
......@@ -27,6 +27,7 @@ dynamo-operator:
imagePullSecrets:
- name: gitlab-imagepull
- name: nvcrimagepullsecret
- name: docker-imagepullsecret
controllerManager:
manager:
image:
......@@ -37,7 +38,7 @@ dynamo-api-server:
imagePullSecrets:
- name: gitlab-imagepull
- name: nvcrimagepullsecret
- name: docker-imagepullsecret
etcd:
enabled: false
replicaCount: 1
......
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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.
# ACTION REQUIRED: Export your Kubernetes namespace as $KUBE_NS
# and update the ns.yaml file with the same value
export KUBE_NS=$KUBE_NS
kubectl apply -f testing/ns.yaml
# Export your ngc api key
curl -X POST \
-H "Content-Type: application/json" \
https://${NAMESPACE}.dev.aire.nvidia.com/api/v1/clusters \
-d '{
"name": "default",
"description": "Default cluster",
"kube_config": ""
}' | jq '.'
# check out ui at https://${NAMESPACE}.dev.aire.nvidia.com
......@@ -18,14 +18,14 @@
set -euo pipefail
export DYNAMO_SEREVR="${DYNAMO_SEREVR:-http://dynamo-server}"
export DYNAMO_SERVER="${DYNAMO_SERVER:-http://dynamo-server}"
export DYNAMO_IMAGE="${DYNAMO_IMAGE:-dynamo-base:latest}"
export DEPLOYMENT_NAME="${DEPLOYMENT_NAME:-ci-hw}"
cd /workspace/examples/hello_world
# Step.1: Login to dynamo server
dynamo server login --api-token TEST-TOKEN --endpoint $DYNAMO_SEREVR
dynamo server login --api-token TEST-TOKEN --endpoint $DYNAMO_SERVER
# Step.2: build a dynamo nim with framework-less base
DYNAMO_TAG=$(dynamo build hello_world:Frontend | grep "Successfully built" | awk -F"\"" '{ print $2 }')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment