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 stack endpoints #1866

Merged
merged 6 commits into from Nov 10, 2021
Merged

Add stack endpoints #1866

merged 6 commits into from Nov 10, 2021

Conversation

jLopezbarb
Copy link
Contributor

Signed-off-by: Javier López Barba javier@okteto.com

Proposed changes

  • Adds a command to show the endpoints generated by a stack
  • Show the endpoints at the end of okteto stack deploy --wait

Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba <javier@okteto.com>
@jLopezbarb jLopezbarb requested a review from a team October 21, 2021 15:23
@codecov
Copy link

codecov bot commented Oct 21, 2021

Codecov Report

Merging #1866 (ccfb664) into master (ec977dd) will decrease coverage by 0.16%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1866      +/-   ##
==========================================
- Coverage   33.62%   33.46%   -0.17%     
==========================================
  Files         122      124       +2     
  Lines       13758    13825      +67     
==========================================
  Hits         4626     4626              
- Misses       8632     8699      +67     
  Partials      500      500              
Impacted Files Coverage Δ
pkg/cmd/stack/endpoints.go 0.00% <0.00%> (ø)
pkg/okteto/stack.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec977dd...ccfb664. Read the comment docs.

@rberrelleza
Copy link
Member

@jLopezbarb could you share a screenshot of how does it look like?

Signed-off-by: Javier López Barba <javier@okteto.com>
@jLopezbarb
Copy link
Contributor Author

It seems weird to show that the endpoint has been deployed correctly. Captura de pantalla 2021-10-22 a las 9 45 53

@rlamana
Copy link
Contributor

rlamana commented Oct 25, 2021

Why don't you show the endpoint after the successful message? And it could be an "info" line type.

@derek
Copy link

derek bot commented Nov 3, 2021

Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project.

Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken.

💡 Shall we fix this?

This will only take a few moments.

First, clone your fork and checkout this branch using the git CLI.

Next, set up your real name and email address:

git config --global user.name "Your Full Name"
git config --global user.email "you@domain.com"

Finally, run one of these commands to add the "Signed-off-by" line to your commits.

If you only have one commit so far then run: git commit --amend --signoff and then git push --force.
If you have multiple commits, watch this video.

Check that the message has been added properly by running "git log".

@derek derek bot added the no-dco label Nov 3, 2021
Signed-off-by: Javier López Barba <javier@okteto.com>
@jLopezbarb
Copy link
Contributor Author

@rlamana
Captura de pantalla 2021-11-03 a las 18 11 49

@rberrelleza
Copy link
Member

@rlamana Captura de pantalla 2021-11-03 a las 18 11 49

I feel like that last part is too verbose. We show the stack name in both messages. Maybe the second one could just say "Endpoints available:"

Signed-off-by: Javier López Barba <javier@okteto.com>
@rlamana
Copy link
Contributor

rlamana commented Nov 8, 2021

@jLopezbarb Agree with Ramiro. Update the screenshot when ready.

@jLopezbarb
Copy link
Contributor Author

Captura de pantalla 2021-11-08 a las 12 47 33

@rlamana
Copy link
Contributor

rlamana commented Nov 8, 2021

@rberrelleza isn't it more correct to say "Available endpoints"?

@rberrelleza
Copy link
Member

@rberrelleza isn't it more correct to say "Available endpoints"?

Not sure tbh. Maybe we should just use Endpoints:?

@jmacelroy
Copy link
Contributor

@rberrelleza isn't it more correct to say "Available endpoints"?

Not sure tbh. Maybe we should just use Endpoints:?

They are both correct but I prefer Endpoints available: and think it's more common.

It's also listed on wikipedia as an example of postpositive adjective use :) It's one of those things I've never thought about but once I do I have no clue how English works, https://en.wikipedia.org/wiki/Postpositive_adjective, Certain adjectives are used fairly commonly in postpositive position. Present and past participles exhibit this behavior, as in all those entering should ..., one of the men executed was ..., but at will this can be considered to be a verbal rather than adjectival use (a kind of reduced relative clause). Similar behavior is displayed by many adjectives with the suffix -able or -ible (e.g. the best room available, the only decision possible, the worst choice imaginable, the persons liable).

@rlamana
Copy link
Contributor

rlamana commented Nov 9, 2021

@jmacelroy English can be a bit of a nightmare when it comes to exceptions or special cases...

In that case, I like the Endpoints available: label.

@jLopezbarb jLopezbarb merged commit e06fd24 into master Nov 10, 2021
@jLopezbarb jLopezbarb deleted the jlopezbarb/add-stack-endpoints branch November 10, 2021 10:47
)

func ListEndpoints(ctx context.Context, stack *model.Stack, output string) error {
oktetoClient, err := okteto.NewOktetoClient()
Copy link
Contributor

Choose a reason for hiding this comment

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

@jLopezbarb this is wrong. We could list the ingresses instead and get the URL from there. That wway endpoints are available in vanilla kubernetes clusters too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants