console v0.4.5: русификация UI, Go/TF предупреждения, handler.go в preferred
This commit is contained in:
+14
-10
@@ -12,26 +12,30 @@ provider "fission" {
|
||||
namespace = "default"
|
||||
}
|
||||
|
||||
# Go использует binary-env: функция является скомпилированным Linux-бинарником.
|
||||
# Перед apply необходимо скомпилировать:
|
||||
# CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o dist/handler code/
|
||||
# Настоящий Go через builder pipeline:
|
||||
# go-builder компилирует handler.go → .so плагин
|
||||
# go-env загружает .so через plugin.Open()
|
||||
resource "fission_environment" "go" {
|
||||
name = "tf-go-hello-env"
|
||||
image = "ghcr.io/fission/binary-env"
|
||||
version = 3
|
||||
name = "tf-go-hello-env"
|
||||
image = "ghcr.io/fission/go-env"
|
||||
builder_image = "ghcr.io/fission/go-builder"
|
||||
builder_command = "build"
|
||||
version = 3
|
||||
}
|
||||
|
||||
resource "fission_package" "pkg" {
|
||||
name = "tf-go-hello-pkg"
|
||||
environment = fission_environment.go.name
|
||||
code_path = "${path.module}/dist/handler"
|
||||
name = "tf-go-hello-pkg"
|
||||
environment = fission_environment.go.name
|
||||
source_dir = "${path.module}/code"
|
||||
deploy_type = "source"
|
||||
build_command = "build"
|
||||
}
|
||||
|
||||
resource "fission_function" "fn" {
|
||||
name = "tf-go-hello-fn"
|
||||
environment = fission_environment.go.name
|
||||
package_name = fission_package.pkg.name
|
||||
entrypoint = "handler"
|
||||
entrypoint = "Handler"
|
||||
}
|
||||
|
||||
resource "fission_http_trigger" "route" {
|
||||
|
||||
Reference in New Issue
Block a user