Skip to content

Commit

Permalink
Add SeaweedFS
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Kvapil <[email protected]>
  • Loading branch information
kvaps committed Jul 31, 2024
1 parent 28f9191 commit 319b307
Show file tree
Hide file tree
Showing 65 changed files with 7,804 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/apps/tenant/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ description: Separated tenant namespace
icon: /logos/tenant.svg

type: application
version: 1.3.0
version: 1.4.0
1 change: 1 addition & 0 deletions packages/apps/tenant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@ tenant-u1
| `etcd` | Deploy own Etcd cluster | `false` |
| `monitoring` | Deploy own Monitoring Stack | `false` |
| `ingress` | Deploy own Ingress Controller | `false` |
| `seaweedfs` | Deploy own SeaweedFS | `false` |
| `isolated` | Enforce tenant namespace with network policies | `false` |
9 changes: 7 additions & 2 deletions packages/apps/tenant/templates/monitoring.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{{- $parentNS := lookup "v1" "Namespace" "" .Release.Namespace }}
{{- $parentHost := index $parentNS.metadata.annotations "namespace.cozystack.io/host" }}
{{- $host := printf "%s.%s" (include "tenant.name" .) $parentHost }}
{{- if .Values.monitoring }}
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
Expand All @@ -23,8 +26,10 @@ spec:
interval: 1m0s
timeout: 5m0s
values:
{{- with .Values.host }}
host: grafana.{{ . }}
{{- if .Values.host }}
host: grafana.{{ .Values.host }}
{{- else }}
host: grafana.{{ $host }}
{{- end }}
metricsStorages:
- name: shortterm
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/tenant/templates/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metadata:
{{ $parentHost := index $existingNS.metadata.annotations "namespace.cozystack.io/host" | required (printf "namespace %s has no namespace.cozystack.io/host annotation" $.Release.Namespace) }}
namespace.cozystack.io/host: "{{ splitList "-" (include "tenant.name" .) | last }}.{{ $parentHost }}"
{{- end }}
{{- range $x := list "etcd" "monitoring" "ingress" }}
{{- range $x := list "etcd" "monitoring" "ingress" "seaweedfs" }}
{{- if (index $.Values $x) }}
namespace.cozystack.io/{{ $x }}: "{{ include "tenant.name" $ }}"
{{- else }}
Expand Down
34 changes: 34 additions & 0 deletions packages/apps/tenant/templates/seaweedfs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{- $parentNS := lookup "v1" "Namespace" "" .Release.Namespace }}
{{- $parentHost := index $parentNS.metadata.annotations "namespace.cozystack.io/host" }}
{{- $host := printf "%s.%s" (include "tenant.name" .) $parentHost }}
{{- if .Values.seaweedfs }}
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: seaweedfs
namespace: {{ include "tenant.name" . }}
annotations:
helm.sh/resource-policy: keep
labels:
cozystack.io/ui: "true"
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
chart:
spec:
chart: seaweedfs
reconcileStrategy: Revision
sourceRef:
kind: HelmRepository
name: cozystack-extra
namespace: cozy-public
version: "*"
interval: 1m0s
timeout: 5m0s
values:
{{- if .Values.host }}
host: seaweedfs.{{ .Values.host }}
{{- else }}
host: seaweedfs.{{ $host }}
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions packages/apps/tenant/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
"description": "Deploy own Ingress Controller",
"default": false
},
"seaweedfs": {
"type": "boolean",
"description": "Deploy own SeaweedFS",
"default": false
},
"isolated": {
"type": "boolean",
"description": "Enforce tenant namespace with network policies",
Expand Down
2 changes: 2 additions & 0 deletions packages/apps/tenant/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
## @param etcd Deploy own Etcd cluster
## @param monitoring Deploy own Monitoring Stack
## @param ingress Deploy own Ingress Controller
## @param seaweedfs Deploy own SeaweedFS
## @param isolated Enforce tenant namespace with network policies
host: ""
etcd: false
monitoring: false
ingress: false
seaweedfs: false
isolated: false
3 changes: 2 additions & 1 deletion packages/apps/versions_map
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ tenant 0.1.5 e3ab858
tenant 1.0.0 7cd7de7
tenant 1.1.0 4da8ac3b
tenant 1.2.0 15478a88
tenant 1.3.0 HEAD
tenant 1.3.0 ceefae03
tenant 1.4.0 HEAD
virtual-machine 0.1.4 f2015d6
virtual-machine 0.1.5 7cd7de7
virtual-machine 0.2.0 HEAD
Expand Down
6 changes: 3 additions & 3 deletions packages/core/installer/images/cozystack.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"buildx.build.ref": "cozystack/cozystack0/zk58yqp4vkrfgx3gdjumn9k70",
"buildx.build.ref": "cozystack/cozystack0/1nn9cmrzajr4lm569se8clyo4",
"containerimage.descriptor": {
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"digest": "sha256:b92988122fa68adc85751384170a46895b5761cc5bf27e80b0b53b12b89b6d6c",
"digest": "sha256:ef4838ce34d19eecc8b330607b7d2e3b1c02352c9ab6cb72a8f610dcc9727275",
"size": 685
},
"containerimage.digest": "sha256:b92988122fa68adc85751384170a46895b5761cc5bf27e80b0b53b12b89b6d6c",
"containerimage.digest": "sha256:ef4838ce34d19eecc8b330607b7d2e3b1c02352c9ab6cb72a8f610dcc9727275",
"image.name": "ghcr.io/aenix-io/cozystack/cozystack:latest"
}
3 changes: 3 additions & 0 deletions packages/extra/seaweedfs/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.helmignore
/logos
/Makefile
25 changes: 25 additions & 0 deletions packages/extra/seaweedfs/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v2
name: seaweedfs
description: Seaweedfs
icon: /logos/seaweedfs.svg

# 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: "3.71"
2 changes: 2 additions & 0 deletions packages/extra/seaweedfs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
generate:
readme-generator -v values.yaml -s values.schema.json -r README.md
12 changes: 12 additions & 0 deletions packages/extra/seaweedfs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Managed NATS Service

## Parameters

### Common parameters

| Name | Description | Value |
| ---------- | --------------------------------------------------------------------------------------------------------- | ----- |
| `host` | The hostname used to access the grafana externally (defaults to 'grafana' subdomain for the tenant host). | `""` |
| `replicas` | Persistent Volume size for NATS | `2` |
| `size` | Persistent Volume size | `4Gi` |

Loading

0 comments on commit 319b307

Please sign in to comment.