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

[FM v0.10.0]--Support using wget to download HTTP/HTTPS packages #230

Merged
merged 3 commits into from
Jan 19, 2023

Conversation

Huanli-Meng
Copy link
Contributor

@Huanli-Meng Huanli-Meng commented Jan 18, 2023

Motivation

If the function package file uses the HTTP/HTTPS protocol, users need to have an admin access right to download them. To allow a role user to download HTTP/HTTPS package, FM v0.10.0 brings some code changes (code PR #556). Therefore, update docs accordingly.

Modification

Update the Packages section in the Function CRD configurations document.

@netlify
Copy link

netlify bot commented Jan 18, 2023

Deploy Preview for function-mesh ready!

Name Link
🔨 Latest commit 8e4d255
🔍 Latest deploy log https://app.netlify.com/sites/function-mesh/deploys/63c8ffcbff2f800009909bd4
😎 Deploy Preview https://deploy-preview-230--function-mesh.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

teachwrite
teachwrite previously approved these changes Jan 18, 2023
Copy link
Contributor

@teachwrite teachwrite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -248,10 +248,10 @@ Function Mesh supports running Pulsar Functions in Java, Python and Go. This tab

| Field | Description |
| --- | --- |
| `jarLocation` | The path to the JAR file for the function. It is only available for Pulsar functions written in Java. |
| `jarLocation` | The path to the JAR file for the function. It is only available for Pulsar functions written in Java. If the package file uses the HTTP or HTTPS protocol, you need to set `enable-init-containers` to `true` when you install the Function Mesh Operator. For details about how to configure the Function Mesh Operator, see [Function Mesh Operator configurations](/reference/function-mesh-config.md).|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not a requirement to use init-containers when the package file uses the HTTP or HTTPS protocol:

  • if enable-init-containers is set to true, then when the package file uses HTTP/HTTPS, it will use wget to download the package
  • if enable-init-containers is set to false, then when the package file uses HTTP/HTTPS, it will use pulsar-admin to download the package

the difference is that use pulsar-admin way required pulsar admin privilege while wget doesn't

the doc update should add a field: DownloaderImage in function-crd/source-crd/sink-crd, like below:

| --- | --- |
| `DownloaderImage` | The image used to download the package, which requires [pulsarctl](https://github.com/streamnative/pulsarctl) and `wget` installed, only takes effect when `enable-init-containers` is `true`. By default, an [official pulsarctl image](https://hub.docker.com/r/streamnative/pulsarctl) is used. |

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and in here: https://functionmesh.io/docs/reference/function-mesh-config, append below content to the enable-init-containers filed's description column:

Set it to true when you want to use `wget` instead of `pulsar-admin`(requires admin authentication of pulsar) to download packages from HTTP/HTTPS.

@Huanli-Meng Huanli-Meng merged commit 0873763 into main Jan 19, 2023
@Huanli-Meng Huanli-Meng deleted the wget-download branch January 19, 2023 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants