-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Hello, when I used the description of openfunction to deploy a Python function as a service, I wanted to use my own image (which contains some data files), but when I declared spec build params RUN_ After IMAGE, the generated pod did not use the image I declared. Is there any problem with the declared image? It's quite urgent, online, etc
你好,我使用openfunction的描述去部署一个python函数为服务时,希望使用我自己的一个镜像(镜像里面有一些数据文件),但是在我声明了spec build params RUN_IMAGE后,生成的pod并没有使用我声明的镜像,是声明的有什么问题吗,挺急的,在线等
apiVersion: core.openfunction.io/v1beta1
kind: Function
metadata:
namespace: "abc"
name: "test--testtpy"
spec:
version: "v2.0.0"
image: "172.16.xxx.xxx:81/abc/test--testtpy:v2"
imageCredentials:
name: push-secret
port: 8080
build:
builder: "openfunction/gcp-builder:v1"
env:
GOOGLE_FUNCTION_TARGET: "hello_world"
GOOGLE_FUNCTION_SIGNATURE_TYPE: "http"
GOOGLE_FUNCTION_SOURCE: "main.py"
params:
RUN_IMAGE: "172.16.xxx.xxx:81/zhikong/ubuntu-20.04.4lts-block-inner:v2"
srcRepo:
url: "[email protected]:abc/test.git"
sourceSubPath: "/testtpy"
revision: "main"
credentials:
name: secret-git-ssh-auth2
serving:
scaleOptions:
minReplicas: 1
maxReplicas: 10
runtime: "knative"
template:
containers:
- name: function # DO NOT change this
imagePullPolicy: IfNotPresent
route:
gatewayRef:
name: openfunction
namespace: openfunction
rules:
- matches:
- path:
type: PathPrefix
value: "/faas/xxx/test/tt/py"