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

Add operator-sdk to arkade #547

Closed
1 of 2 tasks
xshyamx opened this issue Oct 20, 2021 · 8 comments
Closed
1 of 2 tasks

Add operator-sdk to arkade #547

xshyamx opened this issue Oct 20, 2021 · 8 comments

Comments

@xshyamx
Copy link
Contributor

xshyamx commented Oct 20, 2021

Add the operator-sdk CLI as a tool candidate for arkade

Expected Behaviour

Install operator-sdk

arkade get operator-sdk

Current Behaviour

Not available as a candidate

Are you a GitHub Sponsor (Yes/No?)

Check at https://github.com/sponsors/alexellis

  • Yes
  • No

Possible Solution

Add operator-sdk as a tool candidate

Context

The operator-sdk CLI is not available as part of any of the default APT/Yum repositories and does not require any special privileges to run. So, it is a good candidate for an arkade tool.

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS):

    • Amazon Linux
    • Ubuntu
    • MacOS
  • What arkade version is this?
    0.8.5

@alexellis
Copy link
Owner

Hi @xshyamx thanks for this suggestion, the app sounds fine to me.

For future suggestions, please can you follow the contribution guide and wait for approval before sending PRs? This is to avoid you spending unnecessary time and effort before we have agreement on a change.

The same approach applies to OpenFaaS/k3sup/inlets etc.

Alex

@xshyamx
Copy link
Contributor Author

xshyamx commented Oct 21, 2021

Sure. Will do that 👍🏽

@xshyamx
Copy link
Contributor Author

xshyamx commented Jun 18, 2022

Hi @alexellis ,

I'm encountering a special case with operator-sdk where there is no windows binary. There are a couple of options on how to handle it

  1. Return empty URL for BinaryTemplate or URLTemplate both will fail with the following error messages

    # empty BinaryTemplate
    Downloading: https://github.com/operator-framework/operator-sdk/releases/download/v1.22.0/
    Error: incorrect status for downloading tool: 404
    
    # empty URLTemplate
    Downloading: 
    Error: Get "": unsupported protocol scheme ""
    
  2. Check for empty string from tool.GetURL and throw an error

    dlURL, err := tool.GetURL(os, arch, ver, quiet)
    if err != nil {
    	return "", err
    }
    if dlURL == "" {
    	return "", errors.New("No available download for this environment")
    }

    Which results in

    $ ./arkade get --os ming  operator-sdk
    Downloading: operator-sdk
    2022/06/18 13:31:15 Looking up version for operator-sdk
    2022/06/18 13:31:16 Found: v1.22.0
    Error: No available download for this environment
    

I prefer option 2 but, would like your opinion on how to handle it

@alexellis
Copy link
Owner

I'd say that you should allow then URL to be generated so that it's a valid URL but returns a 404. That's the approach we've taken elsewhere. Try it and see the message that you get.

@xshyamx
Copy link
Contributor Author

xshyamx commented Jun 22, 2022

Updated PR with suggested changes

@alexellis
Copy link
Owner

Thank you. Can you check if you need to rebase? We are currently merging multiple PRs.

@xshyamx
Copy link
Contributor Author

xshyamx commented Jun 29, 2022

Yes. Have already rebased

@Shikachuu
Copy link
Contributor

/close

#548 already merged

@derek derek bot closed this as completed Jan 2, 2024
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

No branches or pull requests

3 participants