Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enterprise-3.10] BZ#1601757 - added considerations for using MySQL and PostgreSQL with azure file #11376

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,54 @@ $ mount
If the `dir_mode` and `file_mode` permissions are set to `0755`, change the
default value `0755` to `0777` or `0775`. This manual step is required because
the default `dir_mode` and `file_mode` permissions changed from `0777` to `0755`
in {product-title} 3.9. The following examples show configuration files with the
in {product-title} 3.9. The following examples show configuration files with the
changed values.

.Considerations when using MySQL and PostgresSQL with Azure file
* The owner UID of the Azure File mounted directory is different from the UID of a container.
* MySQL containers change the file owner permission in the mounted directory. Because of the mismatch between the owner UID and container process UID, this operation fails. Therefore to run MySQL with Azure File:
** Specify the Azure File mounted directory UID in the `runAsUser` variable in the PV configuration file.
+
[source, yaml]
----
spec:
containers:
...
securityContext:
runAsUser: <mounted_dir_uid>
----
** Specify the container process UID under `mountOptions` in the PV configuration file.
+
[source, yaml]
----
mountOptions:
- dir_mode=0700
- file_mode=0600
- uid=<conatiner_process_uid>
- gid=0
----

* PostgreSQL does not work with Azure file. This is because PostgreSQL requires
hard links in the Azure File directory, and since Azure File does not support
link:https://docs.microsoft.com/en-us/rest/api/storageservices/features-not-supported-by-the-azure-file-service[hard
links] the pod fails to start.

.PV configuration file example
[source,yaml]
----
# azf-pv.yml
# azf-pv.yml
apiVersion: "v1"
kind: "PersistentVolume"
metadata:
name: "azpv"
name: "azpv"
spec:
capacity:
storage: "1Gi"
storage: "1Gi"
accessModes:
- "ReadWriteMany"
azureFile:
azureFile:
secretName: azure-secret
shareName: azftest
shareName: azftest
readOnly: false
mountOptions:
- dir_mode=0777
Expand Down