Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeiss/natz-operator
An operator to setup NATS accounting
https://github.com/zeiss/natz-operator
golang k8s nats operator
Last synced: about 1 month ago
JSON representation
An operator to setup NATS accounting
- Host: GitHub
- URL: https://github.com/zeiss/natz-operator
- Owner: ZEISS
- License: apache-2.0
- Created: 2024-09-15T18:33:42.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-11T04:23:04.000Z (about 1 month ago)
- Last Synced: 2024-10-13T01:41:26.381Z (about 1 month ago)
- Topics: golang, k8s, nats, operator
- Language: Go
- Homepage: https://zeiss.github.io/natz-operator/
- Size: 377 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kubernetes Operator for NATS Accounting
[![Release](https://github.com/ZEISS/natz-operator/actions/workflows/release.yml/badge.svg)](https://github.com/ZEISS/natz-operator/actions/workflows/release.yml)
[![Taylor Swift](https://img.shields.io/badge/secured%20by-taylor%20swift-brightgreen.svg)](https://twitter.com/SwiftOnSecurity)
[![Volkswagen](https://auchenberg.github.io/volkswagen/volkswargen_ci.svg?v=1)](https://github.com/auchenberg/volkswagen)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)A Kubernetes operator for [NATS](https://nats.io/) accounting.
## Installation
[Helm](https://helm.sh/) can be used to install the `natz-operator` to your Kubernetes cluster.
```shell
helm repo add natz-operator https://zeiss.github.io/natz-operator/helm/charts
helm repo update
helm search repo natz-operator
```## Usage
Creating the operator for the [NATS](https://nats.io/) accounting.
```yaml
apiVersion: natz.zeiss.com/v1alpha1
kind: NatsOperator
metadata:
namespace: knative-eventing
name: natsoperator-sample
spec:
```Creating an account that supports the use of jetstream.
```yaml
apiVersion: natz.zeiss.com/v1alpha1
kind: NatsAccount
metadata:
namespace: knative-eventing
name: knative-eventing-account
spec:
operatorRef:
name: natsoperator-sample
allowedUserNamespaces:
- knative-eventing
imports: []
exports: []
limits:
disk_storage: -1
streams: -1
conn: -1
imports: -1
exports: -1
subs: -1
payload: -1
data: -1
```Creating a user account.
```yaml
apiVersion: natz.zeiss.com/v1alpha1
kind: NatsUser
metadata:
namespace: knative-eventing
name: knative-eventing-user
spec:
accountRef:
namespace: knative-eventing
name: knative-eventing-account
limits:
payload: -1
subs: -1
data: -1
```## NATS Operator
The operator can be integrated with the NATS operator.
```yaml
config:
jetstream:
enabled: true
fileStore:
pvc:
size: 2Gi
resolver:
enabled: true
merge:
type: full
interval: "2m"
timeout: "1.9s"
merge:
00$include: "../custom-auth/auth.conf"
debug: true
container:
patch:
- op: add
path: "/volumeMounts/-"
value:
name: auth-config
mountPath: "/etc/custom-auth"
statefulSet:
patch:
- op: add
path: /spec/template/spec/volumes/-
value:
name: "auth-config"
secret:
defaultMode: 420
secretName: "natsoperator-sample-server-config"
```## License
[Apache 2.0](/LICENSE)