Skip to content

Commit

Permalink
Add Nats docs (#171)
Browse files Browse the repository at this point in the history
Signed-off-by: hmsayem <hmsayem@appscode.com>
Co-authored-by: Emruz Hossain <emruz@appscode.com>
Co-authored-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
3 people authored Oct 9, 2021
1 parent 1adf209 commit ae24248
Show file tree
Hide file tree
Showing 61 changed files with 5,367 additions and 0 deletions.
50 changes: 50 additions & 0 deletions docs/addons/nats/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: NATS Addon Overview | Stash
description: NATS Addon Overview | Stash
menu:
docs_{{ .version }}:
identifier: stash-nats-readme
name: Readme
parent: stash-nats
weight: -1
product_name: stash
menu_name: docs_{{ .version }}
section_menu_id: stash-addons
url: /docs/{{ .version }}/addons/nats/
aliases:
- /docs/{{ .version }}/addons/nats/README/
---

{{< notice type="warning" message="This is an Enterprise-only feature. Please install [Stash Enterprise Edition](/docs/setup/install/enterprise.md) to try this feature." >}}

# Stash NATS Addon

Stash `{{< param "info.version" >}}` supports extending its functionality through addons. Stash NATS addon enables Stash to backup and restore NATS streams.

This guide will give you an overview of which NATS versions are supported and how the docs are organized.

## Supported NATS Versions

Stash has the following addon versions for NATS:

{{< versionlist "nats">}}

Here, the addon follows `M.M.P` versioning scheme where `M.M.P` (Major.Minor.Patch) represents the respective NATS version.

## Addon Version Compatibility

This addon with matching major version with the NATS version should be able to take backup of that NATS streams. For example, NATS addon with version `2.x.x` should be able take backup of any NATS of `2.x.x` series. However, this might not be true for some versions. In that case, we will have separate addon for that version.

## Documentation Overview

Stash NATS documentations are organized as below:

- [How does it works?](/docs/addons/nats/overview/index.md) gives an overview of how backup and restore process for NATS works in Stash.
- [Helm managed NATS](/docs/addons/nats/helm/index.md) shows how to backup and restore a Helm managed NATS.
- **Different authentications:** shows how to backup and restore NATS using different authentication methods.
- [Basic Authentication](/docs/addons/nats/authentications/basic-auth/index.md)
- [Token Authentication](/docs/addons/nats/authentications/token-auth/index.md)
- [Nkey Authentication](/docs/addons/nats/authentications/nkey-auth/index.md)
- [JWT Authentication](/docs/addons/nats/authentications/jwt-auth/index.md)
- [TLS secured NATS](/docs/addons/nats/tls/index.md) shows how to backup and restore TLS secured NATS.
- [Customizing Backup & Restore Process](/docs/addons/nats/customization/index.md) shows how to customize the backup & restore process.
11 changes: 11 additions & 0 deletions docs/addons/nats/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Stash NATS Addon
menu:
docs_{{ .version }}:
identifier: stash-nats
name: NATS
parent: stash-addons
weight: 90
menu_name: docs_{{ .version }}
---

13 changes: 13 additions & 0 deletions docs/addons/nats/authentications/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: NATS with authentication
description: Backup and restore NATS streams using different authentication methods with Stash
menu:
docs_{{ .version }}:
identifier: stash-nats-auth
name: Authentication
parent: stash-nats
weight: 30
product_name: stash
menu_name: docs_{{ .version }}
section_menu_id: stash-addons
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: appcatalog.appscode.com/v1alpha1
kind: AppBinding
metadata:
labels:
app.kubernetes.io/instance: sample-nats
name: sample-nats
namespace: demo
spec:
clientConfig:
service:
name: sample-nats
port: 4222
scheme: nats
secret:
name: sample-nats-auth
type: nats.io/nats
version: 2.6.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: stash.appscode.com/v1beta1
kind: BackupConfiguration
metadata:
name: sample-nats-backup
namespace: demo
spec:
task:
name: nats-backup-2.6.1
schedule: "*/5 * * * *"
repository:
name: gcs-repo
target:
ref:
apiVersion: appcatalog.appscode.com/v1alpha1
kind: AppBinding
name: sample-nats
interimVolumeTemplate:
metadata:
name: sample-nats-backup-tmp-storage
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "standard"
resources:
requests:
storage: 1Gi
retentionPolicy:
name: keep-last-5
keepLast: 5
prune: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: stash.appscode.com/v1alpha1
kind: Repository
metadata:
name: gcs-repo
namespace: demo
spec:
backend:
gcs:
bucket: stash-testing
prefix: /demo/nats/sample-nats
storageSecretName: gcs-secret
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: stash.appscode.com/v1beta1
kind: RestoreSession
metadata:
name: sample-nats-restore
namespace: demo
spec:
task:
name: nats-restore-2.6.1
repository:
name: gcs-repo
target:
ref:
apiVersion: appcatalog.appscode.com/v1alpha1
kind: AppBinding
name: sample-nats
interimVolumeTemplate:
metadata:
name: nats-restore-tmp-storage
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "standard"
resources:
requests:
storage: 1Gi
rules:
- snapshots: [latest]
10 changes: 10 additions & 0 deletions docs/addons/nats/authentications/basic-auth/examples/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
labels:
app.kubernetes.io/instance: sample-nats
name: sample-nats-auth
namespace: demo
data:
password: MjIy
username: dTI=
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ae24248

Please sign in to comment.