Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release Charts

on:
push:
branches:
- main

jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.7.0
with:
charts_dir: ./
pages_branch: gh-pages
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
18 changes: 18 additions & 0 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This is the main values.yaml file for the resourcespace chart.
# More information can be found in the chart's README.md file.
#
# generated at: 2025-11-26T10:32:40-06:00
# compose files: docker-compose.yaml
# compose hash (sha1): 130407091ed05d8753a6b9ecc272bb838a11d1ca

# Name of the chart (required), basically the name of the project.
name: resourcespace
apiVersion: v2

# Version of the chart (required)
version: 0.1.5

# Version of the application (required).
# This should be the main application version.
appVersion: 0.1.5
description: A Helm chart for resourcespace
53 changes: 53 additions & 0 deletions chart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# resourcespace

A Helm chart for resourcespace

## Installing the Chart

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

```bash
# Standard Helm install
$ helm install my-release resourcespace

# To use a custom namespace and force the creation of the namespace
$ helm install my-release --namespace my-namespace --create-namespace resourcespace

# To use a custom values file
$ helm install my-release -f my-values.yaml resourcespace
```

See the [Helm documentation](https://helm.sh/docs/intro/using_helm/) for more information on installing and managing the chart.

## Configuration

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

| Parameter | Default |
| --------------------------------------------------------- | -------------------------- |
| `mariadb.imagePullPolicy` | `IfNotPresent` |
| `mariadb.persistence.mariadb.accessMode[0].value` | `ReadWriteOnce` |
| `mariadb.persistence.mariadb.enabled` | `true` |
| `mariadb.persistence.mariadb.size` | `1Gi` |
| `mariadb.persistence.mariadb.storageClass` | `-` |
| `mariadb.replicas` | `1` |
| `mariadb.repository.image` | `mariadb` |
| `mariadb.repository.tag` | `` |
| `mariadb.serviceAccount` | `` |
| `resourcespace.imagePullPolicy` | `IfNotPresent` |
| `resourcespace.ingress.class` | `-` |
| `resourcespace.ingress.enabled` | `false` |
| `resourcespace.ingress.host` | `mywebsite.com (optional)` |
| `resourcespace.ingress.path` | `/` |
| `resourcespace.ingress.tls.enabled` | `true` |
| `resourcespace.ingress.tls.secretName` | `` |
| `resourcespace.persistence.filestore.accessMode[0].value` | `ReadWriteOnce` |
| `resourcespace.persistence.filestore.enabled` | `true` |
| `resourcespace.persistence.filestore.size` | `1Gi` |
| `resourcespace.persistence.filestore.storageClass` | `-` |
| `resourcespace.replicas` | `1` |
| `resourcespace.repository.image` | `` |
| `resourcespace.repository.tag` | `` |
| `resourcespace.serviceAccount` | `` |


44 changes: 44 additions & 0 deletions chart/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Thanks to have installed {{ .Chart.Name }} {{ .Chart.Version }} as {{ .Release.Name }} ({{.Chart.AppVersion }}).

# Get release information

To learn more about the release, try:

$ helm -n {{ .Release.Namespace }} status {{ .Release.Name }}
$ helm -n {{ .Release.Namespace }} get values {{ .Release.Name }}
$ helm -n {{ .Release.Namespace }} get all {{ .Release.Name }}

# To delete the release

Use helm uninstall command to delete the release.

$ helm -n {{ .Release.Namespace }} uninstall {{ .Release.Name }}

Note that some resources may still be in use after a release is deleted. For exemple, PersistentVolumeClaims are not deleted by default for some storage classes or if some annotations are set.

# More information

You can see this notes again by running:

$ helm -n {{ .Release.Namespace }} get notes {{ .Release.Name }}

{{- $count := 0 -}}
{{- $listOfURL := "" -}}
{{- if and .Values.resourcespace.ingress .Values.resourcespace.ingress.enabled }}
{{- $count = add1 $count -}}{{- $listOfURL = printf "%s\n- http://%s" $listOfURL (tpl .Values.resourcespace.ingress.host .) -}}
{{- end }}
{{- if and .Values.mariadb.ingress .Values.mariadb.ingress.enabled }}
{{- $count = add1 $count -}}{{- $listOfURL = printf "%s\n- http://%s" $listOfURL (tpl .Values.mariadb.ingress.host .) -}}
{{- end }}
{{- if gt $count 0 }}

# List of activated ingresses URL:
{{ $listOfURL }}

You can get these urls with kubectl:

kubeclt get ingress -n {{ .Release.Namespace }}

{{- end }}

Thanks for using Helm!
36 changes: 36 additions & 0 deletions chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{{- define "resourcespace.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 -}}

{{- define "resourcespace.name" -}}
{{- if .Values.nameOverride -}}
{{- .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}

{{- define "resourcespace.labels" -}}
{{ include "resourcespace.selectorLabels" .}}
{{ if .Chart.Version -}}
{{ printf "katenary.v3/chart-version: '%s'" .Chart.Version }}
{{- end }}
{{ if .Chart.AppVersion -}}
{{ printf "katenary.v3/app-version: '%s'" .Chart.AppVersion }}
{{- end }}
{{- end -}}

{{- define "resourcespace.selectorLabels" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{ printf "katenary.v3/name: %s" $name }}
{{ printf "katenary.v3/instance: %s" .Release.Name }}
{{- end -}}
15 changes: 15 additions & 0 deletions chart/templates/mariadb/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
data:
MYSQL_DATABASE: resourcespace
MYSQL_PASSWORD: change-me
MYSQL_ROOT_PASSWORD: change-me
MYSQL_USER: resourcespace_rw
kind: ConfigMap
metadata:
annotations:
katenary.v3/compose-hash: 130407091ed05d8753a6b9ecc272bb838a11d1ca
katenary.v3/version: master
labels:
{{- include "resourcespace.labels" . | nindent 4 }}
katenary.v3/component: mariadb
name: '{{ include "resourcespace.fullname" . }}-mariadb'
59 changes: 59 additions & 0 deletions chart/templates/mariadb/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
katenary.v3/compose-hash: 130407091ed05d8753a6b9ecc272bb838a11d1ca
katenary.v3/version: master
labels:
{{- include "resourcespace.labels" . | nindent 4 }}
katenary.v3/component: mariadb
name: '{{ include "resourcespace.fullname" . }}-mariadb'
spec:
replicas: {{ .Values.mariadb.replicas }}
selector:
matchLabels:
{{- include "resourcespace.selectorLabels" . | nindent 6 }}
katenary.v3/component: mariadb
strategy: {}
template:
metadata:
labels:
{{- include "resourcespace.selectorLabels" . | nindent 8 }}
katenary.v3/component: mariadb
spec:
containers:
- envFrom:
- configMapRef:
name: '{{ include "resourcespace.fullname" . }}-mariadb'
image: '{{ tpl .Values.mariadb.repository.image $ }}:{{ tpl .Values.mariadb.repository.tag $ | default "latest" }}'
imagePullPolicy: {{ .Values.mariadb.imagePullPolicy }}
name: mariadb
ports:
- containerPort: 3306
name: mysql
{{- if .Values.mariadb.resources }}
resources:
{{ .Values.mariadb.resources | toYaml | nindent 10 }}
{{- end }}
volumeMounts:
{{- if .Values.mariadb.persistence.mariadb.enabled }}
- mountPath: /var/lib/mysql
name: mariadb
{{- end }}
{{- if .Values.pullSecrets }}
imagePullSecrets:
{{- .Values.pullSecrets | toYaml | nindent 6 }}
{{- end }}
{{- if .Values.mariadb.nodeSelector }}
nodeSelector:
{{- .Values.mariadb.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- if ne .Values.mariadb.serviceAccount "" }}
serviceAccountName: {{ .Values.mariadb.serviceAccount | quote }}
{{- end }}
volumes:
{{- if .Values.mariadb.persistence.mariadb.enabled }}
- name: mariadb
persistentVolumeClaim:
claimName: '{{ include "resourcespace.fullname" . }}-mariadb-mariadb'
{{- end }}
22 changes: 22 additions & 0 deletions chart/templates/mariadb/mariadb.volumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.mariadb.persistence.mariadb.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
katenary.v3/compose-hash: 130407091ed05d8753a6b9ecc272bb838a11d1ca
katenary.v3/version: master
labels:
{{- include "resourcespace.labels" . | nindent 4 }}
katenary.v3/component: mariadb
name: '{{ include "resourcespace.fullname" . }}-mariadb-mariadb'
spec:
accessModes:
{{- .Values.mariadb.persistence.mariadb.accessMode | toYaml | nindent 2 }}
resources:
requests:
storage: {{ tpl .Values.mariadb.persistence.mariadb.size $ }}
{{- if ne .Values.mariadb.persistence.mariadb.storageClass "-" }}
storageClassName: '{{ .Values.mariadb.persistence.mariadb.storageClass }}'
{{- end }}

{{- end }}
19 changes: 19 additions & 0 deletions chart/templates/mariadb/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
annotations:
katenary.v3/compose-hash: 130407091ed05d8753a6b9ecc272bb838a11d1ca
katenary.v3/version: master
labels:
{{- include "resourcespace.labels" . | nindent 4 }}
katenary.v3/component: mariadb
name: '{{ include "resourcespace.fullname" . }}-mariadb'
spec:
ports:
- name: mysql
port: 3306
protocol: TCP
targetPort: mysql
selector:
{{- include "resourcespace.selectorLabels" . | nindent 4 }}
katenary.v3/component: mariadb
76 changes: 76 additions & 0 deletions chart/templates/resourcespace/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
katenary.v3/compose-hash: 130407091ed05d8753a6b9ecc272bb838a11d1ca
katenary.v3/version: master
labels:
{{- include "resourcespace.labels" . | nindent 4 }}
katenary.v3/component: resourcespace
name: '{{ include "resourcespace.fullname" . }}-resourcespace'
spec:
replicas: {{ .Values.resourcespace.replicas }}
selector:
matchLabels:
{{- include "resourcespace.selectorLabels" . | nindent 6 }}
katenary.v3/component: resourcespace
strategy: {}
template:
metadata:
labels:
{{- include "resourcespace.selectorLabels" . | nindent 8 }}
katenary.v3/component: resourcespace
spec:
containers:
- image: '{{ tpl .Values.resourcespace.repository.image $ }}:{{ tpl .Values.resourcespace.repository.tag $ | default .Chart.AppVersion }}'
imagePullPolicy: {{ .Values.resourcespace.imagePullPolicy }}
name: resourcespace
ports:
- containerPort: 80
name: http
{{- if .Values.resourcespace.resources }}
resources:
{{ .Values.resourcespace.resources | toYaml | nindent 10 }}
{{- end }}
volumeMounts:
{{- if .Values.resourcespace.persistence.filestore.enabled }}
- mountPath: /var/www/html/filestore
name: filestore
{{- end }}
- mountPath: /var/www/html/include/config.php
name: config-php
subPath: config.php
{{- if .Values.pullSecrets }}
imagePullSecrets:
{{- .Values.pullSecrets | toYaml | nindent 6 }}
{{- end }}
initContainers:
- command:
- /bin/sh
- -c
- |-
until nc -z {{ include "resourcespace.fullname" . }}-mariadb 3306; do
sleep 1;
done
image: busybox:latest
name: wait-for-mariadb
{{- if .Values.resourcespace.resources }}
resources:
{{ .Values.resourcespace.resources | toYaml | nindent 10 }}
{{- end }}
{{- if .Values.resourcespace.nodeSelector }}
nodeSelector:
{{- .Values.resourcespace.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- if ne .Values.resourcespace.serviceAccount "" }}
serviceAccountName: {{ .Values.resourcespace.serviceAccount | quote }}
{{- end }}
volumes:
{{- if .Values.resourcespace.persistence.filestore.enabled }}
- name: filestore
persistentVolumeClaim:
claimName: '{{ include "resourcespace.fullname" . }}-resourcespace-filestore'
{{- end }}
- configMap:
name: '{{ include "resourcespace.fullname" . }}-resourcespace'
name: config-php
Loading