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

Easier kubectl download for Windows #3859

Closed
wants to merge 1 commit into from

Conversation

techtonik
Copy link
Contributor

@techtonik techtonik commented May 20, 2017

Because Windows doesn't ship curl and doesn't process $(curl ...)
shell expansion, it is better to provide a working link for it in example
instead of OS X

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For 1.7 Features: set Milestone to 1.7 and Base Branch to release-1.7
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

NOTE: Please check the “Allow edits from maintainers” box below to allow
reviewers fix problems on your patch and speed up the review process.
Please delete this note before submitting the pull request.


This change is Reviewable

Because Windows doesn't ship `curl` and doesn't process $(curl ...)
shell expansion, it is better to provide a working link for it in example
instead of OS X
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 20, 2017
techtonik added a commit to techtonik/kubernetes.github.io that referenced this pull request May 20, 2017
make delimiters fit issue width,
see kubernetes#3859
chenopis pushed a commit that referenced this pull request May 22, 2017
make delimiters fit issue width,
see #3859
@chenopis chenopis self-assigned this May 22, 2017
@chenopis
Copy link
Contributor

@techtonik I think we should use tabs to display the command and an example for each of the platforms.

@techtonik
Copy link
Contributor Author

Where is the JS code that renders tabs? I found https://github.com/kubernetes/kubernetes.github.io/blob/master/docs/user-guide/kubectl/v1.6/tabvisibility.js but it doesn't seem to be the one.

@chenopis
Copy link
Contributor

chenopis commented May 24, 2017

@techtonik

You can view the example here: https://kubernetes.io/docs/tabs-example/
That contains an explanation of the usage w/ annotated Liquid template tags.

The markdown for that page is here: https://raw.githubusercontent.com/kubernetes/kubernetes.github.io/master/docs/tabs-example.md

The implementation is here:
https://raw.githubusercontent.com/kubernetes/kubernetes.github.io/master/_includes/tabs.md

Basically, it's using jQuery UI Tabs:
https://kubernetes.io/jquery-ui.html

That js is included in all the pages:

<script src="/js/jquery-2.2.0.min.js"></script>
<script src="/js/jquery-ui.min.js"></script>

@techtonik
Copy link
Contributor Author

techtonik commented May 24, 2017

Basically, it's using jQuery UI Tabs:
https://kubernetes.io/jquery-ui.html

Yes. That's what I was interested in.

That markdown syntax is weird. I feel more comfortable just writing some HTML or even custom element to provide source quality and readability. It is that "Wikipedia problem" that its markup became more mystic than raw HTML.

@chenopis
Copy link
Contributor

chenopis commented May 26, 2017

Wait, what specifically about the markdown syntax is weird?

We would rather not have any custom JS or one-off HTML living in the repo. If you don't like the tabs implementation, we could work on refining it together.

@techtonik
Copy link
Contributor Author

tabs default="Calico":
  tab="Calico":
    """shell
    kubectl apply -f "http://docs.projectcalico.org/v2.0/getting-started/kubernetes/installation/hosted/kubeadm/calico.yaml"
    """
  tab="Flannel":
    """shell
    kubectl apply -f "https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel.yml?raw=true"
    """"

@techtonik
Copy link
Contributor Author

This is a good syntax for me to write tabs. It doesn't require me to know about template output capturing magic.

@chenopis
Copy link
Contributor

Ok, that looks like a reasonable syntax, but how would we implement that in the markdown parser? (I'm still learning Jekyll, so I haven't gotten to how to extend it yet.)

@techtonik
Copy link
Contributor Author

I am not aware of it either, but if we ditch the ability to write markdown in tabs, I think it should be possible to just provide custom syntax formatter. I replaced triple backticks with triple quotes below.

"""codetabs default="Calico"
shell, Calico
    kubectl apply -f "http://docs.projectcalico.org/v2.0/getting-started/kubernetes/installation/hosted/kubeadm/calico.yaml

shell, Flannel
    kubectl apply -f "https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel.yml?raw=true
""""

@chenopis
Copy link
Contributor

@techtonik This seems like more of a long-term project. Can you do me a favor an open an Issue for this. In the meantime, I would like to just use the existing tabs implementation w/ the liquid capture syntax. I can do this for install-kubectl.md pretty quickly if you'd like.

@techtonik
Copy link
Contributor Author

@chenopis yes, that would help me to concentrate on other things. Maybe part of that is that I really like to compare install commands for different systems and with clickable tabs it is not that convenient. )

@chenopis
Copy link
Contributor

@techtonik Ok, no prob. I'll work on making the change today. Then I'll close this PR.

chenopis added a commit that referenced this pull request May 31, 2017
chenopis added a commit that referenced this pull request May 31, 2017
chenopis added a commit that referenced this pull request May 31, 2017
chenopis added a commit that referenced this pull request May 31, 2017
chenopis added a commit that referenced this pull request May 31, 2017
chenopis added a commit that referenced this pull request May 31, 2017
chenopis added a commit that referenced this pull request May 31, 2017
chenopis added a commit that referenced this pull request May 31, 2017
chenopis added a commit that referenced this pull request May 31, 2017
chenopis added a commit that referenced this pull request May 31, 2017
chenopis added a commit that referenced this pull request May 31, 2017
chenopis added a commit that referenced this pull request May 31, 2017
chenopis added a commit that referenced this pull request May 31, 2017
chenopis added a commit that referenced this pull request Jun 1, 2017
chenopis added a commit that referenced this pull request Jun 1, 2017
chenopis added a commit that referenced this pull request Jun 1, 2017
chenopis added a commit that referenced this pull request Jun 1, 2017
chenopis added a commit that referenced this pull request Jun 1, 2017
chenopis added a commit that referenced this pull request Jun 1, 2017
chenopis added a commit that referenced this pull request Jun 1, 2017
chenopis added a commit that referenced this pull request Jun 1, 2017
chenopis added a commit that referenced this pull request Jun 1, 2017
@chenopis
Copy link
Contributor

chenopis commented Jun 1, 2017

@techtonik I've made the change. Take a look and let me know if this works for you. Cheers

@techtonik
Copy link
Contributor Author

techtonik commented Jun 2, 2017

Oh, that's cool. I was about to complain that OS X should be the name, but they've renamed to macOS again. :D

Documentation for Windows is wrong, because there is no chown or sudo but I'll fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants