Skip to content

Commit

Permalink
Merge pull request #9 from xvilo/add/iSponsorBlockTV
Browse files Browse the repository at this point in the history
Add: iSponsorBlockTV helm chart
  • Loading branch information
xvilo authored May 24, 2024
2 parents 3b89274 + 7a54d67 commit d0e7ca3
Show file tree
Hide file tree
Showing 8 changed files with 303 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/iSponsorBlockTV/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions charts/iSponsorBlockTV/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: isponsorblocktv
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "2.0.6"
59 changes: 59 additions & 0 deletions charts/iSponsorBlockTV/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# iSponsorBlockTV Helm Chart

This repository contains a Helm chart for iSponsorBlockTV.

## Prerequisites

- Kubernetes 1.12+
- Helm 3.1.0

## Installing the Chart

To install the chart with the release name `my-release`:

```bash
helm repo add xvilo https://xvilo.github.io/helm-charts
helm install my-release xvilo/isponsorblocktv
```

This command deploys iSponsorBlockTV on the Kubernetes cluster with the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.

## Uninstalling the Chart

To uninstall/delete the `my-release` deployment:

```bash
helm delete my-release
```

This command removes all the Kubernetes components associated with the chart and deletes the release.

## Configuration

The following table lists the configurable parameters of the iSponsorBlockTV chart and their default values.

| Parameter | Description | Default |
| --------- | ----------- | ------- |
| `config.devices` | List of devices to be configured | `[]` |
| `config.apikey` | API key for iSponsorBlockTV | `""` |
| `config.skip_categories` | Categories to be skipped | `["sponsor", "selfpromo", "intro", "outro", "music_offtopic", "interaction", "exclusive_access", "poi_highlight", "preview", "filler"]` |
| `config.channel_whitelist` | List of channels to be whitelisted | `[]` |
| `config.skip_count_tracking` | Enable/Disable skip count tracking | `true` |
| `config.mute_ads` | Enable/Disable ad muting | `true` |
| `config.skip_ads` | Enable/Disable ad skipping | `true` |

You can specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

```bash
helm install my-release xvilo/isponsorblocktv --set config.apikey=yourapikey
```

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

```bash
helm install my-release -f values.yaml xvilo/isponsorblocktv
```

> **Tip**: You can use the default [values.yaml](values.yaml)
For more information on configuring your iSponsorBlockTV deployment, refer to the [values.yaml](values.yaml) file in this repository.
2 changes: 2 additions & 0 deletions charts/iSponsorBlockTV/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Thanks for deploying iSponsorBlockTV
The service is now running on your cluster!
62 changes: 62 additions & 0 deletions charts/iSponsorBlockTV/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "iSponsorBlockTV.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 "iSponsorBlockTV.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 "iSponsorBlockTV.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "iSponsorBlockTV.labels" -}}
helm.sh/chart: {{ include "iSponsorBlockTV.chart" . }}
{{ include "iSponsorBlockTV.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "iSponsorBlockTV.selectorLabels" -}}
app.kubernetes.io/name: {{ include "iSponsorBlockTV.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "iSponsorBlockTV.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "iSponsorBlockTV.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
7 changes: 7 additions & 0 deletions charts/iSponsorBlockTV/templates/configuration-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "iSponsorBlockTV.name" . }}-config
data:
config.json: |
{{- .Values.config | toPrettyJson | nindent 4}}
57 changes: 57 additions & 0 deletions charts/iSponsorBlockTV/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "iSponsorBlockTV.fullname" . }}
labels:
{{- include "iSponsorBlockTV.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "iSponsorBlockTV.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "iSponsorBlockTV.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "iSponsorBlockTV.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:v{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: {{ template "iSponsorBlockTV.name" . }}-config
mountPath: /app/data/
readOnly: true
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: {{ template "iSponsorBlockTV.name" . }}-config
configMap:
name: {{ template "iSponsorBlockTV.name" . }}-config
items:
- key: config.json
path: config.json
69 changes: 69 additions & 0 deletions charts/iSponsorBlockTV/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Default values for iSponsorBlockTV.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

config:
devices: []
# - screen_id: "xxxxxxxxxx"
# name: "Apple TV 4K"
# offset: 0
apikey: ""
skip_categories:
- "sponsor"
- "selfpromo"
- "intro"
- "outro"
- "music_offtopic"
- "interaction"
- "exclusive_access"
- "poi_highlight"
- "preview"
- "filler"
channel_whitelist: []
skip_count_tracking: true
mute_ads: true
skip_ads: true

replicaCount: 1

image:
repository: ghcr.io/dmunozv04/isponsorblocktv
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""

podAnnotations: {}

podSecurityContext: {}
# fsGroup: 2000

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}

0 comments on commit d0e7ca3

Please sign in to comment.