-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
docs: provide K8s deploy #8585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wayne-cheng
wants to merge
1
commit into
AlistGo:main
Choose a base branch
from
wayne-cheng:docs-helm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
docs: provide K8s deploy #8585
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,10 @@ | ||
name: alist | ||
description: A file list program that supports multiple storages, powered by Gin and Solidjs. | ||
version: v3.45.0 | ||
apiVersion: v1 | ||
keywords: | ||
- alist | ||
sources: | ||
- https://github.com/AlistGo/alist | ||
home: https://alistgo.com | ||
icon: https://cdn.jsdelivr.net/gh/alist-org/logo@main/logo.svg |
This file contains hidden or 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,59 @@ | ||
# Alist Helm Chart | ||
|
||
A file list program that supports multiple storages, powered by Gin and Solidjs. | ||
|
||
## Introduction | ||
|
||
This chart bootstraps alist on [Kubernetes](http://kubernetes.io) using the [Helm](https://helm.sh) package manager. | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes cluster 1.20+ | ||
- Helm v3.2.0+ | ||
|
||
## Configure Alist Helm repo | ||
|
||
No Helm repository has been provided. Please `git clone` the code project, and install it manually in the `helm` directory. | ||
|
||
```bash | ||
git clone https://github.com/AlistGo/alist.git | ||
|
||
cd alist/helm | ||
``` | ||
|
||
### Installing the Chart | ||
|
||
Create the alist namespace. | ||
|
||
```bash | ||
kubectl create namespace alist | ||
``` | ||
|
||
Install the helm chart into the alist namespace. | ||
|
||
```bash | ||
helm install alist . --namespace alist | ||
``` | ||
|
||
### Values reference | ||
|
||
The default values.yaml should be suitable for most basic deployments. | ||
|
||
| Parameter | Description | Default | | ||
|----------------------------|--------------------------------------------------------------|---------------------------------| | ||
| `image.registry` | Imag registry | `docker.io` | | ||
| `image.repository` | Image name | `xhofe/alist` | | ||
| `image.tag` | Image tag | `latest` | | ||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` | | ||
| `replicaCount` | Number of scanner adapter Pods to run | `1` | | ||
| `persistence.storageClass` | Specify the storageClass used to provision the volume | | | ||
| `persistence.accessMode` | The access mode of the volume | `ReadWriteOnce` | | ||
| `persistence.size` | The size of the volume | `5Gi` | | ||
| `service.type` | Kubernetes service type | `ClusterIP` | | ||
| `service.loadBalancerIP` | Kubernetes service loadBalancerIP | | | ||
| `service.http.port` | Kubernetes service http port | `5244` | | ||
| `service.http.targetPort` | Kubernetes service http targetPort | `5244` | | ||
| `service.http.nodePort` | Kubernetes service http nodePort | `35244` | | ||
| `service.https.port` | Kubernetes service https port | `5245` | | ||
| `service.https.targetPort` | Kubernetes service https targetPort | `5245` | | ||
| `service.https.nodePort` | Kubernetes service https nodePort | `35245` | |
This file contains hidden or 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,32 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "alist.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "alist.fullname" -}} | ||
{{- if .Values.fullnameOverride -}} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "alist.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
This file contains hidden or 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,47 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: {{ template "alist.name" . }} | ||
chart: {{ template "alist.chart" . }} | ||
release: {{ .Release.Name }} | ||
name: {{ template "alist.fullname" . }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app: {{ template "alist.name" . }} | ||
release: {{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ template "alist.name" . }} | ||
release: {{ .Release.Name }} | ||
spec: | ||
containers: | ||
- env: | ||
- name: PGID | ||
value: "0" | ||
- name: PUID | ||
value: "0" | ||
- name: TZ | ||
value: UTC | ||
- name: UMASK | ||
value: "022" | ||
name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.registry}}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
ports: | ||
- containerPort: {{ .Values.service.http.port }} | ||
protocol: TCP | ||
- containerPort: {{ .Values.service.https.port }} | ||
protocol: TCP | ||
volumeMounts: | ||
- mountPath: /opt/alist/data | ||
name: alist-data | ||
restartPolicy: Always | ||
enableServiceLinks: false | ||
volumes: | ||
- name: alist-data | ||
persistentVolumeClaim: | ||
claimName: {{ template "alist.fullname" . }} |
This file contains hidden or 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 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: {{ template "alist.fullname" . }} | ||
labels: | ||
app: {{ template "alist.name" . }} | ||
chart: {{ template "alist.chart" . }} | ||
release: {{ .Release.Name }} | ||
spec: | ||
accessModes: | ||
- {{ .Values.persistence.accessMode | quote }} | ||
resources: | ||
requests: | ||
storage: {{ .Values.persistence.size | quote }} | ||
{{- if .Values.persistence.storageClass }} | ||
{{- if (eq "-" .Values.persistence.storageClass) }} | ||
storageClassName: "" | ||
{{- else }} | ||
storageClassName: "{{ .Values.persistence.storageClass }}" | ||
{{- end }} | ||
{{- end }} |
This file contains hidden or 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,27 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "alist.fullname" . }} | ||
spec: | ||
type: {{ .Values.service.type | default "ClusterIP" }} | ||
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }} | ||
loadBalancerIP: {{ default "" .Values.service.loadBalancerIP | quote }} | ||
{{- end }} | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: {{ .Values.service.http.port }} | ||
targetPort: {{ .Values.service.http.targetPort }} | ||
{{- if (and (eq .Values.service.type "NodePort") ( .Values.service.http.nodePort)) }} | ||
nodePort: {{ .Values.service.http.nodePort }} | ||
{{- end }} | ||
- name: https | ||
protocol: TCP | ||
port: {{ .Values.service.https.port }} | ||
targetPort: {{ .Values.service.https.targetPort }} | ||
{{- if (and (eq .Values.service.type "NodePort") ( .Values.service.https.nodePort)) }} | ||
nodePort: {{ .Values.service.https.nodePort }} | ||
{{- end }} | ||
selector: | ||
app: {{ template "alist.name" . }} | ||
release: {{ .Release.Name }} |
This file contains hidden or 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,28 @@ | ||
nameOverride: "" | ||
|
||
fullnameOverride: "" | ||
|
||
image: | ||
registry: docker.io | ||
repository: xhofe/alist | ||
tag: latest | ||
pullPolicy: IfNotPresent | ||
|
||
replicaCount: 1 | ||
|
||
persistence: | ||
storageClass: "" | ||
accessMode: ReadWriteOnce | ||
size: 5Gi | ||
|
||
service: | ||
type: ClusterIP | ||
loadBalancerIP: ~ | ||
http: | ||
port: 5244 | ||
targetPort: 5244 | ||
nodePort: 35244 | ||
https: | ||
port: 5245 | ||
targetPort: 5245 | ||
nodePort: 35245 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the
version
andappVersion
fields are specified in theChart.yaml
file to maintain compatibility and clarity for users.