Skip to content

Commit

Permalink
Small tweaks on Helm charts
Browse files Browse the repository at this point in the history
  • Loading branch information
n1t0 committed Nov 28, 2022
1 parent 3012da6 commit 06ba611
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 deletions.
2 changes: 2 additions & 0 deletions chart/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
.idea/
*.tmproj
.vscode/
# Helm envs
env
2 changes: 2 additions & 0 deletions chart/env/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ reverseProxy:
operator: Equal

ingress:
tls:
hosts: "datasets-server.huggingface.co"
annotations:
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-1:707930574880:certificate/971187a3-2baa-40e5-bcae-94d6ec55cd24
alb.ingress.kubernetes.io/load-balancer-name: "hub-datasets-server-prod"
Expand Down
4 changes: 4 additions & 0 deletions chart/templates/_envCommon.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
{{- if .Values.secrets.token.fromSecret }}
valueFrom:
secretKeyRef:
{{- if eq .Values.secrets.token.secretName "" }}
name: {{ .Release.Name }}-datasets-server-app-token
{{- else }}
name: {{ .Values.secrets.token.secretName | quote }}
{{- end }}
key: HF_TOKEN
optional: false
{{- else }}
Expand Down
7 changes: 1 addition & 6 deletions chart/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ metadata:
name: {{ include "release" . }}
namespace: {{ .Release.Namespace }}
spec:
{{- if .Values.ingress.tls.enabled }}
tls:
- hosts:
- {{ .Values.hostname }}
secretName: {{ .Values.ingress.tls.secretName }}
{{- end}}
tls: {{ toYaml .Values.ingress.tls | nindent 4 }}
rules:
- host: {{ .Values.hostname }}
http:
Expand Down
2 changes: 2 additions & 0 deletions chart/templates/jobs/mongodb-migration/job.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2022 The HuggingFace Authors.

{{- if .Values.dockerImage.jobs.mongodbMigration }}
apiVersion: batch/v1
kind: Job
metadata:
Expand All @@ -25,3 +26,4 @@ spec:
volumes: {{ include "volumeData" . | nindent 8 }}
securityContext: {{ include "securityContext" . | nindent 8 }}
backoffLimit: 0
{{- end}}
2 changes: 1 addition & 1 deletion chart/templates/worker/splits/_container.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{- define "containerWorkerSplits" -}}
- name: "{{ include "name" . }}-worker-splits"
image: {{ .Values.dockerImage.workers.splits }}
imagePullPolicy: IfNotPresent
imagePullPolicy: {{ .Values.dockerImage.pullPolicy }}
env:
{{ include "envCache" . | nindent 2 }}
{{ include "envQueue" . | nindent 2 }}
Expand Down
16 changes: 5 additions & 11 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ secrets:
value: mongo://
token:
fromSecret: false
secretName: "datasets-server-hf-token"
value: hf_app
secretName: ""
value: "hf_app"

uid: 1000
gid: 3000
Expand All @@ -35,6 +35,7 @@ imagePullSecrets: []

# overridden by docker-images.yaml (which must be in JSON format!)
dockerImage:
pullPolicy: IfNotPresent
reverseProxy: ""
jobs:
mongodb_migration: ""
Expand Down Expand Up @@ -115,15 +116,8 @@ reverseProxy:
tolerations: []

ingress:
tls:
enabled: false
secretName: ""
annotations:
alb.ingress.kubernetes.io/healthcheck-path: "/healthcheck"
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80, "HTTPS": 443}]'
alb.ingress.kubernetes.io/scheme: "internet-facing"
alb.ingress.kubernetes.io/group.name: "datasets-server"
kubernetes.io/ingress.class: "alb"
tls: []
annotations: {}

# --- services ---

Expand Down

0 comments on commit 06ba611

Please sign in to comment.