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

Use wget for http/https package in downloader container #556

Merged

Conversation

jiangpengcheng
Copy link
Member

@jiangpengcheng jiangpengcheng commented Jan 4, 2023

Fixes #545

Motivation

For http/https packages, we don't need to talk with pulsar cluster to download them

Modifications

Use wget for http/https packages

Verifying this change

  • Make sure that the change passes the CI checks.

  • This change added tests and can be verified as follows:

    • Added integration tests for end-to-end deployment with download package from http

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@jiangpengcheng jiangpengcheng requested review from nlu90, freeznet and a team as code owners January 4, 2023 07:56
@github-actions github-actions bot added the doc-required This pr needs a document label Jan 4, 2023
@freeznet freeznet added m/2023-01 type/enhancement Indicates an improvement to an existing feature labels Jan 11, 2023
@@ -511,6 +516,10 @@ func getLegacyDownloadCommand(downloadPath, componentPackage string, authProvide
func getDownloadCommand(downloadPath, componentPackage string, tlsProvided, authProvided bool, tlsConfig TLSConfig,
authConfig *v1alpha1.AuthConfig) []string {
var args []string
if hasHTTPPrefix(downloadPath) {
args = append(args, "wget", downloadPath, "-O", componentPackage)
Copy link
Member

Choose a reason for hiding this comment

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

do we need to check the availability of wget first, then call it to download?

Copy link
Member Author

Choose a reason for hiding this comment

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

the pulsarctl image has wget, I think we can update the doc to inform users what a downloadContainer requires (currently, it requires pulsarctl and wget)

@@ -511,6 +516,10 @@ func getLegacyDownloadCommand(downloadPath, componentPackage string, authProvide
func getDownloadCommand(downloadPath, componentPackage string, tlsProvided, authProvided bool, tlsConfig TLSConfig,
authConfig *v1alpha1.AuthConfig) []string {
var args []string
if hasHTTPPrefix(downloadPath) {
Copy link
Member

Choose a reason for hiding this comment

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

Another question: any chance to make this feature backport to getLegacyDownloadCommand?

Copy link
Member Author

Choose a reason for hiding this comment

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

looks like our runtime image neither have wget nor curl, so there will be some compatibility issues if add this feature to getLegacyDownloadCommand:

  • we can add wget or curl to runtime images and add this feature
  • but we also need to deprecate old runtime images or check whether given runtime images have wget or curl installed

I think there should be a general process for such a procedure(when we need to update runtime images):

  • add wget or curl or other required utils to runtime images and release new versions
  • add the new feature to FunctionMesh
  • release FunctionMesh vx.y.z, and make an announcement that FunctionMesh vx.y.z is not compatible with runtime images older than va.b.c
  • for user's custom runtime images, we list the requirements(what the image should contain)

HDYT? @freeznet @tpiperatgod @nlu90 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

This can be easily solved by Buildpacks, but we currently need a user-friendly image build workflow...

Copy link
Member Author

Choose a reason for hiding this comment

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

are Buildpacks-related commits merged? or docs updated in functionmesh.io?

Copy link
Contributor

Choose a reason for hiding this comment

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

has provided the docs and demos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-added m/2023-01 type/enhancement Indicates an improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploying functions without privileged access
4 participants