-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: switch doc generation to use helm-docs and add a workflow to au…
…to bump the chart version on pr approval (#114) * feat: switch doc generation to use helm-docs and add a workflow to auto bump the chart version on pr approval * chore: add missing write permissions * chore: update the pr workflow file to check if the chart readme should have been updated * fix: add missing helm docs setup * chore: update plex-media-server chart documentation * fix: dont fail on the commit step * fix: chart testing command * chore: update chart to v0.7.2 --------- Co-authored-by: github-actions <>
- Loading branch information
1 parent
7d56882
commit 1b5ec9c
Showing
5 changed files
with
324 additions
and
106 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{{ template "chart.header" . }} | ||
{{ template "chart.deprecationWarning" . }} | ||
|
||
{{ template "chart.badgesSection" . }} | ||
|
||
{{ template "chart.homepageLine" . }} | ||
|
||
{{ template "chart.description" . }} | ||
|
||
|
||
While Plex is responsible for maintaining this Helm chart, we cannot provide support for troubleshooting related to its usage. For community assistance, please visit our [support forums](https://forums.plex.tv/). | ||
|
||
### Installation via Helm | ||
|
||
1. Add the Helm chart repo | ||
|
||
```bash | ||
helm repo add plex https://raw.githubusercontent.com/plexinc/pms-docker/gh-pages | ||
``` | ||
|
||
2. Inspect & modify the default values (optional) | ||
|
||
```bash | ||
helm show values plex/plex-media-server > values.yaml | ||
``` | ||
|
||
3. Install the chart | ||
|
||
```bash | ||
helm upgrade --install plex plex/plex-media-server --values values.yaml | ||
``` | ||
|
||
[Additional details available here](https://www.plex.tv/blog/plex-pro-week-23-a-z-on-k8s-for-plex-media-server/) | ||
|
||
### Sample init Container scripts | ||
|
||
If you already have a different PMS server running elsewhere and wish to migrate it to be running in Kubernetes | ||
the easiest way to do that is to import the existing PMS database through the use of a custom init script. | ||
|
||
**Note: the init script must include a mechanism to exit early if the pms database already exists to prevent from overwriting its contents** | ||
|
||
The following script is an example (using the default `alpine` init container) that will pull | ||
a tar gziped file that contains the pms `Library` directory from some web server. | ||
|
||
```sh | ||
#!/bin/sh | ||
echo "fetching pre-existing pms database to import..." | ||
|
||
if [ -d "/config/Library" ]; then | ||
echo "PMS library already exists, exiting." | ||
exit 0 | ||
fi | ||
|
||
apk --no-cache add curl | ||
curl http://example.com/pms.tgz -o pms.tgz | ||
tar -xvzf pms.tgz -C /config | ||
rm pms.tgz | ||
|
||
echo "Done." | ||
``` | ||
|
||
This next example could be used if you don't have or can't host the existing pms database archive on a web server. | ||
However, this one _does_ require that two commands are run manually once the init container starts up. | ||
|
||
1. Manually copy the pms database into the pod: `kubectl cp pms.tgz <namespace>/<podname>:/pms.tgz.up -c <release name>-pms-chart-pms-init` | ||
2. Once the file is uploaded copy rename it on the pod to the correct name that will be processed `kubectl exec -n <namespace> --stdin --tty <pod> -c <release name>-pms-chart-pms-init h -- mv /pms.tgz.up /pms.tgz` | ||
|
||
The file is being uploaded with a temporary name so that the script does not start trying to unpack the database until it has finished uploading. | ||
|
||
```sh | ||
#!/bin/sh | ||
echo "waiting for pre-existing pms database to uploaded..." | ||
|
||
if [ -d "/config/Library" ]; then | ||
echo "PMS library already exists, exiting." | ||
exit 0 | ||
fi | ||
|
||
# wait for the database archive to be manually copied to the server | ||
while [ ! -f /pms.tgz ]; do sleep 2; done; | ||
|
||
tar -xvzf /pms.tgz -C /config | ||
rm pms.tgz | ||
|
||
echo "Done." | ||
``` | ||
|
||
## Contributing | ||
|
||
Before contributing, please read the [Code of Conduct](../../CODE_OF_CONDUCT.md). | ||
|
||
## License | ||
|
||
[GNU GPLv3](./LICENSE) | ||
|
||
{{ template "chart.maintainersSection" . }} | ||
|
||
{{ template "chart.sourcesSection" . }} | ||
|
||
{{ template "chart.requirementsSection" . }} | ||
|
||
{{ template "chart.valuesSection" . }} | ||
|
||
{{ template "helm-docs.versionFooter" . }} |
Oops, something went wrong.