Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gertzakis committed Jan 8, 2024
1 parent 0d9ed48 commit 6133df7
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 2 deletions.
39 changes: 37 additions & 2 deletions contrib/minikube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,45 @@ nautobot:
resources:
requests: null
limits: null
singleInit: true
initContainers:
- name: collectstatic
image: ghcr.io/nautobot/nautobot:2.0.5-py3.11
imagePullPolicy: Always
command: ['nautobot-server', 'collectstatic']
volumeMounts:
- mountPath: "/opt/nautobot/static"
name: "nautobot-static"
readOnly: false

nginx:
enabled: false
resources:
requests: null
limits: null

nautobots:
# Enable a separate deployment specifically for API requests
default:
initNautobot: false

# static:
# enabled: true
# ingressPaths:
# - "/static"
# initNautobot: true
# # staticFilesOnly: true

# initContainers:
# - name: collectstatic
# image: ghcr.io/nautobot/nautobot:2.0.5-py3.11
# imagePullPolicy: Always
# command: ['nautobot-server', 'collectstatic']
# volumeMounts:
# - mountPath: "/opt/nautobot/static"
# name: "nautobot-static"
# readOnly: false

workers:
default:
pdb:
Expand All @@ -44,9 +77,11 @@ workers:

ingress:
enabled: true
hostname: "nautobot.minikube.local"
hostname: "nautobot-test.internal"
ingressClassName: "nginx"
backendProtocol: "http"
annotations:
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"

metrics:
enabled: false
1 change: 1 addition & 0 deletions docs/advanced-features/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ With [Kubernetes](https://kubernetes.io/), public clouds, and the [dependency su
* [Ingress](ingress/)
* [MySQL Support](mysql/)
* [Nautobot as a Subchart](nautobot-as-subchart/)
* [Persistent Volume](persistence/)
* [PostgreSQL High Availability](postgresql-ha/)
* [PostgreSQL TLS](postgresql-tls/)
* [Prometheus Operator Metrics](prometheus-metrics/)
Expand Down
29 changes: 29 additions & 0 deletions docs/advanced-features/persistence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Persistence for Static files

If you want you can enable persistence for the static files of Nautobot. This configuration creates a Persistent Volume Claim called `nautobot-static` and mount it at `/opt/nautobot/static` path of the Pods. Unfortunately, if your underlying storage solution doesn't support `ReadWriteMany` option, you have to use node affinity in order for the Pods of the deployment to be scheduled in the same node as the Persistant Volume.

```yaml
nautobot:
persistence:
enabled: true
storageClass: "your-storage-class"
accessMode: "ReadWriteMany"
size: "2Gi"
```
Below there is an example that is using Node labels as selector to create the PVC and schedule the Pods in the same node.
```yaml
nautobot:
persistence:
enabled: true
storageClass: "your-storage-class"
size: "2Gi"
selector:
matchLabel:
nautobot-storage: static

# Selector for the Pods of the deployment.
nodeSelector:
nautobot-storage: static
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ nav:
- Ingress: "advanced-features/ingress.md"
- MySQL Support: "advanced-features/mysql.md"
- Nautobot as a Subchart: "advanced-features/nautobot-as-subchart.md"
- Persistent Volume: "advanced-features/persistence.md"
- PostgreSQL High Availability: "advanced-features/postgresql-ha.md"
- PostgreSQL TLS: "advanced-features/postgresql-tls.md"
- Prometheus Operator Metrics: "advanced-features/prometheus-metrics.md"
Expand Down

0 comments on commit 6133df7

Please sign in to comment.