Skip to content
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

[doc] The example function yaml could not be run #504

Closed
imaffe opened this issue Nov 2, 2022 · 7 comments · Fixed by #542
Closed

[doc] The example function yaml could not be run #504

imaffe opened this issue Nov 2, 2022 · 7 comments · Fixed by #542
Assignees
Labels
area/documentation component/controller doc This pr contains a document doc-added m/2022-12 type/task Indicates a chore or a small item of work

Comments

@imaffe
Copy link
Contributor

imaffe commented Nov 2, 2022

In the function mesh documentation, there is a step to run kubectl apply -f config/samples/compute_v1alpha1_function.yaml

And this yaml requires some extra setup, such as upload the function jar to pulsar storage or pack into the running image. The function jar location refers to a local test name as well.

One thing we can do is to create a demo image containing the basic jar and use the image in compute_v1alpha1_function.yaml.

image.png

@imaffe imaffe added area/documentation component/controller doc This pr contains a document doc/required m/2022-11 type/task Indicates a chore or a small item of work labels Nov 2, 2022
@imaffe imaffe self-assigned this Nov 2, 2022
@imaffe
Copy link
Contributor Author

imaffe commented Nov 7, 2022

There is a sample image folder to create images for running jars. Need to investigate if the samples are being used and updated now~

@imaffe
Copy link
Contributor Author

imaffe commented Nov 7, 2022

Looks like the best way would be to create a public docker registry and use the docker image to run the documentation command.

@freeznet
Copy link
Member

freeznet commented Nov 11, 2022

Another way is we change the example YAML to use a full pulsar image, like pulsar-all, and set the java.jar to /pulsar/examples/...jar, remove java.jarLocation as well.

@imaffe
Copy link
Contributor Author

imaffe commented Dec 5, 2022

I encountered mkdir: cannot create directory '/pulsar/conf/java-log/': Permission denied when using the pulsar-all image, maybe need to run as root as well.

@tpiperatgod
Copy link
Contributor

I encountered mkdir: cannot create directory '/pulsar/conf/java-log/': Permission denied when using the pulsar-all image, maybe need to run as root as well.

what's the tag of the pulsar-all image you are using?

@imaffe
Copy link
Contributor Author

imaffe commented Dec 5, 2022

@tpiperatgod 2.9.2.23

@freeznet
Copy link
Member

freeznet commented Dec 6, 2022

@imaffe pulsar 2.9 is still in root image, and the /pulsar directory is owned by root, so if you want to use pulsar-all as the runner image, you will need to set spec.pod.securityContext.runAsUser: 0 to make the container run with the correct user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation component/controller doc This pr contains a document doc-added m/2022-12 type/task Indicates a chore or a small item of work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants