Cannot start function container when container user does not exist within crossplane-xfn container
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- docker, go
- 领域
- devops, infrastructure
调研方向
首先使用 issue 中所示的 Dockerfile 和 labelizer.sh 复现该故障,使用一个配置的用户不存在于 /etc/passwd 中的 function image。然后跟踪调用 OCI 容器并解析其用户的 Go 入口点。完成标准是:即使其配置的用户不存在于 crossplane-xfn 镜像中,function 容器也能成功启动,包括任意较高或随机的 UID。
由索引模型根据 Issue 内容生成。
描述
What happened?
Working on https://github.com/crossplane/crossplane/pull/4261 required creating a custom, but simple function image that labels all managed resources with a given label. My first idea was to use yq for that and the initial Dockerfile was just:
FROM mikefarah/yq:4.34.1
COPY labelizer.sh /bin
ENTRYPOINT ["/bin/labelizer.sh"]
with /bin/labelizer.sh being just:
#!/usr/bin/env sh
yq '(.desired.resources[] | .resource.metadata.labels) |= {"labelizer.xfn.crossplane.io/processed": "true"} + .'
Unfortunately, adding this function to a composition resulted with the following error in crossplane-xfn logs:
cannot compose resources: cannot run Composition Function pipeline: cannot run function "labelizer":
cannot run container: rpc error: code = Unknown desc = exit status 1: xfn: error: spark.Command.Run():
cannot create OCI runtime bundle: cannot write OCI runtime spec: cannot create new spec:
cannot apply spec option: cannot resolve user specified by OCI image config:
cannot resolve UID of user "yq" that doesn't exist in container's /etc/passwd
Modifying the image to use root to run the script resolved the issue.
How can we reproduce it?
- deploy crossplane with enabled composition functions
- build and publish the function image using files stated above
- create a composition referring that function
What environment did it happen in?
The issue is spotted on the latest master, but I am pretty sure that versions containing composition function feature suffer from the same issue.
Expectations
Function containers should be successfully invoked independently if container user exists within crossplane-xfn container/image. We should even encourage function authors to use some arbitrary high/random UID for function.
- 主要语言
- Go
- 星标
- 6
- 派生
- 2
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
crossplane/function-runtime-oci 的其他 Issue
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
crossplane/function-runtime-oci#42 · 2 条评论 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 30/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 15/100
-
enhancement
crossplane/function-runtime-oci#35 · 11 条评论 · 12 个 reaction · 已指派 1 人 ·
查看 crossplane/function-runtime-oci 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 65/100
-
needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 75/100
googleapis/librarian#7670 · 2 条评论 ·