Skip to content

Commit fa0012b

Browse files
feriferi
authored andcommitted
first version of opencloud helm charts
1 parent 5010fd7 commit fa0012b

File tree

9 files changed

+240
-0
lines changed

9 files changed

+240
-0
lines changed

README.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,79 @@ This repository is created to **welcome contributions from the community**. It d
1010

1111
## 📦 Installing the Helm Charts
1212

13+
Currently only deployment from the file system is supported:
14+
15+
```
16+
$ helm install opencloud -n opencloud --create-namespace ./charts/opencloud --set=adminPassword="<MY-SECURE-PASSWORD>" --set=url="<PUBLIC-URL>"
17+
```
18+
19+
It is important the the public-url is reachable, and forwarded to the backend-service opencloud-service:443,
20+
otherwise login will not be possible or the message "missing or invalid config" is shown.
21+
22+
An example ingress for nginx with cert-manager annotations is in ./inwork/opencloud-ingress.yaml.
23+
24+
25+
For testing with the default settings port-forwarding from localhost can be used:
26+
27+
```
28+
$ helm install opencloud -n opencloud --create-namespace ./charts/opencloud
29+
30+
Release "opencloud" does not exist. Installing it now.
31+
NAME: opencloud
32+
LAST DEPLOYED: Wed Apr 2 01:16:19 2025
33+
NAMESPACE: opencloud
34+
STATUS: deployed
35+
REVISION: 1
36+
TEST SUITE: None
37+
```
38+
39+
Establish a port-forwarding from localhost
40+
41+
```
42+
$ kubectl port-forward -n opencloud svc/opencloud-service 9200:443
43+
44+
Forwarding from 127.0.0.1:9200 -> 9200
45+
Forwarding from [::1]:9200 -> 9200
46+
...
47+
```
48+
49+
Now open in a browser the url: [https://localhost:9200](https://localhost:9200) while
50+
the port forwarding is active.
51+
52+
You need to accept the risc of a self signed certificate.
53+
(see [Common Issues & Help](https://docs.opencloud.eu/docs/admin/getting-started/docker/#troubleshooting)) in
54+
the getting started with Docker documentation.
55+
56+
Now you can login with the default admin / admin
57+
58+
If you want to change the public URL you can upgrade the deployment with the following command:
59+
60+
```
61+
$ helm upgrade opencloud -n opencloud ./charts/opencloud --set=url="<NEW-PUBLIC-URL>"
62+
63+
Release "opencloud" has been upgraded. Happy Helming!
64+
NAME: opencloud
65+
LAST DEPLOYED: Wed Apr 2 01:42:51 2025
66+
NAMESPACE: opencloud
67+
STATUS: deployed
68+
REVISION: 2
69+
TEST SUITE: None
70+
```
71+
72+
The opencloud deployment will be restarted and is availble after a few seconds configured for the new url.
73+
74+
If you want to uninstall opencloud this can be done with
75+
76+
ATTENTION: all you data will be lost, PVCs are not kept at the moment.
77+
78+
```
79+
$ helm uninstall -n opencloud opencloud
80+
81+
release "opencloud" uninstalled
82+
```
83+
84+
85+
1386
(please add)
1487

1588
## 💡 Contributing

charts/opencloud/Chart.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v2
2+
type: application
3+
name: opencloud
4+
version: 0.1.0
5+
description: Plain deployment of the OpenCloud dockerfile.
6+
The initial helm chart follows the description given for starting a docker instance
7+
https://docs.opencloud.eu/docs/admin/getting-started/docker
8+
It is thought as a first starting point.
9+
home: https://github.com/opencloud-eu/helm
10+
image: https://raw.githubusercontent.com/opencloud-eu/opencloud/refs/heads/main/opencloud_logo.png
11+
sources:
12+
- https://github.com/kubernetes/ingress-nginx
13+
appVersion: 2.0.0
14+
15+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# TODO: move to ConfigMap
2+
apiVersion: v1
3+
kind: PersistentVolumeClaim
4+
metadata:
5+
name: opencloud-config-pvc
6+
labels:
7+
app: opencloud
8+
spec:
9+
accessModes:
10+
- ReadWriteOnce
11+
resources:
12+
requests:
13+
storage: 10Mi
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: PersistentVolumeClaim
3+
metadata:
4+
name: opencloud-data-pvc
5+
labels:
6+
app: opencloud
7+
spec:
8+
accessModes:
9+
- ReadWriteOnce
10+
resources:
11+
requests:
12+
storage: {{ .Values.pvcSize }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: opencloud
5+
labels:
6+
app: opencloud
7+
spec:
8+
selector:
9+
matchLabels:
10+
app: opencloud
11+
replicas: 1
12+
template:
13+
metadata:
14+
labels:
15+
app: opencloud
16+
spec:
17+
containers:
18+
- name: opencloud
19+
image: "{{ .Values.image }}:{{ .Values.tag}}"
20+
env:
21+
- name: OC_INSECURE
22+
value: "{{ .Values.insecure }}"
23+
- name: PROXY_HTTP_ADDR
24+
value: "{{ .Values.proxyHttpAddr }}"
25+
- name: OC_URL
26+
value: "{{ .Values.url }}"
27+
volumeMounts:
28+
- name: opencloud-config
29+
mountPath: /etc/opencloud
30+
- name: opencloud-data
31+
mountPath: /var/lib/opencloud
32+
volumes:
33+
- name: opencloud-config
34+
persistentVolumeClaim:
35+
claimName: opencloud-config-pvc
36+
- name: opencloud-data
37+
persistentVolumeClaim:
38+
claimName: opencloud-data-pvc
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
apiVersion: batch/v1
2+
kind: Job
3+
metadata:
4+
name: opencloud-init
5+
annotations:
6+
# This is what defines this resource as a hook. Without this line, the
7+
# job is considered part of the release.
8+
"helm.sh/hook": post-install
9+
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
10+
spec:
11+
template:
12+
spec:
13+
containers:
14+
- name: opencloud
15+
image: "{{ .Values.image }}:{{ .Values.tag}}"
16+
env:
17+
- name: IDM_ADMIN_PASSWORD
18+
value: {{ .Values.adminPassword }}
19+
- name: OC_INSECURE
20+
value: "{{ .Values.insecure }}"
21+
volumeMounts:
22+
- name: opencloud-config
23+
mountPath: /etc/opencloud
24+
- name: opencloud-data
25+
mountPath: /var/lib/opencloud
26+
# command: ["/usr/bin/opencloud"]
27+
args: ["init"]
28+
volumes:
29+
- name: opencloud-config
30+
persistentVolumeClaim:
31+
claimName: opencloud-config-pvc
32+
- name: opencloud-data
33+
persistentVolumeClaim:
34+
claimName: opencloud-data-pvc
35+
restartPolicy: Never
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: opencloud-service
5+
labels:
6+
app: opencloud
7+
spec:
8+
selector:
9+
app: opencloud
10+
ports:
11+
- name: https
12+
port: 443
13+
protocol: TCP
14+
targetPort: 9200

charts/opencloud/values.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# follow the description given for starting a docker instance
2+
# https://docs.opencloud.eu/docs/admin/getting-started/docker
3+
4+
image: opencloudeu/opencloud-rolling
5+
tag: 2.0.0
6+
7+
adminPassword: admin
8+
insecure: true
9+
proxyHttpAddr: 0.0.0.0:9200
10+
url: https://localhost:9200
11+
12+
pvcSize: 10Gi
13+
14+

examples/opencloud-ingress.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: Ingress
3+
metadata:
4+
name: opencloud-ingress
5+
annotations:
6+
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
7+
cert-manager.io/cluster-issuer: letsencrypt-production
8+
labels:
9+
app: opencloud
10+
spec:
11+
ingressClassName: nginx
12+
tls:
13+
- secretName: opencloud-ssl
14+
hosts:
15+
- opencloud.k8s.cluster-4.de
16+
rules:
17+
- host: "opencloud.k8s.cluster-4.de"
18+
http:
19+
paths:
20+
- pathType: Prefix
21+
path: "/"
22+
backend:
23+
service:
24+
name: opencloud-service
25+
port:
26+
number: 443

0 commit comments

Comments
 (0)