mirror of https://github.com/goharbor/harbor.git
Updated Harbor FAQs (markdown)
parent
371929f35a
commit
b59acc3552
|
@ -63,19 +63,29 @@ sudo docker-compose exec postgresql psql -c "SHOW max_connections"
|
|||
```
|
||||
|
||||
### Installed by Helm
|
||||
1. Modify the `max_connections` parameter
|
||||
1. Fetch the `postgresql.conf` from the database pod
|
||||
```shell
|
||||
NAMESPACE=the-namespace-of-harbor
|
||||
POD_NAME=`kubectl -n $NAMESPACE get pod -l "component=database,app=harbor" -o name`
|
||||
kubectl -n $NAMESPACE exec $POD_NAME -- cat /var/lib/postgresql/data/postgresql.conf | sed 's/max_connections = .*/max_connections = 1000/g' | kubectl -n $NAMESPACE exec $POD_NAME -i -- tee /var/lib/postgresql/data/postgresql.conf
|
||||
kubectl -n $NAMESPACE exec $POD_NAME -- cat /var/lib/postgresql/data/postgresql.conf > postgresql.conf
|
||||
```
|
||||
2. Modify the `max_connections` parameter in the postgresql.conf
|
||||
```shell
|
||||
max_connections=1000
|
||||
```
|
||||
3. Write back the `postgresql.conf` to database pod
|
||||
```shell
|
||||
NAMESPACE=the-namespace-of-harbor
|
||||
POD_NAME=`kubectl -n $NAMESPACE get pod -l "component=database,app=harbor" -o name`
|
||||
cat postgresql.conf | kubectl -n $NAMESPACE exec $POD_NAME -i -- tee /var/lib/postgresql/data/postgresql.conf
|
||||
```
|
||||
|
||||
2. Delete the pod of the database and wait Kubernetes schedule a new pod
|
||||
4. Delete the pod of the database and wait Kubernetes schedule a new pod
|
||||
```shell
|
||||
kubectl -n $NAMESPACE delete $POD_NAME
|
||||
kubectl -n $NAMESPACE wait --for=condition=ready $POD_NAME --timeout=60s
|
||||
```
|
||||
3. Ensure that the `max_connections` changed to 1000
|
||||
5. Ensure that the `max_connections` changed to 1000
|
||||
```shell
|
||||
kubectl -n $NAMESPACE exec $POD_NAME -- psql -c "SHOW max_connections"
|
||||
max_connections
|
||||
|
|
Loading…
Reference in New Issue