-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move to v1beta1 and embedded image #21
Conversation
Signed-off-by: Philippe Scorsolini <[email protected]>
Signed-off-by: Philippe Scorsolini <[email protected]>
Signed-off-by: Philippe Scorsolini <[email protected]>
Signed-off-by: Philippe Scorsolini <[email protected]>
Currently hitting the following error while trying to run an example image similar to the one described in #1: |
NetworkPolicyRunner NetworkPolicy = "Runner" | ||
// NetworkPolicyIsolated runs the container without network access. The default. | ||
NetworkPolicyIsolated NetworkPolicy = "Isolated" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can drop all this config, and just rely on the resource limits (and network access) of the "outer" container (i.e. the Kubernetes pod that runs this Function).
Signed-off-by: Philippe Scorsolini <[email protected]>
I added some logs and tried forcing the root user as suggested @negz, but still nothing: xfn xfn 2023-08-23T11:53:17Z DEBUG function-runtime-oci CAP_SETUID and CAP_SETGID are available
xfn xfn 2023-08-23T11:53:17Z DEBUG function-runtime-oci root UID and GID in function's user namespace {"uid": 100000, "gid": 100000}
xfn xfn 2023-08-23T11:53:17Z DEBUG function-runtime-oci image tarball copied to cache {"src": "function.tgz", "path": "/function-runtime-oci-cache/function.tgz"}
xfn xfn 2023-08-23T11:53:17Z DEBUG function-runtime-oci Listening {"network": "tcp", "address": "0.0.0.0:1234"}
xfn xfn 2023-08-23T11:53:27Z DEBUG function-runtime-oci Running function {"request": "desired:{composite:{resource:{fields:{key:\"something\" value:{string_value:\"something\"}}}}}"}
xfn xfn 2023-08-23T11:53:27Z DEBUG function-runtime-oci Running command {"command": "/usr/local/bin/function-runtime-oci spark --max-stdio-bytes=104857600 --image-tar-ball=/function-runtime-oci-cache/function.tgz"}
xfn xfn 2023-08-23T11:53:27Z DEBUG function-runtime-oci Setting UID and GID mappings {"uid": 100000, "gid": 100000}
xfn xfn 2023-08-23T11:53:27Z DEBUG function-runtime-oci Starting command {"command": "/usr/local/bin/function-runtime-oci spark --max-stdio-bytes=104857600 --image-tar-ball=/function-runtime-oci-cache/function.tgz"} And still get:
I'm currently deploying the following pod and then connecting to it via apiVersion: v1
kind: Pod
metadata:
labels:
run: xfn
name: xfn
spec:
containers:
- image: phisco/function-runtime-oci-example:v0.0.20
imagePullPolicy: Always
name: xfn
args:
- -d
ports:
- containerPort: 1234
securityContext:
privileged: true
runAsUser: 0
volumeMounts:
- mountPath: /function-runtime-oci-cache
name: xfn-cache
volumes:
- name: xfn-cache
emptyDir:
sizeLimit: 1Gi
restartPolicy: Always The image I'm using is built on top of the one from this PR: ARG VERSION=latest
FROM phisco/function-runtime-oci:${VERSION}
ARG IMAGE_TARBALL
COPY ${IMAGE_TARBALL} /
ENV IMAGE_TARBALL=${IMAGE_TARBALL}
USER root $ VERSION=v0.0.20; docker build --build-arg IMAGE_TARBALL=function.tgz --build-arg VERSION=${VERSION} -t phisco/function-runtime-oci-example:${VERSION} . providing as FROM alpine:3.18
RUN apk add --no-cache jq
ENTRYPOINT ["/bin/sh", "-c", "jq '.desired.composite.resource.labels |= {\"labelizer.xfn.crossplane.io/processed\": \"true\"} + .'"] |
No description provided.