Skip to content

Commit a74e049

Browse files
authored
Merge branch 'develop' into feat/ghcr
2 parents 113d4d8 + 26f3a93 commit a74e049

File tree

5 files changed

+52
-0
lines changed

5 files changed

+52
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,13 @@ The following table lists the configurable parameters for this chart and their d
336336
| `reportsPersistence.selector` | Set the selector for PVs, if desired | `{}` |
337337
| `reportsPersistence.accessMode` | Access mode for the volume | `ReadWriteOnce` |
338338
| `reportsPersistence.size` | Size of persistent volume to request | `1Gi` |
339+
| `scriptsPersistence.enabled` | Enable storage persistence for NetBox reports | `false` |
340+
| `scriptsPersistence.existingClaim` | Use an existing `PersistentVolumeClaim` instead of creating one | `""` |
341+
| `scriptsPersistence.subPath` | Mount a sub-path of the volume into the container, not the root | `""` |
342+
| `scriptsPersistence.storageClass` | Set the storage class of the PVC (use `-` to disable provisioning) | `""` |
343+
| `scriptsPersistence.selector` | Set the selector for PVs, if desired | `{}` |
344+
| `scriptsPersistence.accessMode` | Access mode for the volume | `ReadWriteOnce` |
345+
| `scriptsPersistence.size` | Size of persistent volume to request | `1Gi` |
339346
| `podAnnotations` | Additional annotations for NetBox pods | `{}` |
340347
| `podLabels` | Additional labels for NetBox pods | `{}` |
341348
| `podSecurityContext` | Security context for NetBox pods | *see `values.yaml`* |

charts/netbox/templates/cronjob.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ spec:
8787
mountPath: /opt/netbox/netbox/reports
8888
subPath: {{ .Values.reportsPersistence.subPath | default "" | quote }}
8989
{{- end }}
90+
{{- if .Values.scriptsPersistence.enabled }}
91+
- name: scripts
92+
mountPath: /opt/netbox/netbox/scripts
93+
subPath: {{ .Values.scriptsPersistence.subPath | default "" | quote }}
94+
{{- end }}
9095
{{- with .Values.housekeeping.extraVolumeMounts }}
9196
{{- toYaml . | nindent 12 }}
9297
{{- end }}

charts/netbox/templates/deployment.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ spec:
144144
mountPath: /opt/netbox/netbox/reports
145145
subPath: {{ .Values.reportsPersistence.subPath | default "" | quote }}
146146
{{- end }}
147+
{{- if .Values.scriptsPersistence.enabled }}
148+
- name: scripts
149+
mountPath: /opt/netbox/netbox/scripts
150+
subPath: {{ .Values.scriptsPersistence.subPath | default "" | quote }}
151+
{{- end }}
147152
- name: optunit
148153
mountPath: /opt/unit
149154
- name: secrets
@@ -225,6 +230,11 @@ spec:
225230
persistentVolumeClaim:
226231
claimName: {{ .Values.reportsPersistence.existingClaim | default (printf "%s-reports" (include "common.names.fullname" .)) }}
227232
{{- end }}
233+
{{- if .Values.scriptsPersistence.enabled }}
234+
- name: scripts
235+
persistentVolumeClaim:
236+
claimName: {{ .Values.scriptsPersistence.existingClaim | default (printf "%s-scripts" (include "common.names.fullname" .)) }}
237+
{{- end }}
228238
{{- with .Values.extraVolumes }}
229239
{{- toYaml . | nindent 6 }}
230240
{{- end }}

charts/netbox/templates/worker-deployment.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ spec:
9696
mountPath: /opt/netbox/netbox/reports
9797
subPath: {{ .Values.reportsPersistence.subPath | default "" | quote }}
9898
{{- end }}
99+
{{- if .Values.scriptsPersistence.enabled }}
100+
- name: scripts
101+
mountPath: /opt/netbox/netbox/scripts
102+
subPath: {{ .Values.scriptsPersistence.subPath | default "" | quote }}
103+
{{- end }}
99104
{{- with .Values.worker.extraVolumeMounts }}
100105
{{- toYaml . | nindent 8 }}
101106
{{- end }}

charts/netbox/values.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,31 @@ reportsPersistence:
547547
accessMode: ReadWriteOnce
548548
size: 1Gi
549549
annotations: {}
550+
## Enable scripts persistence using Persistent Volume Claims
551+
## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
552+
## @param scriptsPersistence.enabled Enable reports persistence using PVC
553+
## @param scriptsPersistence.storageClass PVC Storage Class for volume
554+
## @param scriptsPersistence.accessMode PVC Access Mode for volume
555+
## @param scriptsPersistence.size PVC Storage Request for volume
556+
## @param scriptsPersistence.subPath Existing claim's subPath to use, e.g. "media" (optional)
557+
## @param scriptsPersistence.existingClaim Name of an existing PVC to be used
558+
## @param scriptsPersistence.annotations Annotations to add to the PVC
559+
##
560+
scriptsPersistence:
561+
enabled: false
562+
existingClaim: ""
563+
subPath: ""
564+
## Data Persistent Volume Storage Class
565+
## If defined, storageClassName: <storageClass>
566+
## If set to "-", storageClassName: "", which disables dynamic provisioning
567+
## If undefined (the default) or set to null, no storageClassName spec is
568+
## set, choosing the defaserviceMonitorult provisioner. (gp2 on AWS, standard on
569+
## GKE, AWS & OpenStack)
570+
##
571+
storageClass: ""
572+
accessMode: ReadWriteOnce
573+
size: 1Gi
574+
annotations: {}
550575
## @param updateStrategy.type Deployment strategy type
551576
## @param updateStrategy.rollingUpdate Deployment rolling update configuration parameters
552577
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy

0 commit comments

Comments
 (0)