Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
apiVersion: v2
name: dynamo-crds
description: A Helm chart for CRDs of dynamo operator
description: A Helm chart for dynamo CRDs
type: application
version: 0.1.6
dependencies: []
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.4
# never delete this resource with helm delete
helm.sh/resource-policy: keep
name: dynamocomponentdeployments.nvidia.com
spec:
group: nvidia.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.4
# never delete this resource with helm delete
helm.sh/resource-policy: keep
name: dynamocomponents.nvidia.com
spec:
group: nvidia.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.4
# never delete this resource with helm delete
helm.sh/resource-policy: keep
name: dynamographdeployments.nvidia.com
spec:
group: nvidia.com
Expand Down
23 changes: 13 additions & 10 deletions deploy/cloud/helm/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export ENABLE_LWS="${ENABLE_LWS:=false}"

# Add command line options
INTERACTIVE=false

INSTALL_CRDS=false
# Parse command line arguments
while [[ $# -gt 0 ]]; do
key="$1"
Expand All @@ -50,11 +50,16 @@ while [[ $# -gt 0 ]]; do
INTERACTIVE=true
shift
;;
--crds)
INSTALL_CRDS=true
shift
;;
--help)
echo "Usage: $0 [options]"
echo "Options:"
echo " --interactive Run in interactive mode"
echo " --help Show this help message"
echo " --crds Also install the CRDs"
exit 0
;;
*)
Expand Down Expand Up @@ -115,15 +120,6 @@ retry_command "$HELM_CMD repo add bitnami https://charts.bitnami.com/bitnami" 5
retry_command "$HELM_CMD repo add minio https://charts.min.io/" 5 5 && \
retry_command "$HELM_CMD repo update" 5 5

cd platform
cd components/operator
retry_command "$HELM_CMD dependency update" 5 5
cd ../..
cd components/api-store
retry_command "$HELM_CMD dependency update" 5 5
cd ../..
retry_command "$HELM_CMD dep update" 7 5
cd ..

# Generate the values file
echo "Generating values file with:"
Expand All @@ -143,6 +139,7 @@ echo "INGRESS_CLASS: $INGRESS_CLASS"
echo "ISTIO_GATEWAY: $ISTIO_GATEWAY"
echo "DYNAMO_INGRESS_SUFFIX: $DYNAMO_INGRESS_SUFFIX"
echo "VIRTUAL_SERVICE_SUPPORTS_HTTPS: $VIRTUAL_SERVICE_SUPPORTS_HTTPS"
echo "INSTALL_CRDS: $INSTALL_CRDS"

envsubst '${NAMESPACE} ${RELEASE_NAME} ${DOCKER_USERNAME} ${DOCKER_PASSWORD} ${DOCKER_SERVER} ${IMAGE_TAG} ${DYNAMO_INGRESS_SUFFIX} ${PIPELINES_DOCKER_SERVER} ${PIPELINES_DOCKER_USERNAME} ${PIPELINES_DOCKER_PASSWORD} ${DOCKER_SECRET_NAME} ${INGRESS_ENABLED} ${ISTIO_ENABLED} ${INGRESS_CLASS} ${ISTIO_GATEWAY} ${VIRTUAL_SERVICE_SUPPORTS_HTTPS} ${ENABLE_LWS}' < dynamo-platform-values.yaml > generated-values.yaml
echo "generated file contents:"
Expand All @@ -157,6 +154,12 @@ cd platform
retry_command "$HELM_CMD dep build" 5 5
cd ..

# Install/upgrade the helm chart for the CRDs
if [ "$INSTALL_CRDS" = true ]; then
echo "Installing/upgrading helm chart for the CRDs..."
$HELM_CMD upgrade --install dynamo-crds crds/ --namespace default --wait --atomic
fi

# Install/upgrade the helm chart
echo "Installing/upgrading helm chart..."
$HELM_CMD upgrade --install $RELEASE_NAME platform/ \
Expand Down
6 changes: 6 additions & 0 deletions deploy/cloud/helm/dynamo-platform-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ dynamo-api-store:
- path: /
pathType: Prefix

postgresql:
enabled: true

minio:
enabled: true

etcd:
enabled: true
persistence:
Expand Down
8 changes: 8 additions & 0 deletions deploy/cloud/helm/platform/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,11 @@ dependencies:
version: 11.1.0
repository: "https://charts.bitnami.com/bitnami"
condition: etcd.enabled
- name: postgresql
version: 16.6.2
repository: "https://charts.bitnami.com/bitnami"
condition: postgresql.enabled
- name: minio
version: 16.0.2
repository: "https://charts.bitnami.com/bitnami"
condition: minio.enabled
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,4 @@ description: A Helm chart for the Dynamo API Store component
type: application
version: 0.1.0
appVersion: "1.0.0"
dependencies:
- name: postgresql
version: "16.6.2" # This is an example; update with the latest version if needed
repository: "https://charts.bitnami.com/bitnami"
- name: minio
version: "16.0.2"
repository: "https://charts.bitnami.com/bitnami"
dependencies: []
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
initContainers:
- name: wait-for-postgres
image: busybox
command: [ 'sh', '-c', 'until nc -z {{ .Release.Name }}-postgresql 5432; do echo "PostgreSQL is unavailable. Sleeping for 5 seconds"; sleep 5; done;' ]
command: [ 'sh', '-c', 'until nc -z {{ .Values.postgresql.host | default (printf "%s-postgresql" .Release.Name) }} {{ .Values.postgresql.port | default 5432 }}; do echo "PostgreSQL is unavailable. Sleeping for 5 seconds"; sleep 5; done;' ]
containers:
- name: "api-store"
securityContext:
Expand All @@ -61,17 +61,17 @@ spec:
{{- end }}
env:
- name: DB_HOST
value: "{{ .Release.Name }}-postgresql"
value: '{{ .Values.postgresql.host | default (printf "%s-postgresql" .Release.Name) }}'
- name: DB_USER
value: {{ .Values.postgresql.auth.username | quote }}
value: '{{ .Values.postgresql.user | default "admin" }}'
- name: DB_NAME
value: {{ .Values.postgresql.auth.database | quote }}
value: '{{ .Values.postgresql.database | default "dynamo" }}'
- name: DB_PORT
value: "5432"
value: '{{ .Values.postgresql.port | default 5432 }}'
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-postgresql"
name: '{{ .Values.postgresql.passwordSecret | default (printf "%s-postgresql" .Release.Name) }}'
key: password
- name: SERVICE_PORT
value: "8000"
Expand All @@ -84,15 +84,15 @@ spec:
- name: DYN_OBJECT_STORE_ID
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-minio"
name: '{{ .Values.minio.passwordSecret | default (printf "%s-minio" .Release.Name) }}'
key: root-user
- name: DYN_OBJECT_STORE_KEY
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-minio"
name: '{{ .Values.minio.passwordSecret | default (printf "%s-minio" .Release.Name) }}'
key: root-password
- name: DYN_OBJECT_STORE_ENDPOINT
value: "http://{{ .Release.Name }}-minio:9000"
value: 'http://{{ .Values.minio.host | default (printf "%s-minio" .Release.Name) }}:{{ .Values.minio.port | default 9000 }}'
envFrom:
- secretRef:
name: dynamo-deployment-env
Expand Down
67 changes: 11 additions & 56 deletions deploy/cloud/helm/platform/components/api-store/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,55 +91,18 @@ istio:
host: ""
gateway: ""

## In-cluster minio deployment configuration
## ref: https://github.com/bitnami/charts/blob/minio/13.3.1/bitnami/minio/values.yaml
## @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
postgresql:
host: ""
port: 5432
# allow to override the secret name containing the postgres password
passwordSecret: ""
database: "dynamo"

minio:
mode: standalone
auth:
rootUser: minioadmin
rootPassword: minioadmin
persistence:
enabled: true
size: 10Gi
storageClass: ""
mountPath: /data
annotations:
helm.sh/resource-policy: keep
apiIngress:
enabled: false
ingressClassName: ""
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
host: ""
port: 9000
# allow to override the secret name containing the minio username and password
passwordSecret: ""

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand All @@ -157,14 +120,6 @@ dynamo:
apiStore:
port: 8000

postgresql:
auth:
existingSecret: ""
postgresPassword: ""
username: "admin"
password: "password"
database: "dynamo"

# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
livenessProbe:
httpGet:
Expand Down
4 changes: 0 additions & 4 deletions deploy/cloud/helm/platform/components/operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,3 @@ version: 0.1.7
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.0"
dependencies:
- name: dynamo-crds
version: 0.1.6
repository: file://charts/dynamo-crds
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,7 @@ metricsService:
port: 8443
protocol: TCP
targetPort: https
type: ClusterIP
type: ClusterIP

natsAddr: ""
etcdAddr: ""
73 changes: 61 additions & 12 deletions deploy/cloud/helm/platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,69 @@ dynamo-api-store:
paths:
- path: /
pathType: Prefix
postgresql:
primary:
persistence:
enabled: false
minio:

## In-cluster minio deployment configuration
## ref: https://github.com/bitnami/charts/blob/minio/13.3.1/bitnami/minio/values.yaml
## @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
rootPassword: minioadmin
persistence:
enabled: true
size: 10Gi
storageClass: ""
mountPath: /data
annotations:
helm.sh/resource-policy: keep
apiIngress:
enabled: false
ingressClassName: ""
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

postgresql:
enabled: false
auth:
existingSecret: ""
postgresPassword: ""
username: "admin"
password: "password"
database: "dynamo"
primary:
persistence:
enabled: true
size: 5Gi
storageClass: ""
apiIngress:
enabled: false
ingressClassName: nginx
hostname: minio.example.com
pathType: Prefix

etcd:
enabled: false
Expand Down
8 changes: 5 additions & 3 deletions docs/guides/dynamo_deploy/dynamo_cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,20 @@ kubectl create namespace $NAMESPACE
kubectl config set-context --current --namespace=$NAMESPACE
```

3. Deploy the helm chart using the deploy script:
3. Deploy the Helm charts (install CRDs first, then platform) using the deployment script:

```bash
./deploy.sh
./deploy.sh --crds
```

if you wish to be guided through the deployment process, you can run the deploy script with the `--interactive` flag:

```bash
./deploy.sh --interactive
./deploy.sh --crds --interactive
```

omitting `--crds` will skip the CRDs installation/upgrade. This is useful when installing on a shared cluster as CRDs are cluster-scoped resources.

4. **Expose Dynamo Cloud Externally**

``` {note}
Expand Down
Loading