Skip to content

Commit

Permalink
Merge pull request #12 from cryptpad/docs/better-readme
Browse files Browse the repository at this point in the history
Docs: improve the README
  • Loading branch information
gsautner authored Sep 22, 2023
2 parents 2a1751c + d3bbd70 commit 061e3b0
Show file tree
Hide file tree
Showing 9 changed files with 428 additions and 17 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Generate Helm documentation

on:
push:
branches:
- main
paths:
- '.github/**'
- 'charts/**'

permissions:
contents: write

jobs:
update-chart-metadata:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gabe565/setup-helm-docs-action@v1
- run: helm-docs
- name: Commit documentation
run: |
git config --global user.name '$GITHUB_ACTOR'
git config --global user.email '[email protected]'
git add .
git commit -sm "docs: generate chart documentation"
git push
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '.github/**'
- 'charts/**'
- '!**.md'
- '!**.md.gotmpl'

jobs:

Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
If you want to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.
99 changes: 92 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,106 @@
# CryptPad Helm Chart
<div align="center">

This is the [CryptPad](https://cryptpad.org) [Helm Chart](https://helm.sh/) for easy deployment on Kubernetes.
<img src="assets/logo.png" alt="logo" width="300" height="auto" />
<h1>CryptPad Helm Chart</h1>


<!-- Badges -->
<p>
<a href="https://github.com/cryptpad/helm/graphs/contributors">
<img src="https://img.shields.io/github/contributors/cryptpad/helm" alt="contributors" />
</a>
<a href="https://github.com/cryptpad/helm/commits/main">
<img src="https://img.shields.io/github/last-commit/cryptpad/helm" alt="last update" />
</a>
<a href="https://github.com/cryptpad/helm/network/members">
<img src="https://img.shields.io/github/forks/cryptpad/helm" alt="forks" />
</a>
<a href="https://github.com/cryptpad/cryptpad/helm">
<img src="https://img.shields.io/github/stars/cryptpad/helm" alt="stars" />
</a>
<a href="https://github.com/cryptpad/helm/issues/">
<img src="https://img.shields.io/github/issues/cryptpad/helm" alt="open issues" />
</a>
<a href="https://github.com/cryptpad/helm/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/cryptpad/helm.svg" alt="license" />
</a>
</p>

<h4>
<a href="https://github.com/cryptpad/helm">Documentation</a>
<span> · </span>
<a href="https://github.com/cryptpad/helm/issues/">Report Bug</a>
<span> · </span>
<a href="https://github.com/cryptpad/helm/issues/">Request Feature</a>
</h4>
</div>

## Requirements
<br />

* Kubernetes 1.23+
<!-- Table of Contents -->
# :notebook_with_decorative_cover: Table of Contents

## Usage
- [:notebook\_with\_decorative\_cover: Table of Contents](#notebook_with_decorative_cover-table-of-contents)
- [:star2: About the Project](#star2-about-the-project)
- [:toolbox: Getting Started](#toolbox-getting-started)
- [:bangbang: Prerequisites](#bangbang-prerequisites)
- [:books: Documentation](#books-documentation)
- [:fast\_forward: TL;DR;](#fast\_forward-tldr)
- [:test\_tube: Running Tests](#test_tube-running-tests)
- [:wave: Contributing](#wave-contributing)
- [:warning: License](#warning-license)

<!-- About the Project -->
## :star2: About the Project

This is the [Helm Chart](https://helm.sh/) for easy deployment of [CryptPad](https://cryptpad.org) on Kubernetes.

<!-- Getting Started -->
## :toolbox: Getting Started

<!-- Prerequisites -->
### :bangbang: Prerequisites

This project requires [Kubernetes 1.23+](https://kubernetes.io/) and [Helm](https://helm.sh/docs/intro/install/) installed on your system

### :books: Documentation

* Check documentation on [README.md](charts/cryptpad/README.md) on charts/cryptpad.

### :fast_forward: TL;DR;

Install the Helm Chart using:

```bash
helm repo add cryptpad-github https://cryptpad.github.io/helm
helm install cryptpad cryptpad-github/cryptpad
```

Check [values.yaml](charts/cryptpad/values.yaml) for custom values/settings.
<!-- Running Tests -->
### :test_tube: Running Tests

To run tests, run the following command

```bash
for FILE in charts/*; do
helm unittest $FILE
done
```

<!-- Contributing -->
## :wave: Contributing

<a href="https://github.com/cryptpad/helm/graphs/contributors">
<img src="https://contrib.rocks/image?repo=cryptpad/helm" />
</a>


Contributions are always welcome!

See `CONTRIBUTING.md` for ways to get started.

# License
<!-- License -->
## :warning: License

![AGPL logo](https://www.gnu.org/graphics/agplv3-155x51.png "GNU Affero General Public License")

Expand Down
Binary file added assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions charts/cryptpad/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- open office
- storage
- end2end
description: CryptPad is a collaboration suite that is end-to-end-encrypted and open-source.
description: CryptPad is a collaboration office suite that is end-to-end-encrypted and open-source.
home: https://cryptpad.org
icon: https://cryptpad.org/images/CryptPad_logo_text.svg
# A chart can be either an 'application' or a 'library' chart.
Expand All @@ -21,7 +21,7 @@ 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.0.8
version: 0.0.9

# 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
Expand Down
169 changes: 169 additions & 0 deletions charts/cryptpad/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# cryptpad

CryptPad is a collaboration office suite that is end-to-end-encrypted and open-source.

![Version: 0.0.9](https://img.shields.io/badge/Version-0.0.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

## Installing the Chart

Install the Helm Chart using:

```console
helm repo add cryptpad-github https://cryptpad.github.io/helm
helm install cryptpad cryptpad-github/cryptpad
```

### Configure and Customization

Values example of how customize your intance:

```yaml
# https://docs.cryptpad.org/en/admin_guide/installation.html#configure-cryptpad
config:
adminKeys: [
"[[email protected]/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]",
]

# https://docs.cryptpad.org/en/admin_guide/customization.html#application-config
application_config:
availableLanguages: [ 'en', 'de', 'fr', 'pt-br' ]
availablePadTypes: [ 'drive', 'teams', 'sheet', 'doc', 'presentation', 'pad', 'kanban', 'code', 'form', 'poll', 'whiteboard',
'file', 'contacts', 'slide', 'convert', 'diagram' ]
privacy: |
{
"default": 'https://example.com/privacy.html',
"en": 'https://example.com/privacy.en.html', // in case English is not your default language
"de": 'https://example.com/privacy.de.html', // you get the idea?
}
```
## Requirements
| Repository | Name | Version |
|------------|------|---------|
| https://charts.bitnami.com/bitnami | common | 2.9.1 |
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Values for the Affinity |
| application_config | string | `nil` | Configuration of the [application](https://docs.cryptpad.org/en/admin_guide/customization.html#application-config) |
| autoscaling.enabled | bool | `false` | Enable the Autoscaling |
| autoscaling.maxReplicas | int | `100` | Maximum numbers of replicas |
| autoscaling.minReplicas | int | `1` | Minimal numbers of replicas |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | Percentage of the targeted CPU Utilization |
| autoscaling.targetMemoryUtilizationPercentage | int | `80` | Percentage of the targeted Memory Utilization |
| config.adminKeys | list | `[]` | Public signing key of users to give admin panel access |
| config.archivePath | string | `"./data/archive"` | Directory to archive data for a configurable period before deleting it. |
| config.blobPath | string | `"./blob"` | Directory to store encrypted files that was uploaded. |
| config.blobStagingPath | string | `"./data/blobstage"` | Directory to store incomplete blobs in a 'staging' area until they are fully uploaded. |
| config.blockPath | string | `"./block"` | Directory to store authenticated blocks. |
| config.decreePath | string | `"./data/decrees"` | TODO |
| config.filePath | string | `"./datastore/"` | Directory where files/documents should be stored. |
| config.httpAddress | string | `"0.0.0.0"` | httpAddress specifies the address on which the nodejs server should be accessible. |
| config.installMethod | string | `"helm-docker"` | |
| config.logFeedback | bool | `false` | Enable feedback log, but requires feedback on log level to work. |
| config.logLevel | string | `"info"` | Change log level from this list below by order of importance: (silly, verbose, debug, feedback, info, warn, error). |
| config.logPath | string | `"./data/logs"` | Directory to store logging events. |
| config.logToStdout | bool | `false` | Log activity to stdout, this may be useful for debugging |
| config.pinPath | string | `"./data/pins"` | Directory to store documents that was pinned to to be stored by the server indefinitely. |
| config.taskPath | string | `"./data/tasks"` | Directory to store a list of scheduled tasks. |
| config.verbose | bool | `false` | Enable verbose logging |
| cpadConfig | string | `"/cryptpad/config/config.js"` | File to mount for the CPAD Configuration (`CPAD_CONF`) |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"cryptpad/cryptpad"` | |
| image.tag | string | `"version-5.4.0"` | |
| imagePullSecrets | list | `[]` | |
| ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | |
| ingress.enabled | bool | `false` | |
| ingress.hosts[0].host | string | `"localhost"` | |
| ingress.hosts[0].paths[0].path | string | `"/"` | |
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
| ingress.tls | list | `[]` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | Values for the Node Selector |
| persistence.cryptpad.blob.accessModes[0] | string | `"ReadWriteOnce"` | |
| persistence.cryptpad.blob.annotations | object | `{}` | |
| persistence.cryptpad.blob.dataSource | object | `{}` | |
| persistence.cryptpad.blob.existingClaim | string | `""` | |
| persistence.cryptpad.blob.labels | object | `{}` | |
| persistence.cryptpad.blob.selector | object | `{}` | |
| persistence.cryptpad.blob.size | string | `"100Mi"` | |
| persistence.cryptpad.blob.storageClass | string | `""` | |
| persistence.cryptpad.block.accessModes[0] | string | `"ReadWriteOnce"` | |
| persistence.cryptpad.block.annotations | object | `{}` | |
| persistence.cryptpad.block.dataSource | object | `{}` | |
| persistence.cryptpad.block.existingClaim | string | `""` | |
| persistence.cryptpad.block.labels | object | `{}` | |
| persistence.cryptpad.block.selector | object | `{}` | |
| persistence.cryptpad.block.size | string | `"100Mi"` | |
| persistence.cryptpad.block.storageClass | string | `""` | |
| persistence.cryptpad.data.accessModes[0] | string | `"ReadWriteOnce"` | |
| persistence.cryptpad.data.annotations | object | `{}` | |
| persistence.cryptpad.data.dataSource | object | `{}` | |
| persistence.cryptpad.data.existingClaim | string | `""` | |
| persistence.cryptpad.data.labels | object | `{}` | |
| persistence.cryptpad.data.selector | object | `{}` | |
| persistence.cryptpad.data.size | string | `"100Mi"` | |
| persistence.cryptpad.data.storageClass | string | `""` | |
| persistence.cryptpad.datastore.accessModes[0] | string | `"ReadWriteOnce"` | |
| persistence.cryptpad.datastore.annotations | object | `{}` | |
| persistence.cryptpad.datastore.dataSource | object | `{}` | |
| persistence.cryptpad.datastore.existingClaim | string | `""` | |
| persistence.cryptpad.datastore.labels | object | `{}` | |
| persistence.cryptpad.datastore.selector | object | `{}` | |
| persistence.cryptpad.datastore.size | string | `"100Mi"` | |
| persistence.cryptpad.datastore.storageClass | string | `""` | |
| persistence.enabled | bool | `true` | Enable the persistence |
| podAnnotations | object | `{}` | Annotations for the Pod |
| podSecurityContext | object | `{"fsGroup":4001}` | Security context for the Pod |
| replicaCount | int | `1` | Number of replicas |
| resources | object | `{}` | Specify default resources. We usually recommend not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. |
| securityContext | object | `{}` | Security context |
| service.externalIPs | list | `[]` | |
| service.externalPort | int | `80` | |
| service.internalPort | string | `"http"` | |
| service.name | string | `"http"` | |
| service.portName | string | `"node"` | |
| service.sessionAffinity | string | `"ClientIP"` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| tolerations | list | `[]` | Values for the Tolerations |
| workloadStateful | bool | `true` | Enable to choose witch kind of workload will be used: (true) StatefulSet or (false) for Deployment |

## Backup

Important volumes or paths (in case different solution like empty/sidecar backup tools) to be considered:

* **cryptpad-blob** volume, or **/cryptpad/blob**
* **cryptpad-block** volume, or **/cryptpad/block**
* **cryptpad-data** volume, or **/cryptpad/data**
* **cryptpad-datastore** volume, or **/cryptpad/datastore**

And configuration file or command line with preferences used to install Helm release.

There are some tools that can manage the backups on k8s workloads. We can suggest [Velero](https://velero.io/), as we already used on some internal clusters.

There is specific product documentation on: https://docs.cryptpad.org/en/admin_guide/maintenance.html#backup-and-migration

## Logging

Current logging resources are standard [Kubernetes logging](https://kubernetes.io/docs/concepts/cluster-administration/logging/).

Example of how change log levels from instance:

```yaml
config:
verbose: false
logToStdout: false
logLevel: 'info'
logFeedback: false
```

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2)
Loading

0 comments on commit 061e3b0

Please sign in to comment.