Verified Commit a2bb46f4 authored by Shiyu Han's avatar Shiyu Han

add legacy yii

parent 2c543b39
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
"name": "%APP_NAME%",
"namespace": "biz-%NAMESPACE%"
},
"spec": {
"replicas": %REPLICAS_NUM%,
"selector": {
"matchLabels": {
"xx-app": "%APP_NAME%"
}
},
"template": {
"metadata": {
"labels": {
"xx-app": "%APP_NAME%",
"gitlab-jid": "%ARTIFACT%",
"released-ver": "%RELEASED%"
}
},
"spec": {
"volumes": [
{
"name": "etc",
"emptyDir": {
"medium": "Memory"
}
},
{
"name": "www",
"emptyDir": {
"medium": "Memory"
}
}
],
"initContainers": [
{
"name": "init",
"image": "%IMAGE_SRC%",
"imagePullPolicy": "Always",
"volumeMounts": [
{
"name": "etc",
"mountPath": "/var/www/etc"
},
{
"name": "www",
"mountPath": "/var/www/html"
}
],
"command": [
"sh",
"-c"
],
"args": [
"mv /app/etc/* /var/www/etc ; cp -r /app/* /var/www/html ; chown -R www-data:www-data /var/www/html"
]
}
],
"containers": [
{
"name": "www",
"image": "nginx:alpine",
"volumeMounts": [
{
"name": "etc",
"subPath": "nginx.conf",
"mountPath": "/etc/nginx/conf.d/default.conf"
},
{
"name": "www",
"mountPath": "/app"
}
]
},
{
"name": "fpm",
"image": "%IMAGE_SRC%",
"imagePullPolicy": "Always",
"args": [
"-R"
],
"env": [
{
"name": "YII_ENV",
"value": "%YII_ENV%"
},
{
"name": "YII_DEBUG",
"value": "%YII_DEBUG%"
}
],
"volumeMounts": [
{
"name": "etc",
"subPath": "php.ini",
"mountPath": "/usr/local/etc/php/conf.d/www.ini"
},
{
"name": "www",
"mountPath": "/app"
}
]
}
],
"terminationGracePeriodSeconds": 10,
"nodeSelector": {
"biz.k8s.yunxi.tv/%NAMESPACE%": "enabled"
}
}
}
}
}
\ No newline at end of file
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