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

fix(config): use the correct schema in the kube config file #91

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

aazon
Copy link
Contributor

@aazon aazon commented Jul 1, 2024

Currently, there are a few issues when I want the otc-auth tool to obtain CCE credentials and output them so that I can forward the output into a file:

otc-auth cce get-kube-config \
    --cluster "${TF_VAR_context}-${TF_VAR_stage}" \
    --days-valid 7 \
    --output \
> kubeconfig.yaml
  1. The otc-auth outputs the config file to STDERR, which already may contain log messages. That makes the kubeconfig.yaml not readable by kubectl.
  2. Even if there are no logs in the STDERR, the format of the generated JSON(YAML) is incompatible with the kubectl tool.

This pull request solves both of the above issues.

@aazon aazon requested review from zeljkobekcic and Ninja243 July 1, 2024 13:29
Copy link
Contributor

@Ninja243 Ninja243 left a comment

Choose a reason for hiding this comment

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

lgtm!

@Ninja243 Ninja243 merged commit 3c94bfa into main Jul 1, 2024
7 checks passed
@Ninja243 Ninja243 deleted the valid_kubeconfig branch July 1, 2024 13:32
Ninja243 added a commit that referenced this pull request Jul 1, 2024
Similar to this [PR](#91), `-o` should print to stdout not stderr
@Ninja243 Ninja243 mentioned this pull request Jul 1, 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

Successfully merging this pull request may close these issues.

2 participants