-
Notifications
You must be signed in to change notification settings - Fork 67
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 contentEncoding and contentMediaType for Kubeconfig #468
Open
Dorthu
wants to merge
1
commit into
linode:development
Choose a base branch
from
Dorthu:feature/note-encoding-in-kubeconfig
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add contentEncoding and contentMediaType for Kubeconfig #468
Dorthu
wants to merge
1
commit into
linode:development
from
Dorthu:feature/note-encoding-in-kubeconfig
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dorthu
added a commit
to linode/linode-cli
that referenced
this pull request
Jun 21, 2021
Closes #247 Related to linode/linode-api-docs#468 The API returned kubeconfigs as a base64-encoded YAML string. The linked docs PR uses the appropriate JSON Schema fields to note the encoding and actual media type, and this CLI PR adds support for that information and handling it. However, the output for `linode-cli lke kubeconfig-view $CLUSTER_ID` is _pretty terrible_ with this change. The `token` and `certificate-authority-data` fields are _very long_, and cause wrapping in the terminal, which messes up the entire output table. This can be corrected by using `--text` as the output format, which, paired with `--no-headers`, produces a nicely-formatted YAML file as output; the default behavior being ugly isn't great in my opinion though. This change isn't strictly necessary, as a user can run `linode-cli lke kubeconfig-view $CLUSTER_ID --text --no-headers | base64 -d` to see the same output today; however, having the default output be useful would be a nice touch. I see the following options here: * Accept that the current output is fine and do not merge this PR * Accept that this PR's output is ugly by default and merge it anyway * Come up with a way to signal to the CLI that an operation should default to `--text --no-headers`-style output as part of this PR. This change probably also represents a breaking change for the CLI, as an existing script that does the decoding as noted above would stop working with this change merged in. Opinions appreciated; I will close/open/update this PR as relevant based on discussion here.
This will not pass validation without Dorthu/openapi3#48, as these fields were previously not included in the parser/validator. |
This is related to linode/linode-cli#247 The kubeconfig returned from `GET /lke/clusters/{clusterId}/kubeconfig` is a base64-encoded YAML config. The OpenAPI standard now supports this [with the standard JSON Schema fields](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#considerations-for-file-uploads). This change notes the encoding of the `kubeconfig` field, which the CLI may use to decode the base64 data and display the actual YAML for convenience (see linked CLI PR below).
Dorthu
force-pushed
the
feature/note-encoding-in-kubeconfig
branch
from
October 13, 2021 12:08
39bc11e
to
f726110
Compare
Dorthu
added a commit
to linode/linode-cli
that referenced
this pull request
Oct 13, 2021
Closes #247 Related to linode/linode-api-docs#468 The API returned kubeconfigs as a base64-encoded YAML string. The linked docs PR uses the appropriate JSON Schema fields to note the encoding and actual media type, and this CLI PR adds support for that information and handling it. However, the output for `linode-cli lke kubeconfig-view $CLUSTER_ID` is _pretty terrible_ with this change. The `token` and `certificate-authority-data` fields are _very long_, and cause wrapping in the terminal, which messes up the entire output table. This can be corrected by using `--text` as the output format, which, paired with `--no-headers`, produces a nicely-formatted YAML file as output; the default behavior being ugly isn't great in my opinion though. This change isn't strictly necessary, as a user can run `linode-cli lke kubeconfig-view $CLUSTER_ID --text --no-headers | base64 -d` to see the same output today; however, having the default output be useful would be a nice touch. I see the following options here: * Accept that the current output is fine and do not merge this PR * Accept that this PR's output is ugly by default and merge it anyway * Come up with a way to signal to the CLI that an operation should default to `--text --no-headers`-style output as part of this PR. This change probably also represents a breaking change for the CLI, as an existing script that does the decoding as noted above would stop working with this change merged in. Opinions appreciated; I will close/open/update this PR as relevant based on discussion here.
LBGarber
pushed a commit
to LBGarber/linode-api-docs
that referenced
this pull request
Jun 15, 2022
…06.1 Add API v4.106.1 Changelog
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is related to linode/linode-cli#247
The kubeconfig returned from
GET /lke/clusters/{clusterId}/kubeconfig
is a base64-encoded YAML config. The OpenAPI standard now supports this
with the standard JSON Schema fields.
This change notes the encoding of the
kubeconfig
field, which the CLImay use to decode the base64 data and display the actual YAML for
convenience (see linked CLI PR below).