Question

How to use a defined storageclass for postgresql in a kubernetes deployment

  • 24 August 2023
  • 1 reply
  • 63 views

Badge +3

 

Hi, 

 

I'm trying to configure a new FME Flow deployment with a new customer.

They would like to keep all storage on the same storageclass: azurefiles-fmeserver.

This storage class is created as highlighted in 3. Setup Shared Storage using Azure Files: https://docs.safe.com/fme/html/FME-Flow/AdminGuide/Kubernetes/Kubernetes-Deploying-to-AKS.htm

However, if storage.postgresql.class is filled in, the deployment does not work.

If this parameter is empty, the deployment completes and the storageclass: default is chosen.

 

We have tried adding multiple different parameters in the postgresql.primary parameters, but none that helped us.

Is there anyone who has had the same issue?

Below is a exert of the Values.YAML file.

 

 

 

storage:

 useHostDir: false

 reclaimPolicy: Delete

 postgresql:

  size: 1Gi

  class: azurefiles-fmeserver

  path:

 fmeserver:

  accessMode: ReadWriteOnce

  size: 10Gi

  class: azurefiles-fmeserver

  path:

 

# It is recommended not to modify those parameters

# For more options regarding PostgreSQL deployement, check the helm chart documentation:

# https://github.com/bitnami/charts/tree/master/bitnami/postgresql

postgresql:

 image: 

  tag: 11.18.0-debian-11-r28

 primary:

  persistence:

   existingClaim: fmeserver-postgresql

  resources:

   requests:

    memory: 256Mi

    cpu: 100m

 auth:

  postgresqlPassword: a6av3abwzi

 livenessProbe:


1 reply

Userlevel 1
Badge +11

Hi @marnickcle​ , It's been a few days since you posted this question. Have you made any progress?

 

It would appear you are trying to use Azure Storage for the Postgres Data files... we would strongly recommend against this. The storage performance will not be up to the task and you will likely encounter instabilities in the environment.

 

Here's one such article with evidence against this approach for PostgreSQL and MySQL:

CAUTION: You might experience instability in your environment if you use any container images that use unsupported file system features. Containers for PostgreSQL and MySQL are known to have issues when used with Azure File.

SEE: https://docs.openshift.com/container-platform/3.9/install_config/persistent_storage/persistent_storage_azure_file.html

 

The other technical challenge you are likely coming up against is based on the users of FME containers... fmeserver user won't be the same user (uid) used by the Postgres Container, so now you also have a permissions issue which will also likely block you from accomplishing this configuration change.

 

Do let us know if you have a solid reason for this unrecommended modification to the configuration.

 

 

Reply