Skip to content
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

[pull] master from plexinc:master #24

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
94725e4
Remove unused port 3005 from docker-compose template and readme
krsmanovic Jan 7, 2023
2677bb6
Added PLEX_CLAIM_FILE env
mxmeeple Feb 9, 2023
dad8fe0
Removed beignet and icr as they aren't needed.
gbooker Mar 13, 2023
15e73dc
feat: add a helm chart to deploy PMS Kubernetes (#82)
MarshallAsch Jul 4, 2023
4bb479c
feat: add a workflow to package and release the helm chart (#83)
MarshallAsch Jul 10, 2023
350e665
chore: trigger the helm pipline
MarshallAsch Jul 10, 2023
c689f35
fix: remove non-existant linter script from helm workflow
MarshallAsch Jul 10, 2023
43f2f54
chore: remove some unnecessary comments from the chart
MarshallAsch Jul 10, 2023
87d6bcc
fix: the tolerations block was at the wrong level in the statefulset …
MarshallAsch Jul 13, 2023
af1a1d8
fix: the affinity block was at the wrong indentation level in the sta…
MarshallAsch Jul 13, 2023
f957d61
fix: indentation should be 8 and not 6 (#86)
MarshallAsch Jul 13, 2023
e261205
fix: missed using the service account from the stateful set (#88)
MarshallAsch Jul 21, 2023
9e0fe30
fix: dont strip the https portion of the app url when setting the adv…
MarshallAsch Jul 21, 2023
aced6b1
fix: incorrect name of the fusemount command in the prestop check of …
MarshallAsch Jul 21, 2023
220d49f
feat: Add priorityClassName (#91)
ajalewis Oct 11, 2023
446c0ef
build: add chart-testing workflow
cilindrox Oct 13, 2023
e557be3
fix(chart-testing): update relative path to config
cilindrox Oct 17, 2023
603f9e0
build: fix ct lint steps
cilindrox Nov 14, 2023
cbf988e
fix: quote env values
JoelBChapmanII Nov 14, 2023
0cd70b5
doc: update helm chart README with instructions on how to add and use…
charlesthomas Dec 22, 2023
c8fa8af
Helm chart: Add the ability to define the node port to use when servi…
alphayax Jan 27, 2024
c7dd9df
Helm chart: set version to 0.2.0
alphayax Feb 5, 2024
a40eb64
Helm chart: Add the ability to use a pre existing peristent volume claim
jpflouret Feb 25, 2024
e8271cb
Helm chart: Bump version to 0.2.1
jpflouret Feb 26, 2024
c4dc0ac
feat: allow setting pod annotations
d3adb5 Apr 3, 2024
46a0358
chore: bump chart version to 0.3.0
d3adb5 Apr 3, 2024
18778f4
Add runtimeClassName
thomaspetit Jun 3, 2024
0e1e680
Bump chart
thomaspetit Jun 3, 2024
4d68c05
fix: remove trailing space
cilindrox Jun 4, 2024
71f47cd
chore!: remove environment variables that are no longer used (#106)
MarshallAsch Jul 15, 2024
108466f
chore!: remove the unsuported i386 dockerfile since ubuntu 18 is no l…
MarshallAsch Jul 16, 2024
fa16086
feat: merge the amd64 and arm dockerfiles together to be built from t…
MarshallAsch Jul 16, 2024
bf68951
fix: update missed documentation on building the image (#109)
MarshallAsch Jul 17, 2024
c8e1765
Fix arm64 plex build string (#112)
CodeSmithian Aug 19, 2024
e503106
Copy all rclone keys into /etc/rclone, add easy gpu option
rdmcguire Oct 14, 2024
ae2ca54
Make volume comment more relevant
rdmcguire Oct 14, 2024
6d466a0
restore original volume mount
rdmcguire Oct 15, 2024
b9324f1
bump chart version, remove unnecessary device mount
rdmcguire Oct 15, 2024
e4a02cf
update README
rdmcguire Oct 15, 2024
f004951
chore: set the minor version bump
MarshallAsch Oct 29, 2024
61b6ed5
added externalTrafficPolicy to service
koiralasandesh Dec 1, 2024
784d8e4
Added liveness and readiness probe to pms container (#117)
koiralasandesh Dec 31, 2024
7d56882
Fix incorrect nesting of liveness and readiness probes (#118)
jpflouret Dec 31, 2024
1b5ec9c
feat: switch doc generation to use helm-docs and add a workflow to au…
MarshallAsch Dec 31, 2024
ccf6ffd
Add ingress secret name variable in helm chart (#119)
nicosingh Jan 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charts/** @plexinc/team-operations
3 changes: 3 additions & 0 deletions .github/linters/ct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
chart-dirs:
- charts
validate-maintainers: false
79 changes: 79 additions & 0 deletions .github/workflows/helm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Helm

on:
push:
branches:
- master
paths:
- 'charts/**'
permissions:
contents: read

jobs:

changes:
permissions:
contents: read # for dorny/paths-filter to fetch a list of changed files
pull-requests: read # for dorny/paths-filter to read pull requests
runs-on: ubuntu-latest
if: |
(github.repository == 'plexinc/pms-docker')
outputs:
docs: ${{ steps.filter.outputs.docs }}
charts: ${{ steps.filter.outputs.charts }}

steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Run Artifact Hub lint
run: |
wget https://github.com/artifacthub/hub/releases/download/v1.5.0/ah_1.5.0_linux_amd64.tar.gz
echo 'ad0e44c6ea058ab6b85dbf582e88bad9fdbc64ded0d1dd4edbac65133e5c87da *ah_1.5.0_linux_amd64.tar.gz' | shasum -c
tar -xzvf ah_1.5.0_linux_amd64.tar.gz ah
./ah lint -p charts/plex-media-server || exit 1
rm -f ./ah ./ah_1.5.0_linux_amd64.tar.gz

- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: filter
with:
token: ${{ secrets.GITHUB_TOKEN }}
filters: |
charts:
- 'charts/plex-media-server/Chart.yaml'
- 'charts/plex-media-server/values.yaml'

chart:
name: Release Chart
runs-on: ubuntu-latest

permissions:
contents: write # needed to write releases

needs:
- changes
if: |
(github.repository == 'plexinc/pms-docker') &&
(needs.changes.outputs.charts == 'true')

steps:
- name: Checkout master
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
# Fetch entire history. Required for chart-releaser; see https://github.com/helm/chart-releaser-action/issues/13#issuecomment-602063896
fetch-depth: 0

- name: Setup
shell: bash
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "[email protected]"

- name: Helm Chart Releaser
uses: helm/chart-releaser-action@be16258da8010256c6e82849661221415f031968 # v1.5.0
env:
CR_SKIP_EXISTING: "false"
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NAME_TEMPLATE: "helm-chart-{{ .Version }}"
with:
charts_dir: charts
161 changes: 161 additions & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
name: Lint and Test Charts

# yamllint disable-line rule:truthy
on:
workflow_call:
workflow_dispatch:
pull_request:
branches:
- master
paths:
- 'charts/plex-media-server/**'

jobs:
docs:
name: Bump Chart Version and Re-Generate Docs
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: gabe565/setup-helm-docs-action@v1

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}

- name: Set up chart-testing
uses: helm/chart-testing-action@v2

- name: Check if version bump is needed
id: check_bump
run: |
set +e
ct lint --config .github/linters/ct.yaml --check-version-increment --target-branch ${{ github.event.pull_request.base.ref }} | grep -q 'chart version not ok. Needs a version bump!'
needsBump=$?

if [ $needsBump -eq 0 ]; then
echo "needsBump=true" >> "$GITHUB_OUTPUT"
else
echo "needsBump=false" >> "$GITHUB_OUTPUT"
fi

- name: Cache binaries
id: cache-bin
if: ${{ steps.check_bump.outputs.needsBump == 'true' }}
uses: actions/cache@v4
env:
cache-name: cache-semver
with:
path: bin
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('bin/semver') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Setup semver
if: ${{ steps.check_bump.outputs.needsBump == 'true' && steps.cache-bin.outputs.cache-hit != 'true' }}
run: |
mkdir -p bin
wget -O bin/semver \
https://raw.githubusercontent.com/fsaintjacques/semver-tool/3.4.0/src/semver
chmod +x bin/semver

- name: Setup PATH
if: ${{ steps.check_bump.outputs.needsBump == 'true' }}
run: |
echo "$GITHUB_WORKSPACE/bin" >> "$GITHUB_PATH"

- name: Compute version
if: ${{ steps.check_bump.outputs.needsBump == 'true' }}
id: get_version
env:
PATCH_LABEL: "${{ contains(github.event.pull_request.labels.*.name, 'chart: patch') }}"
MINOR_LABEL: "${{ contains(github.event.pull_request.labels.*.name, 'chart: minor') }}"
MAJOR_LABEL: "${{ contains(github.event.pull_request.labels.*.name, 'chart: major') }}"
run: |
current_ver=$(cat "charts/plex-media-server/Chart.yaml" | grep 'version:' | cut -d' ' -f2)

BUMP_TYPE=''
if [[ $MAJOR_LABEL == 'true' ]];
then
BUMP_TYPE='major'
elif [[ $MINOR_LABEL == 'true' ]];
then
BUMP_TYPE='minor'
elif [[ $PATCH_LABEL == 'true' ]];
then
BUMP_TYPE='patch'
else
echo "::error title=Missing Label::Missing the chart versioning label"
exit -1
fi

echo "running ${BUMP_TYPE} version bump"
new_ver=$(semver bump "${BUMP_TYPE}" "$current_ver")
echo "last=${current_ver}" >> "$GITHUB_OUTPUT"
echo "new=${new_ver}" >> "$GITHUB_OUTPUT"

- name: Update Chart Version
if: ${{ steps.check_bump.outputs.needsBump == 'true' }}
shell: bash
run: |
sed -i "s/version: ${{ steps.get_version.outputs.last }}/version: ${{ steps.get_version.outputs.new }}/g" "charts/plex-media-server/Chart.yaml"

- name: Update Docs
shell: bash
run: |
helm-docs --chart-search-root charts --chart-to-generate charts/plex-media-server

- name: Commit Changes
env:
message: ${{ steps.check_bump.outputs.needsBump == 'true' && format('to v{0}', steps.get_version.outputs.new) || 'documentation' }}
run: |
set +e
git config user.email '<>'
git config user.name github-actions
if ! git diff-index --quiet HEAD; then
git commit -m "chore: update $APP chart $message" --all
git push origin "HEAD:$GITHUB_HEAD_REF"
fi

lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.13.1

- uses: actions/setup-python@v4
with:
python-version: 3.x
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config .github/linters/ct.yaml)
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Run chart-testing (lint)
run: ct lint --config .github/linters/ct.yaml

- name: Create kind cluster
uses: helm/kind-action@v1
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
run: ct install --config .github/linters/ct.yaml
86 changes: 86 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address, without their explicit permission
- Publishing spam or promotional links
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces.

Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][mozilla coc].

For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][faq]. Translations are available at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[mozilla coc]: https://github.com/mozilla/diversity
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
Loading