-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Revert "fix reverse proxy (#2063)" This reverts commit f3bf823. * Revert "remove assets and cached assets (#2040)" This reverts commit 7d1213c.
- Loading branch information
1 parent
9e8d938
commit cdc345f
Showing
26 changed files
with
202 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 The HuggingFace Authors. | ||
|
||
{{- define "initContainerAssets" -}} | ||
- name: prepare-assets | ||
image: ubuntu:focal | ||
imagePullPolicy: {{ .Values.images.pullPolicy }} | ||
command: ["/bin/sh", "-c"] | ||
args: | ||
- chown {{ .Values.uid }}:{{ .Values.gid }} /mounted-path; | ||
volumeMounts: | ||
- mountPath: /mounted-path | ||
mountPropagation: None | ||
name: volume-nfs | ||
subPath: "{{ include "assets.subpath" . }}" | ||
readOnly: false | ||
securityContext: | ||
runAsNonRoot: false | ||
runAsUser: 0 | ||
runAsGroup: 0 | ||
{{- end -}} |
21 changes: 21 additions & 0 deletions
21
chart/templates/_initContainers/_initContainerCachedAssets.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 The HuggingFace Authors. | ||
|
||
{{- define "initContainerCachedAssets" -}} | ||
- name: prepare-cached-assets | ||
image: ubuntu:focal | ||
imagePullPolicy: {{ .Values.images.pullPolicy }} | ||
command: ["/bin/sh", "-c"] | ||
args: | ||
- chown {{ .Values.uid }}:{{ .Values.gid }} /mounted-path; | ||
volumeMounts: | ||
- mountPath: /mounted-path | ||
mountPropagation: None | ||
name: volume-cached-assets | ||
subPath: "{{ include "cachedAssets.subpath" . }}" | ||
readOnly: false | ||
securityContext: | ||
runAsNonRoot: false | ||
runAsUser: 0 | ||
runAsGroup: 0 | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 The HuggingFace Authors. | ||
|
||
{{- define "volumeMountAssetsRO" -}} | ||
- mountPath: {{ .Values.assets.storageDirectory | quote }} | ||
mountPropagation: None | ||
name: volume-nfs | ||
subPath: "{{ include "assets.subpath" . }}" | ||
readOnly: true | ||
{{- end -}} | ||
|
||
{{- define "volumeMountAssetsRW" -}} | ||
- mountPath: {{ .Values.assets.storageDirectory | quote }} | ||
mountPropagation: None | ||
name: volume-nfs | ||
subPath: "{{ include "assets.subpath" . }}" | ||
readOnly: false | ||
{{- end -}} |
18 changes: 18 additions & 0 deletions
18
chart/templates/_volumeMounts/_volumeMountCachedAssets.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 The HuggingFace Authors. | ||
|
||
{{- define "volumeMountCachedAssetsRO" -}} | ||
- mountPath: {{ .Values.cachedAssets.storageDirectory | quote }} | ||
mountPropagation: None | ||
name: volume-cached-assets | ||
subPath: "{{ include "cachedAssets.subpath" . }}" | ||
readOnly: true | ||
{{- end -}} | ||
|
||
{{- define "volumeMountCachedAssetsRW" -}} | ||
- mountPath: {{ .Values.cachedAssets.storageDirectory | quote }} | ||
mountPropagation: None | ||
name: volume-cached-assets | ||
subPath: "{{ include "cachedAssets.subpath" . }}" | ||
readOnly: false | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 The HuggingFace Authors. | ||
|
||
{{- define "volumeCachedAssets" -}} | ||
- name: volume-cached-assets | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.persistence.cachedAssets.existingClaim | default (include "name" .) }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 The HuggingFace Authors. | ||
|
||
{{- define "volumeNfs" -}} | ||
- name: volume-nfs | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.persistence.nfs.existingClaim | default (include "name" .) }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if (not .Values.persistence.nfs.existingClaim) }} | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
labels: {{ include "hf.labels.commons" . | nindent 4 }} | ||
name: {{ include "name" . }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
accessModes: | ||
- ReadWriteMany | ||
resources: | ||
requests: | ||
storage: {{ .Values.persistence.nfs.size }} | ||
{{ if ne "" .Values.persistence.nfs.storageClass }} | ||
storageClassName: {{ .Values.persistence.nfs.storageClass }} | ||
{{ end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.