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 2683134 commit 38ac4f3
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 8 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.6
version: 0.5.1
appVersion: "v2.27.0"
maintainers:
- name: iterative
Expand Down
2 changes: 1 addition & 1 deletion charts/studio/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# studio

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

A Helm chart for Kubernetes

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 38ac4f3

Please sign in to comment.