Skip to content

Commit

Permalink
[netbox] Release version 5.0.2
Browse files Browse the repository at this point in the history
[netbox] Release version 5.0.2
  • Loading branch information
firmansyahn authored Jan 31, 2024
2 parents f9ba806 + 2a5794c commit 74aca41
Show file tree
Hide file tree
Showing 36 changed files with 3,507 additions and 1,013 deletions.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"yaml.schemas": {
"https://json.schemastore.org/helmfile.json": "vscode-vfs://github%2B7b2276223a312c22726566223a7b2274797065223a342c226964223a226e6574626f78227d7d/startechnica/apps/charts/netbox/archive/deployment_full.yaml"
}
}
11 changes: 8 additions & 3 deletions charts/netbox/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
annotations:
licenses: Apache-2.0
images: |
- name: netbox
image: docker.io/netboxcommunity/netbox:v3.7-2.8.0
apiVersion: v2
name: netbox
version: 5.0.0
appVersion: v3.6.4
version: 5.0.2
appVersion: v3.7.1
kubeVersion: ">=1.25.0"
description: IP address management (IPAM) and data center infrastructure management (DCIM) tool
home: https://github.com/bootc/netbox-chart
Expand Down Expand Up @@ -30,5 +35,5 @@ dependencies:
alias: bitnami-common
- name: st-common
repository: https://startechnica.github.io/apps
version: "*"
version: 0.x.x
alias: startechnica-common
32 changes: 26 additions & 6 deletions charts/netbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ data center infrastructure management (DCIM) tool.

Forked from [bootc/netbox-chart](https://github.com/bootc/netbox-chart)

**Note:** This repository was forked from [bootc/netbox-chart](https://github.com/bootc/netbox-chart) at versions
v5.0.0 and up are from this fork and will have diverged from any changes in the original fork. A list of changes can be seen in the CHANGELOG.

**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/startechnica/apps/issues/new/choose)**

## TL;DR
Expand Down Expand Up @@ -57,7 +60,9 @@ with Sentinel (e.g. using [Aaron Layfield](https://github.com/DandyDeveloper)'s
[redis-ha chart](https://github.com/DandyDeveloper/charts/tree/master/charts/redis-ha)).

Set `persistence.enabled` to `false` and use the S3 `storageBackend` for object
storage. This works well with Minio or Ceph RGW as well as Amazon S3. See [Using extraConfig for S3 storage configuration](#using-extraconfig-for-s3-storage-configuration) and [Persistent storage pitfalls](#persistent-storage-pitfalls), below.
storage. This works well with Minio or Ceph RGW as well as Amazon S3. See
[Using extraConfig for S3 storage configuration](#using-extraconfig-for-s3-storage-configuration) and
[Persistent storage pitfalls](#persistent-storage-pitfalls), below.

Run multiple replicas of the NetBox web front-end to avoid interruptions during
upgrades or at other times when the pods need to be restarted. There's no need
Expand Down Expand Up @@ -87,6 +92,21 @@ $ helm delete netbox --namespace netbox

The command removes all the Kubernetes components associated with the chart and deletes the release.

## Breaking Changes
* The `extraEnvs` setting has been renamed to `extraEnvVars`.
* The `extraContainers` setting has been renamed to `sidecars`.
* The `extraContainers` setting has been renamed to `sidecars`.
* The `extraInitContainers` setting has been renamed to `initContainers`.
* The `securityContext` setting has been renamed to `podSecurityContext` and `containerSecurityContext`.
* The `ingress.className` setting has been renamed to `ingress.ingressClassName`.
* The `housekeeping.securityContext` setting has been renamed to `housekeeping.containerSecurityContext`
* The `worker.autoscaling.targetCPUUtilizationPercentage` setting has been renamed to `worker.autoscaling.targetCPU`.
* The `worker.autoscaling.targetMemoryUtilizationPercentage` setting has been renamed to `worker.autoscaling.targetMemory`.
* The `worker.extraEnvs` setting has been renamed to `worker.extraEnvVars`.
* The `serviceMonitor` setting has been renamed to `metrics.serviceMonitor`.
* The `metricsEnabled` setting has been renamed to `metrics.enabled`.
* The `serviceMonitor` setting has been renamed to `metrics.serviceMonitor`.

## Upgrading

### Bundled PostgreSQL
Expand Down Expand Up @@ -181,7 +201,7 @@ The following table lists the configurable parameters for this chart and their d
| `email.server` | SMTP server to use to send emails | `localhost` |
| `email.port` | TCP port to connect to the SMTP server on | `25` |
| `email.username` | Optional username for SMTP authentication | `""` |
| `email.password` | Password for SMTP authentication (see also `existingSecret`) | `""` |
| `email.password` | Password for SMTP authentication (see also `existingSecretName`) | `""` |
| `email.useSSL` | Use SSL when connecting to the server | `false` |
| `email.useTLS` | Use TLS when connecting to the server | `false` |
| `email.sslCertFile` | SMTP SSL certificate file path (e.g. in a mounted volume) | `""` |
Expand Down Expand Up @@ -269,7 +289,7 @@ The following table lists the configurable parameters for this chart and their d
| `shortDateTimeFormat` | Django date format for short-form date and time strongs | `"Y-m-d H:i"` |
| `extraConfig` | Additional NetBox configuration (see `values.yaml`) | `[]` |
| `secretKey` | Django secret key used for sessions and password reset tokens | `""` (generated) |
| `existingSecret` | Use an existing Kubernetes `Secret` for secret values (see below) | `""` (use individual chart values) |
| `existingSecretName` | Use an existing Kubernetes `Secret` for secret values (see below) | `""` (use individual chart values) |
| `overrideUnitConfig` | Override the NGINX Unit application server configuration | `{}` (*see values.yaml*) |
| `postgresql.enabled` | Deploy PostgreSQL using bundled Bitnami PostgreSQL chart | `true` |
| `postgresql.auth.username` | Username to create for NetBox in bundled PostgreSQL instance | `netbox` |
Expand All @@ -279,7 +299,7 @@ The following table lists the configurable parameters for this chart and their d
| `externalDatabase.port` | Port number for external PostgreSQL | `5432` |
| `externalDatabase.database` | Database name for external PostgreSQL | `netbox` |
| `externalDatabase.username` | Username for external PostgreSQL | `netbox` |
| `externalDatabase.password` | Password for external PostgreSQL (see also `existingSecret`) | `""` |
| `externalDatabase.password` | Password for external PostgreSQL (see also `existingSecretName`) | `""` |
| `externalDatabase.existingSecretName` | Fetch password for external PostgreSQL from a different `Secret` | `""` |
| `externalDatabase.existingSecretKey` | Key to fetch the password in the above `Secret` | `postgresql-password` |
| `externalDatabase.sslMode` | PostgreSQL client SSL Mode setting | `prefer` |
Expand All @@ -298,7 +318,7 @@ The following table lists the configurable parameters for this chart and their d
| `tasksRedis.sentinelService` | Sentinel master service name | `"netbox-redis"` |
| `tasksRedis.sentinelTimeout` | Sentinel connection timeout, in seconds | `300` (5 minutes) |
| `tasksRedis.username` | Username for external Redis | `""` |
| `tasksRedis.password` | Password for external Redis (see also `existingSecret`) | `""` |
| `tasksRedis.password` | Password for external Redis (see also `existingSecretName`) | `""` |
| `tasksRedis.existingSecretName` | Fetch password for external Redis from a different `Secret` | `""` |
| `tasksRedis.existingSecretKey` | Key to fetch the password in the above `Secret` | `redis-password` |
| `cachingRedis.database` | Redis database number used for caching views | `1` |
Expand All @@ -311,7 +331,7 @@ The following table lists the configurable parameters for this chart and their d
| `cachingRedis.sentinelService` | Sentinel master service name | `"netbox-redis"` |
| `cachingRedis.sentinelTimeout` | Sentinel connection timeout, in seconds | `300` (5 minutes) |
| `cachingRedis.username` | Username for external Redis | `""` |
| `cachingRedis.password` | Password for external Redis (see also `existingSecret`) | `""` |
| `cachingRedis.password` | Password for external Redis (see also `existingSecretName`) | `""` |
| `cachingRedis.existingSecretName` | Fetch password for external Redis from a different `Secret` | `""` |
| `cachingRedis.existingSecretKey` | Key to fetch the password in the above `Secret` | `redis-password` |
| `imagePullSecrets` | List of `Secret` names containing private registry credentials | `[]` |
Expand Down
23 changes: 23 additions & 0 deletions charts/netbox/templates/ConfigMap/env-vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-env-vars" (include "netbox.fullname" .) }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: netbox
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
{{- if not .Values.externalDatabase.existingSecretHostKey }}
NETBOX_DATABASE_HOST: {{ include "netbox.databaseHost" . | quote }}
{{- end }}
{{- if not .Values.externalDatabase.existingSecretPortKey }}
NETBOX_DATABASE_PORT: {{ include "netbox.databasePort" . | quote }}
{{- end }}
{{- if not .Values.externalDatabase.existingSecretDatabaseKey }}
NETBOX_DATABASE_NAME: {{ include "netbox.databaseName" . | quote }}
{{- end }}
{{- if not .Values.externalDatabase.existingSecretUserKey }}
NETBOX_DATABASE_USER: {{ include "netbox.databaseUser" . | quote }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "netbox.fullname" . }}
{{- with .Values.commonAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
name: {{ printf "%s" (include "netbox.fullname" .) }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
labels:
{{- include "netbox.labels" . | nindent 4 }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
data:
configuration.py: |-
import re
Expand Down Expand Up @@ -55,6 +53,7 @@ data:
_load_yaml()
# db_password: {{ include "common.secrets.lookup" (dict "secret" (include "netbox.databaseSecretName" .) "key" (include "netbox.databaseSecretPasswordKey" .) "defaultValue" .Values.postgresql.auth.password "context" $) }}
DATABASE["PASSWORD"] = _load_secret("netbox", "db_password")
EMAIL["PASSWORD"] = _load_secret("netbox", "email_password")
REDIS["tasks"]["PASSWORD"] = _load_secret("netbox", "redis_tasks_password")
Expand All @@ -78,17 +77,10 @@ data:
ALLOWED_HOSTS: {{ toJson .Values.allowedHosts }}
DATABASE:
{{ if .Values.postgresql.enabled -}}
HOST: {{ include "postgresql.v1.primary.fullname" .Subcharts.postgresql | quote }}
USER: {{ include "postgresql.v1.username" .Subcharts.postgresql | quote }}
NAME: {{ include "postgresql.v1.database" .Subcharts.postgresql | quote }}
PORT: {{ include "postgresql.v1.service.port" .Subcharts.postgresql | int }}
{{- else -}}
HOST: {{ .Values.externalDatabase.host | quote }}
USER: {{ .Values.externalDatabase.username | quote }}
NAME: {{ .Values.externalDatabase.database | quote }}
PORT: {{ .Values.externalDatabase.port | int }}
{{- end }}
HOST: {{ include "netbox.databaseHost" . | quote }}
USER: {{ include "netbox.databaseUser" . | quote }}
NAME: {{ include "netbox.databaseName" . | quote }}
PORT: {{ include "netbox.databasePort" . }}
OPTIONS:
sslmode: {{ .Values.externalDatabase.sslMode | quote }}
target_session_attrs: {{ .Values.externalDatabase.targetSessionAttrs | default "read-write" | quote }}
Expand Down Expand Up @@ -144,7 +136,7 @@ data:
STORAGE_BACKEND: {{ .Values.storageBackend | quote }}
STORAGE_CONFIG: {{ toJson .Values.storageConfig }}
{{- end }}
METRICS_ENABLED: {{ toJson .Values.metricsEnabled }}
METRICS_ENABLED: {{ toJson .Values.metrics.enabled }}
PAGINATE_COUNT: {{ int .Values.paginateCount }}
PLUGINS: {{ toJson .Values.plugins }}
PLUGINS_CONFIG: {{ toJson .Values.pluginsConfig }}
Expand Down Expand Up @@ -175,43 +167,37 @@ data:
REDIS:
tasks:
{{- if .Values.redis.enabled }}
HOST: {{ printf "%s-master" (include "common.names.fullname" .Subcharts.redis) | quote }}
PORT: {{ .Values.redis.master.service.ports.redis | int }}
{{- else if .Values.tasksRedis.sentinels }}
{{- if .Values.tasksRedis.sentinels }}
SENTINELS: {{ toJson .Values.tasksRedis.sentinels }}
SENTINEL_SERVICE: {{ .Values.tasksRedis.sentinelService | quote }}
SENTINEL_TIMEOUT: {{ .Values.tasksRedis.sentinelTimeout | int }}
{{- else }}
HOST: {{ .Values.tasksRedis.host | quote }}
PORT: {{ .Values.tasksRedis.port | int}}
HOST: {{ include "netbox.tasksRedis.host" . | quote }}
PORT: {{ include "netbox.tasksRedis.port" . | int }}
{{- end }}
USERNAME: {{ .Values.tasksRedis.username | quote }}
DATABASE: {{ int .Values.tasksRedis.database }}
SSL: {{ toJson .Values.tasksRedis.ssl }}
INSECURE_SKIP_TLS_VERIFY: {{ toJson .Values.tasksRedis.insecureSkipTlsVerify }}
CA_CERT_PATH: {{ .Values.tasksRedis.caCertPath | quote }}
caching:
{{- if .Values.redis.enabled }}
HOST: {{ printf "%s-master" (include "common.names.fullname" .Subcharts.redis) | quote }}
PORT: {{ .Values.redis.master.service.ports.redis | int }}
{{- else if .Values.cachingRedis.sentinels }}
{{- if .Values.cachingRedis.sentinels }}
SENTINELS: {{ toJson .Values.cachingRedis.sentinels }}
SENTINEL_SERVICE: {{ .Values.cachingRedis.sentinelService | quote }}
SENTINEL_TIMEOUT: {{ .Values.cachingRedis.sentinelTimeout | int }}
{{- else }}
HOST: {{ .Values.cachingRedis.host | quote }}
PORT: {{ .Values.cachingRedis.port | int}}
HOST: {{ include "netbox.cachingRedis.host" . | quote }}
PORT: {{ include "netbox.cachingRedis.port" . | int }}
{{- end }}
USERNAME: {{ .Values.cachingRedis.username | quote }}
DATABASE: {{ int .Values.cachingRedis.database }}
SSL: {{ toJson .Values.cachingRedis.ssl }}
INSECURE_SKIP_TLS_VERIFY: {{ toJson .Values.cachingRedis.insecureSkipTlsVerify }}
CA_CERT_PATH: {{ .Values.cachingRedis.caCertPath | quote }}
REPORTS_ROOT: /opt/netbox/netbox/reports
REPORTS_ROOT: {{ .Values.reportsPersistence.path }}
RQ_DEFAULT_TIMEOUT: {{ .Values.rqDefaultTimeout | int }}
SCRIPTS_ROOT: /opt/netbox/netbox/scripts
SCRIPTS_ROOT: {{ .Values.scriptsPersistence.path }}
CSRF_COOKIE_NAME: {{ .Values.csrf.cookieName | quote }}
SESSION_COOKIE_NAME: {{ .Values.sessionCookieName }}
ENABLE_LOCALIZATION: {{ toJson .Values.enableLocalization }}
Expand Down
Loading

0 comments on commit 74aca41

Please sign in to comment.