Commit 28ec2347 authored by Yuri Konotopov's avatar Yuri Konotopov

openshift: added CronJob for cleanup inactive user accounts.

parent b3b5591e
Pipeline #134957 passed with stage
in 6 minutes and 25 seconds
......@@ -782,6 +782,115 @@
}
}
}
},
{
"kind": "CronJob",
"apiVersion": "batch/v1beta1",
"metadata": {
"name": "job-clean-users"
},
"spec": {
"schedule": "20 0 * * *",
"jobTemplate": {
"spec": {
"template": {
"spec": {
"containers": [
{
"name": "clean-users",
"image": "${DEFAULT_DOCKER_REGISTRY}/${NAME}/${NAME}:latest",
"command": ["/extensions-web/app/bin/sweettooth-clean-users"],
"env": [
{
"name": "EGO_DATABASE_URL",
"valueFrom": {
"secretKeyRef" : {
"name" : "${NAME}",
"key" : "database-url"
}
}
},
{
"name": "EGO_EMAIL_URL",
"valueFrom": {
"secretKeyRef" : {
"name" : "${NAME}",
"key" : "email-url"
}
}
},
{
"name": "EGO_SECRET_KEY",
"valueFrom": {
"secretKeyRef" : {
"name" : "${NAME}",
"key" : "secret-key"
}
}
},
{
"name": "EGO_ADMINISTRATOR_NAME",
"valueFrom": {
"configMapKeyRef": {
"name": "${NAME}",
"key": "administrator-name"
}
}
},
{
"name": "EGO_ADMINISTRATOR_EMAIL",
"valueFrom": {
"configMapKeyRef": {
"name": "${NAME}",
"key": "administrator-email"
}
}
},
{
"name": "EGO_MEDIA_ROOT",
"valueFrom": {
"configMapKeyRef": {
"name": "extensions-web",
"key": "media-root"
}
}
},
{
"name": "EGO_STATIC_ROOT",
"valueFrom": {
"configMapKeyRef": {
"name": "extensions-web",
"key": "static-root"
}
}
},
{
"name": "EGO_ALLOWED_HOST",
"valueFrom": {
"configMapKeyRef": {
"name": "${NAME}",
"key": "allowed-host"
}
}
},
{
"name": "EGO_XAPIAN_DB",
"valueFrom": {
"configMapKeyRef": {
"name": "${NAME}",
"key": "xapian-db"
}
}
}
]
}
],
"restartPolicy": "Never"
}
}
}
}
}
}
],
"parameters": [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment