<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="Calibri">Hello,<br>
<br>
In my project I tried with success to run midpoint in docker,
following the detailed documentation</font><font face="Calibri">.<br>
Now I need to move the project in Kubernetes Vanilla but we have
some security restrictions from k8s service provider: the
container must be run as non root user.<br>
I needed to add the following securityContext configuration:<br>
<br>
securityContext:<br>
allowPrivilegeEscalation: false<br>
capabilities:<br>
drop:<br>
- ALL<br>
runAsNonRoot: true<br>
runAsUser: 1000<br>
fsGroup: 1000<br>
<br>
Executing the init container, it gives the following error, it
seems not possible to write in var directory. The related
persistent volume has been correctly created in k8s and mounted:<br>
<br>
MP_INIT_DB variable with target for DB init files was not set -
skipping db init file processing...<br>
Initializing native structure of the db...<br>
cp: can't create 'opt/midpoint/var/config.xml': No such file or
directory<br>
- - - - - -<br>
Applying setenv.sh from /opt/midpoint/bin directory.<br>
Processing variable (MAP) ... midpoint.repository.jdbcUrl .:.
jdbc:postgresql://mypg:5432/mydb<br>
Processing variable (MAP) ...
midpoint.repository.upgradeableSchemaAction .:. stop<br>
Processing variable (MAP) ... midpoint.repository.hibernateHbm2ddl
.:. none<br>
Processing variable (MAP) ... midpoint.taskManager.clustered .:.
true<br>
Processing variable (MAP) ... file.encoding .:. UTF8<br>
Processing variable (MAP) ...
midpoint.repository.initializationFailTimeout .:. 60000<br>
Processing variable (MAP) ... midpoint.nodeIdSource .:. hostname<br>
Processing variable (MAP) ... midpoint.logging.alt.enabled .:.
true<br>
Processing variable (MAP) ...
midpoint.repository.missingSchemaAction .:. create<br>
Processing variable (MAP) ... midpoint.repository.database .:.
postgresql<br>
Processing variable (MAP) ... midpoint.repository.jdbcUsername .:.
****<br>
Processing variable (MAP) ...
midpoint.administrator.initialPassword .:. *****<br>
Processing variable (MAP) ... midpoint.repository.jdbcPassword .:.
*****<br>
[INFO]<br>
[INFO] Starting run sql scripts<br>
[INFO]<br>
[ERROR] Midpoint home config xml file
'/opt/midpoint/var/config.xml' doesn't exist<br>
<br>
<br>
I followed the simple and advanced examples in the github
documentation with no luck (</font><font face="Calibri"><font
face="Calibri"><a class="moz-txt-link-freetext" href="https://github.com/Evolveum/midpoint-kubernetes/tree/main/deployment/advanced">https://github.com/Evolveum/midpoint-kubernetes/tree/main/deployment/advanced</a></font>),
I not found any configuration to run as non root. Ideas?<br>
<br>
Thanks in advance,<br>
AXP</font>
</body>
</html>