Skip to content

Commit 94c688f

Browse files
authored
SeaweedFS (#131)
This PR adds SeaweedFS Signed-off-by: Andrei Kvapil <[email protected]>
1 parent 2f0373d commit 94c688f

71 files changed

Lines changed: 8028 additions & 6 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎packages/apps/bucket/Chart.yaml‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: v2
2+
name: bucket
3+
description: S3 compatible storage
4+
icon: /logos/bucket.svg
5+
6+
# A chart can be either an 'application' or a 'library' chart.
7+
#
8+
# Application charts are a collection of templates that can be packaged into versioned archives
9+
# to be deployed.
10+
#
11+
# Library charts provide useful utilities or functions for the chart developer. They're included as
12+
# a dependency of application charts to inject those utilities and functions into the rendering
13+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
14+
type: application
15+
16+
# This is the chart version. This version number should be incremented each time you make changes
17+
# to the chart and its templates, including the app version.
18+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
19+
version: 0.1.0
20+
21+
# This is the version number of the application being deployed. This version number should be
22+
# incremented each time you make changes to the application. Versions are not expected to
23+
# follow Semantic Versioning. They should reflect the version the application is using.
24+
# It is recommended to use it with quotes.
25+
appVersion: "0.1.0"

‎packages/apps/bucket/Makefile‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
generate:
2+
readme-generator -v values.yaml -s values.schema.json -r README.md
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{- $myNS := lookup "v1" "Namespace" "" .Release.Namespace }}
2+
{{- $seaweedfs := index $myNS.metadata.annotations "namespace.cozystack.io/seaweedfs" }}
3+
apiVersion: objectstorage.k8s.io/v1alpha1
4+
kind: BucketClaim
5+
metadata:
6+
name: {{ .Release.Name }}
7+
spec:
8+
bucketClassName: {{ $seaweedfs }}
9+
protocols:
10+
- s3
11+
---
12+
apiVersion: objectstorage.k8s.io/v1alpha1
13+
kind: BucketAccess
14+
metadata:
15+
name: {{ .Release.Name }}
16+
spec:
17+
bucketAccessClassName: {{ $seaweedfs }}
18+
bucketClaimName: {{ .Release.Name }}
19+
credentialsSecretName: {{ .Release.Name }}
20+
protocol: s3
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: Role
3+
metadata:
4+
name: {{ .Release.Name }}-dashboard-resources
5+
rules:
6+
- apiGroups:
7+
- ""
8+
resources:
9+
- secrets
10+
resourceNames:
11+
- {{ .Release.Name }}
12+
verbs: ["get", "list", "watch"]

‎packages/apps/tenant/Chart.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ description: Separated tenant namespace
44
icon: /logos/tenant.svg
55

66
type: application
7-
version: 1.3.1
7+
version: 1.4.0

‎packages/apps/tenant/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,5 @@ tenant-u1
5656
| `etcd` | Deploy own Etcd cluster | `false` |
5757
| `monitoring` | Deploy own Monitoring Stack | `false` |
5858
| `ingress` | Deploy own Ingress Controller | `false` |
59+
| `seaweedfs` | Deploy own SeaweedFS | `false` |
5960
| `isolated` | Enforce tenant namespace with network policies | `false` |

‎packages/apps/tenant/templates/monitoring.yaml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ spec:
2323
interval: 1m0s
2424
timeout: 5m0s
2525
values:
26-
{{- with .Values.host }}
27-
host: grafana.{{ . }}
28-
{{- end }}
2926
metricsStorages:
3027
- name: shortterm
3128
retentionPeriod: "3d"

‎packages/apps/tenant/templates/namespace.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{- define "cozystack.namespace-anotations" }}
22
{{- $context := index . 0 }}
33
{{- $existingNS := index . 1 }}
4-
{{- range $x := list "etcd" "monitoring" "ingress" }}
4+
{{- range $x := list "etcd" "monitoring" "ingress" "seaweedfs" }}
55
{{- if (index $context.Values $x) }}
66
namespace.cozystack.io/{{ $x }}: "{{ include "tenant.name" $context }}"
77
{{- else }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{{- if .Values.seaweedfs }}
2+
apiVersion: helm.toolkit.fluxcd.io/v2
3+
kind: HelmRelease
4+
metadata:
5+
name: seaweedfs
6+
namespace: {{ include "tenant.name" . }}
7+
annotations:
8+
helm.sh/resource-policy: keep
9+
labels:
10+
cozystack.io/ui: "true"
11+
app.kubernetes.io/instance: {{ .Release.Name }}
12+
app.kubernetes.io/managed-by: {{ .Release.Service }}
13+
spec:
14+
chart:
15+
spec:
16+
chart: seaweedfs
17+
reconcileStrategy: Revision
18+
sourceRef:
19+
kind: HelmRepository
20+
name: cozystack-extra
21+
namespace: cozy-public
22+
version: "*"
23+
interval: 1m0s
24+
timeout: 5m0s
25+
{{- end }}

0 commit comments

Comments
 (0)