Skip to content

Commit 656260f

Browse files
committed
Adds 2nd kube cmd to change database permissions
1 parent 9fe6e4b commit 656260f

File tree

297 files changed

+100252
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

297 files changed

+100252
-0
lines changed

docs/netbox-enterprise/nbe-backups.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,29 @@ cat netbox.pgsql | kubectl exec "${POSTGRESQL_MAIN_POD}" \
279279
-c database \
280280
-- psql -d netbox -f-
281281
```
282+
283+
Following this run the below to ensure all database permissions are correct:
284+
285+
```shell
286+
export NETBOX_NAMESPACE="kotsadm"
287+
POSTGRESQL_MAIN_POD="$(kubectl get pod \
288+
-o name \
289+
-n "${NETBOX_NAMESPACE}" \
290+
-l 'postgres-operator.crunchydata.com/role=master' \
291+
| head -n 1 \
292+
)" && \
293+
kubectl exec "${POSTGRESQL_MAIN_POD}" \
294+
-n "${NETBOX_NAMESPACE}" \
295+
-i \
296+
-c database \
297+
-- psql -c "ALTER DATABASE netbox OWNER TO netbox;" && \
298+
kubectl exec "${POSTGRESQL_MAIN_POD}" \
299+
-n "${NETBOX_NAMESPACE}" \
300+
-i \
301+
-c database \
302+
-- psql -d netbox -c "GRANT CREATE ON SCHEMA public TO netbox;"
303+
```
304+
282305
#### Built-In Redis
283306

284307
Since Redis isn't running in restore mode, there is no need to disable and re-enable append mode.

0 commit comments

Comments
 (0)