FirstPhone
Some checks failed
K8S Fission Deployment / Deployment fission functions (push) Failing after 21s

This commit is contained in:
QuangMinh_123
2025-12-04 15:41:22 +07:00
commit da64947bae
31 changed files with 1776 additions and 0 deletions

146
.fission/access-rules.yaml Normal file
View File

@@ -0,0 +1,146 @@
- id: 'ailbl-tag-create'
description: 'This description'
upstream:
preserve_host: true
url: 'http://router.fission.svc.cluster.local:80'
strip_path: 'v1/'
match:
url: 'https://api.geohub.vn/v1/ailbl/admin/tags'
methods:
- POST
authenticators:
- handler: cookie_session
authorizer:
handler: remote_json
config:
remote: 'http://keto-service.ory-staging.svc.cluster.local:4466/relation-tuples/check'
payload: >-
{"namespace":"AilblAcp","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::create","relation":"access"}
mutators:
- handler: header
- id: 'ailbl-tag-view'
description: 'This description'
upstream:
preserve_host: true
url: 'http://router.fission.svc.cluster.local:80'
strip_path: 'v1/'
match:
url: 'https://api.geohub.vn/v1/ailbl/admin/tags'
methods:
- GET
authenticators:
- handler: cookie_session
authorizer:
handler: remote_json
config:
remote: 'http://keto-service.ory-staging.svc.cluster.local:4466/relation-tuples/check'
payload: >-
{"namespace":"AilblAcp","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::view","relation":"access"}
mutators:
- handler: header
- id: 'ailbl-tag-update'
description: 'This description'
upstream:
preserve_host: true
url: 'http://router.fission.svc.cluster.local:80'
strip_path: 'v1/'
match:
url: 'https://api.geohub.vn/v1/ailbl/admin/tags/<[0-9a-fA-F\-]{36}>'
methods:
- PUT
authenticators:
- handler: cookie_session
authorizer:
handler: remote_json
config:
remote: 'http://keto-service.ory-staging.svc.cluster.local:4466/relation-tuples/check'
payload: >-
{"namespace":"AilblAcp","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::update","relation":"access"}
mutators:
- handler: header
- id: 'ailbl-tag-delete'
description: 'This description'
upstream:
preserve_host: true
url: 'http://router.fission.svc.cluster.local:80'
strip_path: 'v1/'
match:
url: 'https://api.geohub.vn/v1/ailbl/admin/tags/<[0-9a-fA-F\-]{36}>'
methods:
- DELETE
authenticators:
- handler: cookie_session
authorizer:
handler: remote_json
config:
remote: 'http://keto-service.ory-staging.svc.cluster.local:4466/relation-tuples/check'
payload: >-
{"namespace":"AilblAcp","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::delete","relation":"access"}
mutators:
- handler: header
- id: 'ailbl-tag-ref-create'
description: 'This description'
upstream:
preserve_host: true
url: 'http://router.fission.svc.cluster.local:80'
strip_path: 'v1/'
match:
url: 'https://api.geohub.vn/v1/ailbl/admin/tags/<[0-9a-fA-F\-]{36}>/refs'
methods:
- POST
authenticators:
- handler: cookie_session
authorizer:
handler: remote_json
config:
remote: 'http://keto-service.ory-staging.svc.cluster.local:4466/relation-tuples/check'
payload: >-
{"namespace":"AilblAcp","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::ref::create","relation":"access"}
mutators:
- handler: header
- id: 'ailbl-tag-ref-view'
description: 'This description'
upstream:
preserve_host: true
url: 'http://router.fission.svc.cluster.local:80'
strip_path: 'v1/'
match:
url: 'https://api.geohub.vn/v1/ailbl/admin/tags/<[0-9a-fA-F\-]{36}>/refs'
methods:
- GET
authenticators:
- handler: cookie_session
authorizer:
handler: remote_json
config:
remote: 'http://keto-service.ory-staging.svc.cluster.local:4466/relation-tuples/check'
payload: >-
{"namespace":"AilblAcp","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::ref::view","relation":"access"}
mutators:
- handler: header
- id: 'ailbl-tag-ref-delete'
description: 'This description'
upstream:
preserve_host: true
url: 'http://router.fission.svc.cluster.local:80'
strip_path: 'v1/'
match:
url: 'https://api.geohub.vn/v1/ailbl/admin/tags/<[0-9a-fA-F\-]{36}>/refs/<[0-9a-fA-F\-]{36}>'
methods:
- DELETE
authenticators:
- handler: cookie_session
authorizer:
handler: remote_json
config:
remote: 'http://keto-service.ory-staging.svc.cluster.local:4466/relation-tuples/check'
payload: >-
{"namespace":"AilblAcp","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::ref::delete","relation":"access"}
mutators:
- handler: header

59
.fission/deployment.json Normal file
View File

@@ -0,0 +1,59 @@
{
"namespace": "default",
"environments": {
"user-phone-py": {
"image": "ghcr.io/fission/python-env",
"builder": "ghcr.io/fission/python-builder",
"mincpu": 50,
"maxcpu": 100,
"minmemory": 50,
"maxmemory": 500,
"poolsize": 1
}
},
"archives": {
"package.zip": {
"sourcepath": "apps"
}
},
"packages": {
"ailbl-user-phone": {
"buildcmd": "./build.sh",
"sourcearchive": "package.zip",
"env": "user-phone-py"
}
},
"function_common": {
"pkg": "ailbl-user-phone",
"secrets": [
"fission-ailbl-user-phone-env"
],
"executor": {
"select": "newdeploy",
"newdeploy": {
"minscale": 1,
"maxscale": 1
},
"poolmgr": {
"concurrency": 1,
"requestsperpod": 1,
"onceonly": false
}
},
"mincpu": 50,
"maxcpu": 100,
"minmemory": 50,
"maxmemory": 500
},
"secrets": {
"fission-ailbl-user-phone-env": {
"literals": [
"PG_HOST=160.30.113.113",
"PG_PORT=45432",
"PG_DB=postgres",
"PG_USER=postgres",
"PG_PASS=q2q32RQx9R9qVAp3vkVrrASnSUUhzKvC"
]
}
}
}

View File

@@ -0,0 +1,14 @@
{
"namespace": "default",
"secrets": {
"fission-ailbl-user-phone-env": {
"literals": [
"PG_HOST=160.30.113.113",
"PG_PORT=45432",
"PG_DB=postgres",
"PG_USER=postgres",
"PG_PASS=q2q32RQx9R9qVAp3vkVrrASnSUUhzKvC"
]
}
}
}

View File

@@ -0,0 +1,14 @@
{
"namespace": "default",
"secrets": {
"fission-ailbl-user-phone-env": {
"literals": [
"S3_BUCKET=ailbl",
"S3_ENDPOINT_URL=http://160.30.113.113:9000",
"S3_ACCESS_KEY_ID=quyen",
"S3_SECRET_ACCESS_KEY=12345678",
"S3_PREFIX=user/avatar"
]
}
}
}

View File

@@ -0,0 +1,14 @@
{
"namespace": "default",
"secrets": {
"fission-ailbl-user-phone-env": {
"literals": [
"PG_HOST=160.30.113.113",
"PG_PORT=45432",
"PG_DB=postgres",
"PG_USER=postgres",
"PG_PASS=q2q32RQx9R9qVAp3vkVrrASnSUUhzKvC"
]
}
}
}

View File

@@ -0,0 +1,14 @@
{
"namespace": "default",
"secrets": {
"fission-ailbl-user-phone-env": {
"literals": [
"PG_HOST=160.30.113.113",
"PG_PORT=45432",
"PG_DB=postgres",
"PG_USER=postgres",
"PG_PASS=q2q32RQx9R9qVAp3vkVrrASnSUUhzKvC"
]
}
}
}