Skip to content

Commit c000b41

Browse files
committed
Release transmission-openvpn chart version 2.0.0
1 parent ee28092 commit c000b41

11 files changed

+457
-271
lines changed

docs/index.yaml

+34-1
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,39 @@ entries:
15831583
- https://utkuozdemir.org/helm-charts/transmission-exporter-0.1.0.tgz
15841584
version: 0.1.0
15851585
transmission-openvpn:
1586+
- annotations:
1587+
artifacthub.io/changes: |
1588+
- Major refactor of values
1589+
- Use deployment instead of statefulset
1590+
artifacthub.io/images: |
1591+
- name: haugene/transmission-openvpn
1592+
image: docker.io/haugene/transmission-openvpn:4.0
1593+
artifacthub.io/license: MIT
1594+
apiVersion: v2
1595+
appVersion: "4.0"
1596+
created: "2021-12-30T01:42:23.175688+01:00"
1597+
description: Transmission + OpenVPN chart based on haugene/transmission-openvpn
1598+
image
1599+
digest: ed22740a51917628437b104ece8fd9bae2744fb331f9fd5c30426ecdaec578c6
1600+
home: https://haugene.github.io/docker-transmission-openvpn
1601+
icon: https://utkuozdemir.org/helm-charts/transmission.png
1602+
keywords:
1603+
- transmission
1604+
- openvpn
1605+
- transmission-openvpn
1606+
- torrent
1607+
maintainers:
1608+
1609+
name: Utku Özdemir
1610+
url: https://utkuozdemir.org
1611+
name: transmission-openvpn
1612+
sources:
1613+
- https://github.com/haugene/docker-transmission-openvpn
1614+
- https://github.com/utkuozdemir/helm-charts
1615+
type: application
1616+
urls:
1617+
- https://utkuozdemir.org/helm-charts/transmission-openvpn-2.0.0.tgz
1618+
version: 2.0.0
15861619
- annotations:
15871620
artifacthub.io/changes: |
15881621
- Bump app version to 4.0
@@ -1967,4 +2000,4 @@ entries:
19672000
urls:
19682001
- https://utkuozdemir.org/helm-charts/transmission-openvpn-0.1.0.tgz
19692002
version: 0.1.0
1970-
generated: "2021-12-29T23:32:01.486507+01:00"
2003+
generated: "2021-12-30T01:42:23.174469+01:00"

docs/transmission-openvpn-2.0.0.tgz

6.96 KB
Binary file not shown.

transmission-openvpn/Chart.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: transmission-openvpn
33
description: Transmission + OpenVPN chart based on haugene/transmission-openvpn image
44
type: application
5-
version: 1.2.0
5+
version: 2.0.0
66
appVersion: "4.0"
77
home: https://haugene.github.io/docker-transmission-openvpn
88
keywords:
@@ -21,7 +21,8 @@ maintainers:
2121
annotations:
2222
artifacthub.io/license: MIT
2323
artifacthub.io/changes: |
24-
- Bump app version to 4.0
24+
- Major refactor of values
25+
- Use deployment instead of statefulset
2526
artifacthub.io/images: |
2627
- name: haugene/transmission-openvpn
2728
image: docker.io/haugene/transmission-openvpn:4.0

transmission-openvpn/README.md

+99-83
Large diffs are not rendered by default.

transmission-openvpn/README.md.gotmpl

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
{{ template "chart.header" . }}
2+
{{ template "chart.deprecationWarning" . }}
3+
4+
{{ template "chart.badgesSection" . }}
5+
6+
{{ template "chart.description" . }}
7+
8+
{{ template "chart.homepageLine" . }}
9+
10+
## TL;DR
11+
12+
```console
13+
$ helm repo add utkuozdemir https://utkuozdemir.org/helm-charts
14+
$ helm install my-release utkuozdemir/{{ template "chart.name" . }}
15+
```
16+
17+
{{ template "chart.requirementsSection" . }}
18+
19+
{{ template "chart.valuesSection" . }}
20+
21+
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
22+
23+
```console
24+
$ helm install my-release \
25+
--set env.LOCAL_NETWORK=10.217.0.0/16 \
26+
--set env.OPENVPN_PROVIDER=PIA \
27+
--set env.OPENVPN_USERNAME=myuser \
28+
--set env.TRANSMISSION_SPEED_LIMIT_UP_ENABLED=true \
29+
--set env.TRANSMISSION_SPEED_LIMIT_UP=2048 \
30+
--set secretEnv.OPENVPN_PASSWORD=mysecretpassword \
31+
utkuozdemir/transmission-openvpn
32+
```
33+
34+
The above command uses *PIA* as the OpenVPN provider, uses the VPN username `myuser`
35+
and password `mysecretpassword` to connect to the provider.
36+
It also enables the transmission upload speed limit and sets it to 2048 KB/s.
37+
38+
Alternatively, a YAML file that specifies the values for the parameters
39+
can be provided while installing the chart. For example,
40+
41+
```console
42+
$ helm install my-release -f values.yaml utkuozdemir/transmission-openvpn
43+
```
44+
45+
> **Tip**: You can use the default [values.yaml](values.yaml)
46+
47+
48+
## Notes
49+
50+
**Important Note:** By default, the `docker-transmission-openvpn` image **blocks all the incoming traffic** other than
51+
the traffic coming from the VPN tunnel.
52+
53+
A set of IP ranges can be speficied as the "local network" to be excluded from this block.
54+
For the service/ingress to work, **you need to specify your Kubernetes cluster pod range as the local network**.
55+
In the example above, `10.217.0.0/16` is specified as the pod range.
56+
57+
You can find out your cluster's pod range via the following command:
58+
```console
59+
kubectl -n kube-system get pod -o yaml -l component=kube-controller-manager | grep cluster-cidr
60+
```
61+
62+
Alternatively, if you trust all local networks,
63+
you can specify all [RFC1918 private networks](https://en.wikipedia.org/wiki/Private_network):
64+
```console
65+
helm install ... --set env.LOCAL_NETWORK=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 ...
66+
```
67+
68+
69+
Note that this is an un-opinionated chart regarding the configuration. What is meant by this is:
70+
The chart passes the set of environment variables as-is into the container, using the `env` and `secretEnv` values.
71+
This way we avoid mapping each and every configuration parameter to an explicitly
72+
named chart parameter and provides a very flexible configuration.
73+
74+
See all the possible environment variables
75+
[on this page](https://haugene.github.io/docker-transmission-openvpn/arguments/).
76+
77+
Note that the transmission application can be fully configured via the environment variables.
78+
[See this section](https://haugene.github.io/docker-transmission-openvpn/arguments/#transmission_configuration_options)
79+
for the transmission configuration mapping to the environment.
80+
81+
## Upgrading Chart
82+
83+
```console
84+
helm upgrade my-release utkuozdemir/{{ template "chart.name" . }}
85+
```
86+
87+
_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._
88+
89+
### Upgrading an existing Release to a new major version
90+
91+
A major chart version change (like 1.2.0 -> 2.0.0) indicates that
92+
there is an incompatible breaking change needing manual actions.
93+
94+
### From 1.x to 2.x
95+
96+
On version 2.x, the app is backed by a deployment instead of a statefulset.
97+
98+
The values is largely refactored - pay attention to the changes on the `persistence` section.
99+
100+
It is recommended to start from a fresh install.
101+
102+
103+
{{ template "chart.maintainersSection" . }}
104+
105+
{{ template "chart.sourcesSection" . }}

transmission-openvpn/templates/configmap.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,3 @@ metadata:
66
{{- include "transmission-openvpn.labels" . | nindent 4 }}
77
data:
88
{{- toYaml .Values.env | nindent 2 }}
9-
{{- if and .Values.customProvider.enabled }}
10-
OPENVPN_PROVIDER: CUSTOM
11-
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "transmission-openvpn.fullname" . }}
5+
labels:
6+
{{- include "transmission-openvpn.labels" . | nindent 4 }}
7+
spec:
8+
{{- with .Values.strategy }}
9+
strategy:
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
12+
replicas: {{ .Values.replicaCount }}
13+
selector:
14+
matchLabels:
15+
{{- include "transmission-openvpn.selectorLabels" . | nindent 6 }}
16+
template:
17+
metadata:
18+
annotations:
19+
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
20+
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
21+
{{- with .Values.podAnnotations }}
22+
{{- toYaml . | nindent 8 }}
23+
{{- end }}
24+
labels:
25+
{{- include "transmission-openvpn.selectorLabels" . | nindent 8 }}
26+
spec:
27+
{{- with .Values.imagePullSecrets }}
28+
imagePullSecrets:
29+
{{- toYaml . | nindent 8 }}
30+
{{- end }}
31+
serviceAccountName: {{ include "transmission-openvpn.serviceAccountName" . }}
32+
securityContext:
33+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
34+
dnsPolicy: {{ .Values.dnsPolicy }}
35+
{{- with .Values.dnsConfig }}
36+
dnsConfig:
37+
{{- toYaml . | nindent 8 }}
38+
{{- end }}
39+
containers:
40+
- name: {{ .Chart.Name }}
41+
securityContext:
42+
{{- toYaml .Values.securityContext | nindent 12 }}
43+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
44+
imagePullPolicy: {{ .Values.image.pullPolicy }}
45+
volumeMounts:
46+
{{- if .Values.mountTunDevice }}
47+
- mountPath: /dev/net/tun
48+
name: dev-net-tun
49+
{{- end }}
50+
- mountPath: /data
51+
name: data
52+
{{- with .Values.extraVolumeMounts }}
53+
{{- toYaml . | nindent 12 }}
54+
{{- end }}
55+
envFrom:
56+
- configMapRef:
57+
name: {{ include "transmission-openvpn.fullname" . }}
58+
- secretRef:
59+
name: {{ include "transmission-openvpn.fullname" . }}
60+
ports:
61+
- name: http
62+
containerPort: 9091
63+
protocol: TCP
64+
{{- with .Values.livenessProbe }}
65+
readinessProbe:
66+
{{- toYaml . | nindent 12 }}
67+
{{- end }}
68+
{{- with .Values.readinessProbe }}
69+
readinessProbe:
70+
{{- toYaml . | nindent 12 }}
71+
{{- end }}
72+
resources:
73+
{{- toYaml .Values.resources | nindent 12 }}
74+
{{- with .Values.nodeSelector }}
75+
nodeSelector:
76+
{{- toYaml . | nindent 8 }}
77+
{{- end }}
78+
{{- with .Values.affinity }}
79+
affinity:
80+
{{- toYaml . | nindent 8 }}
81+
{{- end }}
82+
{{- with .Values.tolerations }}
83+
tolerations:
84+
{{- toYaml . | nindent 8 }}
85+
{{- end }}
86+
volumes:
87+
{{- if .Values.mountTunDevice }}
88+
- name: dev-net-tun
89+
hostPath:
90+
path: /dev/net/tun
91+
type: CharDevice
92+
{{- end }}
93+
- name: data
94+
{{- if .Values.persistence.enabled }}
95+
{{- if .Values.persistence.isPvc }}
96+
persistentVolumeClaim:
97+
claimName: {{ .Values.persistence.existingClaim | default (include "transmission-openvpn.fullname" .) }}
98+
{{- else }}
99+
{{- with .Values.persistence.dataVolume }}
100+
{{- toYaml . | nindent 10 }}
101+
{{- end }}
102+
{{- end }}
103+
{{- else }}
104+
emptyDir: {}
105+
{{- end }}
106+
{{- with .Values.extraVolumes }}
107+
{{- toYaml . | nindent 8 }}
108+
{{- end }}
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{{- if and (.Values.persistence.enabled) (not .Values.persistence.existingClaim) (.Values.persistence.isPvc) }}
2+
apiVersion: v1
3+
kind: PersistentVolumeClaim
4+
metadata:
5+
name: {{ include "transmission-openvpn.fullname" . }}
6+
labels:
7+
{{- include "transmission-openvpn.labels" . | nindent 4 }}
8+
{{- with .Values.persistence.annotations }}
9+
annotations:
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
12+
spec:
13+
accessModes:
14+
{{- range .Values.persistence.accessModes }}
15+
- {{ . | quote }}
16+
{{- end }}
17+
resources:
18+
requests:
19+
storage: {{ .Values.persistence.size | quote }}
20+
{{- if .Values.persistence.storageClass }}
21+
storageClassName: {{ .Values.persistence.storageClass }}
22+
{{- end -}}
23+
{{- end -}}

transmission-openvpn/templates/secret.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ metadata:
44
name: {{ include "transmission-openvpn.fullname" . }}
55
labels:
66
{{- include "transmission-openvpn.labels" . | nindent 4 }}
7-
stringData:
8-
{{- toYaml .Values.secretEnv | nindent 2 }}
7+
data:
8+
{{- range $k, $v := .Values.secretEnv }}
9+
{{ $k }}: {{ $v | b64enc }}
10+
{{- end }}

0 commit comments

Comments
 (0)