update
Some checks failed
K8S Fission Deployment / Deployment fission functions (push) Failing after 22s

This commit is contained in:
Duc Nguyen
2026-01-26 11:55:42 +00:00
commit 018f267fab
30 changed files with 2381 additions and 0 deletions

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

@@ -0,0 +1,398 @@
# - id: 'ai-work-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-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::create","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-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-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::view","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-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-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::update","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-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-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::delete","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-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-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::ref::create","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-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-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::ref::view","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-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-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::ref::delete","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-owner-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/users/tags'
# methods:
# - POST
# authenticators:
# - handler: cookie_session
# authorizer:
# handler: remote_json
# config:
# remote: 'http://keto-service.ory-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::owner::create","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-owner-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/users/tags'
# methods:
# - GET
# authenticators:
# - handler: cookie_session
# authorizer:
# handler: remote_json
# config:
# remote: 'http://keto-service.ory-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::owner::view","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-owner-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/users/tags/<[0-9a-fA-F\-]{36}>'
# methods:
# - PUT
# authenticators:
# - handler: cookie_session
# authorizer:
# handler: remote_json
# config:
# remote: 'http://keto-service.ory-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::owner::update","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-owner-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/users/tags/<[0-9a-fA-F\-]{36}>'
# methods:
# - DELETE
# authenticators:
# - handler: cookie_session
# authorizer:
# handler: remote_json
# config:
# remote: 'http://keto-service.ory-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::owner::delete","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-ref-owner-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/users/tags/<[0-9a-fA-F\-]{36}>/refs'
# methods:
# - POST
# authenticators:
# - handler: cookie_session
# authorizer:
# handler: remote_json
# config:
# remote: 'http://keto-service.ory-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::ref::owner::create","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-ref-owner-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/users/tags/<[0-9a-fA-F\-]{36}>/refs'
# methods:
# - GET
# authenticators:
# - handler: cookie_session
# authorizer:
# handler: remote_json
# config:
# remote: 'http://keto-service.ory-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::ref::owner::view","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-ref-owner-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/users/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-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::ref::owner::delete","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-ref-owner-create-bulk'
# 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/users/tags/ref-bulk'
# methods:
# - POST
# authenticators:
# - handler: cookie_session
# authorizer:
# handler: remote_json
# config:
# remote: 'http://keto-service.ory-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::ref::owner::create::bulk","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-ref-create-bulk'
# 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/ref-bulk'
# methods:
# - POST
# authenticators:
# - handler: cookie_session
# authorizer:
# handler: remote_json
# config:
# remote: 'http://keto-service.ory-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::ref::create::bulk","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-ref-owner-view-bulk'
# 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/users/tags/refs'
# methods:
# - GET
# authenticators:
# - handler: cookie_session
# authorizer:
# handler: remote_json
# config:
# remote: 'http://keto-service.ory-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::ref::owner::view::bulk","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-owner-create-default'
# 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/tags/users/defaults/instantiate'
# methods:
# - POST
# authenticators:
# - handler: cookie_session
# authorizer:
# handler: remote_json
# config:
# remote: 'http://keto-service.ory-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::owner::create::default","relation":"access"}
# mutators:
# - handler: header
# - id: 'ai-work-owner-view-kind-ticket'
# 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/tags/users/tags-ticket'
# methods:
# - GET
# authenticators:
# - handler: cookie_session
# authorizer:
# handler: remote_json
# config:
# remote: 'http://keto-service.ory-stack.svc.cluster.local:4466/relation-tuples/check'
# payload: >-
# {"namespace":"user_group_access","subject_id":"{{print .Subject}}","object":"acp::ailbl::tag::owner::view::kind-ticket","relation":"access"}
# mutators:
# - handler: header

55
.fission/deployment.json Normal file
View File

@@ -0,0 +1,55 @@
{
"namespace": "default",
"environments": {
"work-py": {
"image": "ghcr.io/fission/python-env",
"builder": "ghcr.io/fission/python-builder",
"imagepullsecret": "vega-container-registry",
"runtime_envs": [
"AUDITLOG_ES_ENDPOINT=http://opensearch.observability.svc.cluster.local:9200",
"AUDITLOG_ES_INDEX=faas_auditlogs",
"AUDITLOG_ES_BASICAUTH_USER=",
"AUDITLOG_ES_BASICAUTH_PASSWORD="
],
"mincpu": 50,
"maxcpu": 100,
"minmemory": 50,
"maxmemory": 500,
"poolsize": 1
}
},
"archives": {
"package.zip": {
"sourcepath": "apps"
}
},
"packages": {
"ai-work": {
"buildcmd": "./build.sh",
"sourcearchive": "package.zip",
"env": "work-py"
}
},
"function_common": {
"pkg": "ai-work",
"secrets": [
"fission-ai-work-env"
],
"executor": {
"select": "newdeploy",
"newdeploy": {
"minscale": 1,
"maxscale": 1
},
"poolmgr": {
"concurrency": 1,
"requestsperpod": 1,
"onceonly": false
}
},
"mincpu": 50,
"maxcpu": 100,
"minmemory": 50,
"maxmemory": 500
}
}

View File

@@ -0,0 +1,20 @@
{
"namespace": "labelhub",
"secrets": {
"fission-ai-work-env": {
"literals": [
"PG_HOST=160.30.113.113",
"PG_PORT=45432",
"PG_DB=postgres",
"PG_USER=postgres",
"PG_PASS=q2q32RQx9R9qVAp3vkVrrASnSUUhzKvC"
]
},
"vega-container-registry": {
"kind": "docker-registry",
"server": "registry.vegastar.vn",
"username": "deployer",
"password": "13814592a688195094d0ee38c995245053af26ca"
}
}
}

View File

@@ -0,0 +1,20 @@
{
"namespace": "default",
"secrets": {
"fission-ai-work-env": {
"literals": [
"PG_HOST=160.30.113.113",
"PG_PORT=45432",
"PG_DB=postgres",
"PG_USER=postgres",
"PG_PASS=q2q32RQx9R9qVAp3vkVrrASnSUUhzKvC"
]
},
"vega-container-registry": {
"kind": "docker-registry",
"server": "registry.vegastar.vn",
"username": "deployer",
"password": "13814592a688195094d0ee38c995245053af26ca"
}
}
}

View File

@@ -0,0 +1,14 @@
{
"namespace": "default",
"secrets": {
"fission-ai-work-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-ai-work-env": {
"literals": [
"PG_HOST=160.30.113.113",
"PG_PORT=45432",
"PG_DB=postgres",
"PG_USER=postgres",
"PG_PASS=q2q32RQx9R9qVAp3vkVrrASnSUUhzKvC"
]
}
}
}