Skip to content

Commit

Permalink
feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074 (TencentBlueKing#1079)
Browse files Browse the repository at this point in the history
* feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074

* feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074

* feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074

* feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074

* feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074

* feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074

* feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074

* feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074

* feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074

* feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074

* feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074

* feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074

* feat: 容器化部署设置nfs挂载参数 TencentBlueKing#1074
  • Loading branch information
owenlxu authored Aug 31, 2023
1 parent 6f74dd1 commit 7f0affa
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ spec:
volumes:
- name: storage
{{- if .Values.common.config.storage.nfs.enabled }}
nfs:
path: {{ .Values.common.config.storage.nfs.path }}
server: {{ .Values.common.config.storage.nfs.server }}
persistentVolumeClaim:
claimName: {{ include "common.names.fullname" . }}-nfs-pvc
{{- else if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "common.names.fullname" . }}-storage{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ spec:
volumes:
- name: storage
{{- if .Values.common.config.storage.nfs.enabled }}
nfs:
path: {{ .Values.common.config.storage.nfs.path }}
server: {{ .Values.common.config.storage.nfs.server }}
persistentVolumeClaim:
claimName: {{ include "common.names.fullname" . }}-nfs-pvc
{{- else if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "common.names.fullname" . }}-storage{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,8 @@ spec:
volumes:
- name: storage
{{- if .Values.common.config.storage.nfs.enabled }}
nfs:
path: {{ .Values.common.config.storage.nfs.path }}
server: {{ .Values.common.config.storage.nfs.server }}
persistentVolumeClaim:
claimName: {{ include "common.names.fullname" . }}-nfs-pvc
{{- else if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "common.names.fullname" . }}-storage{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ spec:
volumes:
- name: storage
{{- if .Values.common.config.storage.nfs.enabled }}
nfs:
path: {{ .Values.common.config.storage.nfs.path }}
server: {{ .Values.common.config.storage.nfs.server }}
persistentVolumeClaim:
claimName: {{ include "common.names.fullname" . }}-nfs-pvc
{{- else if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "common.names.fullname" . }}-storage{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ spec:
volumes:
- name: storage
{{- if .Values.common.config.storage.nfs.enabled }}
nfs:
path: {{ .Values.common.config.storage.nfs.path }}
server: {{ .Values.common.config.storage.nfs.server }}
persistentVolumeClaim:
claimName: {{ include "common.names.fullname" . }}-nfs-pvc
{{- else if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "common.names.fullname" . }}-storage{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ spec:
volumes:
- name: storage
{{- if .Values.common.config.storage.nfs.enabled }}
nfs:
path: {{ .Values.common.config.storage.nfs.path }}
server: {{ .Values.common.config.storage.nfs.server }}
persistentVolumeClaim:
claimName: {{ include "common.names.fullname" . }}-nfs-pvc
{{- else if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "common.names.fullname" . }}-storage{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ spec:
volumes:
- name: storage
{{- if .Values.common.config.storage.nfs.enabled }}
nfs:
path: {{ .Values.common.config.storage.nfs.path }}
server: {{ .Values.common.config.storage.nfs.server }}
persistentVolumeClaim:
claimName: {{ include "common.names.fullname" . }}-nfs-pvc
{{- else if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "common.names.fullname" . }}-storage{{- end }}
Expand Down
18 changes: 18 additions & 0 deletions support-files/kubernetes/charts/bkrepo/templates/pv-nfs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if .Values.common.config.storage.nfs.enabled -}}
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ include "common.names.fullname" . }}-nfs-pv
spec:
storageClassName: bkrepo-nfs
capacity:
storage: {{ .Values.common.config.storage.nfs.capacity }}
accessModes:
- ReadWriteMany
mountOptions:
- lookupcache=pos
nfs:
server: {{ .Values.common.config.storage.nfs.server }}
path: {{ .Values.common.config.storage.nfs.path }}
{{- end -}}

14 changes: 14 additions & 0 deletions support-files/kubernetes/charts/bkrepo/templates/pvc-nfs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.common.config.storage.nfs.enabled -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "common.names.fullname" . }}-nfs-pvc
spec:
storageClassName: bkrepo-nfs
resources:
requests:
storage: {{ .Values.common.config.storage.nfs.capacity }}
accessModes:
- ReadWriteMany
volumeName: {{ include "common.names.fullname" . }}-nfs-pv
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ spec:
volumes:
- name: storage
{{- if .Values.common.config.storage.nfs.enabled }}
nfs:
path: {{ .Values.common.config.storage.nfs.path }}
server: {{ .Values.common.config.storage.nfs.server }}
persistentVolumeClaim:
claimName: {{ include "common.names.fullname" . }}-nfs-pvc
{{- else if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "common.names.fullname" . }}-storage{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ spec:
volumes:
- name: storage
{{- if .Values.common.config.storage.nfs.enabled }}
nfs:
path: {{ .Values.common.config.storage.nfs.path }}
server: {{ .Values.common.config.storage.nfs.server }}
persistentVolumeClaim:
claimName: {{ include "common.names.fullname" . }}-nfs-pvc
{{- else if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "common.names.fullname" . }}-storage{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ spec:
volumes:
- name: storage
{{- if .Values.common.config.storage.nfs.enabled }}
nfs:
path: {{ .Values.common.config.storage.nfs.path }}
server: {{ .Values.common.config.storage.nfs.server }}
persistentVolumeClaim:
claimName: {{ include "common.names.fullname" . }}-nfs-pvc
{{- else if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "common.names.fullname" . }}-storage{{- end }}
Expand Down
1 change: 1 addition & 0 deletions support-files/kubernetes/charts/bkrepo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ common:
# 是否启用nfs挂载
nfs:
enabled: false
capacity: 100Ti
path: /
server:

Expand Down

0 comments on commit 7f0affa

Please sign in to comment.