Skip to content

Commit

Permalink
Do not deploy nginx if pvc is not deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
mjasion committed Aug 23, 2023
1 parent c88d173 commit 6532e37
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 17 deletions.
2 changes: 1 addition & 1 deletion charts/studio/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: studio
description: A Helm chart for Kubernetes
type: application
version: 0.4.5
version: 0.5.2
appVersion: "v2.29.0"
maintainers:
- name: iterative
Expand Down
16 changes: 6 additions & 10 deletions charts/studio/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# studio

![Version: 0.4.5](https://img.shields.io/badge/Version-0.4.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.29.0](https://img.shields.io/badge/AppVersion-v2.29.0-informational?style=flat-square)
![Version: 0.5.2](https://img.shields.io/badge/Version-0.5.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.29.0](https://img.shields.io/badge/AppVersion-v2.29.0-informational?style=flat-square)

A Helm chart for Kubernetes

Expand All @@ -14,7 +14,6 @@ A Helm chart for Kubernetes

| Repository | Name | Version |
|------------|------|---------|
| https://charts.bitnami.com/bitnami | nginx | 13.2.30 |
| https://charts.bitnami.com/bitnami | postgresql | 11.9.13 |
| https://charts.bitnami.com/bitnami | redis | 17.14.3 |
| https://ray-project.github.io/kuberay-helm | kuberay-operator | 0.6.0 |
Expand All @@ -27,7 +26,7 @@ A Helm chart for Kubernetes
| global.blobvault.accessKeyId | string | `""` | Blobvault S3 access key ID |
| global.blobvault.bucket | string | `""` | Blobvault S3 bucket name |
| global.blobvault.endpointUrl | string | `""` | Blobvault S3 endpoint URL |
| global.blobvault.persistentVolume | object | `{"accessModes":["ReadWriteOnce"],"size":"30Gi","storageClassName":""}` | Blobvault local backing store settings. |
| global.blobvault.persistentVolume | object | `{"accessModes":["ReadWriteOnce"],"size":"30Gi","storageClassName":""}` | Blobvault local backing store settings. Not used when `global.blobvault.bucket` is set. |
| global.blobvault.persistentVolume.accessModes | list | ReadWriteOnce | Blobvault local backing store access mode. |
| global.blobvault.persistentVolume.size | string | `"30Gi"` | Blobvault local backing store size. |
| global.blobvault.persistentVolume.storageClassName | string | default storage class in the cluster. | Blobvault local backing store storage class. |
Expand Down Expand Up @@ -84,13 +83,6 @@ A Helm chart for Kubernetes
| global.scmProviders.webhookHost | string | `$global.host` value. | Custom hostname for incoming webhook (if Studio runs on a private network and you use SaaS versions of GitHub, GitLab, or Bitbucket) |
| global.secretKey | string | `""` | Studio: Secret key for signing Webhook payloads We recommend you set this externally. If left empty, a random key will be generated. |
| imagePullSecrets | list | `[]` | Secret containing Docker registry credentials |
| nginx.extraVolumeMounts[0].mountPath | string | `"/blobvault"` | |
| nginx.extraVolumeMounts[0].name | string | `"blobvault"` | |
| nginx.extraVolumes[0].name | string | `"blobvault"` | |
| nginx.extraVolumes[0].persistentVolumeClaim.claimName | string | `"blobvault"` | |
| nginx.ingress.enabled | bool | `false` | |
| nginx.serverBlock | string | see in `values.yaml` | Nginx for blobvault configuration |
| nginx.service.type | string | `"ClusterIP"` | |
| pgBouncer | object | `{"affinity":{},"autoscaling":{"enabled":false,"maxReplicas":5,"minReplicas":1,"targetCPUUtilizationPercentage":80},"enabled":false,"envFromSecret":"","envVars":{},"image":{"pullPolicy":"IfNotPresent","repository":"docker.io/bitnami/pgbouncer","tag":"1.20.1"},"nodeSelector":{},"podAnnotations":{},"podSecurityContext":{},"replicaCount":1,"resources":{"limits":{"cpu":"1000m","memory":"1024Mi"},"requests":{"cpu":"500m","memory":"512Mi"}},"securityContext":{},"service":{"port":6432,"type":"ClusterIP"},"serviceAccountName":"","tolerations":[]}` | PgBouncer settings group |
| pgBouncer.affinity | object | `{}` | PgBouncer pod affinity configuration |
| pgBouncer.autoscaling | object | `{"enabled":false,"maxReplicas":5,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | PgBouncer autoscaling configuration |
Expand Down Expand Up @@ -143,6 +135,10 @@ A Helm chart for Kubernetes
| studioBeat | object | `{"affinity":{},"autoscaling":{"enabled":false,"maxReplicas":5,"minReplicas":1,"targetCPUUtilizationPercentage":80},"envFromSecret":"","envVars":{},"fullnameOverride":"","nameOverride":"","nodeSelector":{},"podAnnotations":{},"podSecurityContext":{},"replicaCount":1,"resources":{"limits":{"cpu":"200m","memory":"256Mi"},"requests":{"cpu":"100m","memory":"128Mi"}},"securityContext":{},"tolerations":[]}` | Studio Beat settings group |
| studioBeat.envFromSecret | string | `""` | The name of an existing Secret that contains sensitive environment variables passed to beat pods. |
| studioBeat.envVars | object | `{}` | Additional environment variables for beat pods |
| studioBlobvault | object | `{"image":{"repository":"nginx","tag":"1.25.1-alpine"},"podSecurityContext":{},"securityContext":{},"service":{"port":80}}` | Studio: Additional service to expose the blobvault files generated by the worker It is enabled automatically if the worker is scaled to 1 replica and no bucket is configured |
| studioBlobvault.image | object | `{"repository":"nginx","tag":"1.25.1-alpine"}` | Image to use for the blobvault service |
| studioBlobvault.image.repository | string | `"nginx"` | Image repository |
| studioBlobvault.image.tag | string | `"1.25.1-alpine"` | Image tag |
| studioDvcxWorker | object | `{"affinity":{},"autoscaling":{"enabled":false,"maxReplicas":5,"minReplicas":1,"targetCPUUtilizationPercentage":80},"envFromSecret":"","envVars":{},"ephemeralStorage":{"persistentVolumeClaim":{"storageClass":""},"size":"1Gi","type":"emptyDir"},"image":{"pullPolicy":"IfNotPresent","repository":"docker.iterative.ai/studio-dvcx-worker"},"nodeSelector":{},"podAnnotations":{},"podSecurityContext":{},"replicaCount":1,"resources":{"limits":{"cpu":"8000m","ephemeral-storage":"10Gi","memory":"16Gi"},"requests":{"cpu":"500m","ephemeral-storage":"500Mi","memory":"512Mi"}},"securityContext":{},"tolerations":[]}` | Studio DVCx Worker settings group |
| studioDvcxWorker.affinity | object | `{}` | DVCx worker pod affinity configuration |
| studioDvcxWorker.autoscaling | object | `{"enabled":false,"maxReplicas":5,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | DVCx worker autoscaling configuration |
Expand Down
2 changes: 2 additions & 0 deletions charts/studio/templates/configmap-studio-blobvault-nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if not .Values.global.blobvault.bucket }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -60,3 +61,4 @@ data:
return 200 'OK';
}
}
{{- end }}
4 changes: 4 additions & 0 deletions charts/studio/templates/deployment-studio-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ spec:
failureThreshold: 5
timeoutSeconds: 60
volumeMounts:
{{ if not .Values.global.blobvault.bucket }}
- name: blobvault
mountPath: /blobvault
{{- end }}
- name: studio-ca-certificates
mountPath: /usr/local/share/ca-certificates
resources:
Expand Down Expand Up @@ -163,9 +165,11 @@ spec:
memory: 256Mi
{{- end }}
volumes:
{{ if not .Values.global.blobvault.bucket }}
- name: blobvault
persistentVolumeClaim:
claimName: blobvault
{{- end }}
- name: studio-ca-certificates
configMap:
name: studio-ca-certificates
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if not .Values.global.blobvault.bucket }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -85,3 +86,4 @@ spec:
labelSelector:
matchLabels:
{{- include "studio-worker.selectorLabels" . | nindent 18 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{.Release.Name}}-blobvault-nginx
labels:
"app.kubernetes.io/managed-by": "Helm"
annotations:
helm.sh/hook: post-install,post-upgrade
helm.sh/hook-weight: "-1"
meta.helm.sh/release-name: {{ .Release.Name }}
meta.helm.sh/release-namespace: {{.Release.Namespace}}
argocd.argoproj.io/hook: PostSync
{{- with .Values.global.ingress.annotations }}
{{- toYaml . | nindent 4 }}
Expand All @@ -34,6 +36,7 @@ spec:
secretName: {{ .tlsSecretName }}
{{- end }}
{{- end }}

rules:
- http:
paths:
Expand All @@ -60,4 +63,3 @@ spec:
{{- end }}
{{- end }}
{{- end }}

5 changes: 4 additions & 1 deletion charts/studio/templates/ingress-studio-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ metadata:
name: {{ .Release.Name }}-studio-api
labels:
{{- include "studio-ui.labels" . | nindent 4 }}
"app.kubernetes.io/managed-by": "Helm"
annotations:
meta.helm.sh/release-name: {{ .Release.Name }}
meta.helm.sh/release-namespace: {{.Release.Namespace}}
helm.sh/hook: post-install,post-upgrade
helm.sh/hook-weight: "-1"
helm.sh/resource-policy: "delete"
argocd.argoproj.io/hook: PostSync
{{- with .Values.global.ingress.annotations }}
{{- toYaml . | nindent 4 }}
Expand Down
5 changes: 4 additions & 1 deletion charts/studio/templates/ingress-studio-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ metadata:
name: {{ .Release.Name }}-studio-ui
labels:
{{- include "studio-ui.labels" . | nindent 4 }}
"app.kubernetes.io/managed-by": "Helm"
annotations:
meta.helm.sh/release-name: {{ .Release.Name }}
meta.helm.sh/release-namespace: {{.Release.Namespace}}
helm.sh/hook: post-install,post-upgrade
helm.sh/hook-weight: "-1"
helm.sh/resource-policy: "delete"
argocd.argoproj.io/hook: PostSync
{{- with .Values.global.ingress.annotations }}
{{- toYaml . | nindent 4 }}
Expand Down
5 changes: 4 additions & 1 deletion charts/studio/templates/ingress-studio-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ metadata:
name: {{ .Release.Name }}-studio-webhook
labels:
{{- include "studio-ui.labels" . | nindent 4 }}
"app.kubernetes.io/managed-by": "Helm"
annotations:
meta.helm.sh/release-name: {{ .Release.Name }}
meta.helm.sh/release-namespace: {{.Release.Namespace}}
helm.sh/hook: post-install,post-upgrade
helm.sh/hook-weight: "-1"
helm.sh/resource-policy: "delete"
argocd.argoproj.io/hook: PostSync
{{- with .Values.global.ingress.annotations }}
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/studio/templates/service-blobvault-nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if not .Values.global.blobvault.bucket }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -13,3 +14,4 @@ spec:
name: http
selector:
{{- include "studio-blobvault-nginx.selectorLabels" . | nindent 4 }}
{{- end }}

0 comments on commit 6532e37

Please sign in to comment.