$ helm show values sdelements-dev/sde --version {SDE_VERSION}
Common Tasks
These sections provide information about common tasks that users and administrators may need to perform to manage SD Elements.
Retrieve Default Helm Chart Values
Whereas the Chart Files reference page provides more common chart configurations and their defaults, the SD Elements Helm chart’s default values file provides a more complete list of values that may be configured.
The helm show values
command will print a Helm chart’s default values file to the console. See the Helm Docs Helm Show Values page for usage instructions.
Append > {filename}.yaml to save these values to a file on the client’s filesystem.
|
In the example below, the default values for the specified SD Elements version is saved to the user’s file system in the current directory.
Retrieve Superuser Credentials for an Existing Instance
Username
Refer to sde.superuserEmail
in the custom values file used to install SD Elements. If a username was not set, the default value was likely used. See Retrieve Default Helm Chart Values for instructions.
Password
The command below retrieves the Superuser password from the {RELEASE_NAME}-sde-secret
and uses the base64
command to decode it.
The base64 command is only supported on Unix-based systems. Windows users must find an alternative method of decoding base64.
|
# Superuser password
$ kubectl get secrets {RELEASE_NAME}-sde-secrets -n {NAMESPACE} --output jsonpath='{.data.SDE_SUPERUSER_PASSWORD}' | base64 -d
Retrieve Database Storage Usage
For SD Elements instances using the built-in {RELEASE_NAME}-database
statefulset there are two methods to check storage usage.
Database Persistent Volume Usage
To retrieve the used and available space in the database’s persistent volume, exec into the database pod and use df
.
$ kubectl exec -n {NAMESPACE} {RELEASE_NAME}-database-0 -- df -h
Defaulted container "postgresql" out of: postgresql, metrics, add-ro-user, init-chmod-data (init), shared-init (init)
Filesystem Size Used Avail Use% Mounted on
overlay 100G 33G 68G 33% /
tmpfs 64M 0 64M 0% /dev
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/nvme0n1p1 100G 33G 68G 33% /tmp
/dev/nvme1n1 296G 29G 267G 10% /bitnami/postgresql
tmpfs 30G 1.5M 30G 1% /dev/shm
tmpfs 16G 0 16G 0% /proc/acpi
tmpfs 16G 0 16G 0% /sys/firmware
In the example above, the database persistent volume is using 33GB of the 100GB provisioned.
Postgres Database Size
To retrieve the size of the Postgres database, exec into the database pod and use du
to check the /bitnami/postgresql/pgdata
directory in kilobytes (KB).
kubectl exec -n {NAMESPACE} {RELEASE_NAME}-database-0 -- du -s /bitnami/postgresql/pgdata/
30219644 /bitnami/postgresql/pgdata/
In the example above, the /bitnami/postgresql/pgdata
directory is
30219644KB (30.2GB).
Soft Maintenance Mode
Soft Maintenance Mode restricts access to SD Elements during maintenance activities. When enabled, the login page is redirected to a soft error page notifying that scheduled maintenance is taking place. This will allow these administrators to complete maintenance without concern for data integrity being compromised or users contacting internal support teams. Users included in the whitelist can access SD Elements regardless. Follow the steps below to configure worker pods for whitelisted users and enable Soft Maintenance Mode.
Configure Soft Maintenance Mode
Add the following environment variable to worker-10
pod configurations in values.yaml
with a list of users that are in the allow list
worker:
extraEnvVars:
- name: SDE_SOFT_MAINTENANCE_WHITELISTED_USERS
value: user1@email.domain.com,user2@email.domain.com
Enable, Disable and check Status of Soft Maintenance Mode
-
For running soft maintenance mode commands, first exec into
worker-10
pod by running the following# Get the worker-10 pod name POD_NAME=$(kubectl get pods -o custom-columns=":metadata.name" | grep worker-10) # Exec into the pod kubectl exec -it ${POD_NAME} -- /bin/bash
-
To enable Soft Maintenance mode, run the following in the
worker-10
pod# Run the enable command /bin/sde.sh soft-maintenance on
-
To disable Soft Maintenance mode, run the following in the
worker-10
pod# Run the disable command /bin/sde.sh soft-maintenance off
-
To check status of Soft Maintenance mode, run the following in the
worker-10
pod# Run command to check status /bin/sde.sh soft-maintenance