Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

kubefedctl: Set host cluster context to current context if empty #1076

Merged
merged 1 commit into from
Aug 16, 2019
Merged

kubefedctl: Set host cluster context to current context if empty #1076

merged 1 commit into from
Aug 16, 2019

Conversation

marun
Copy link
Contributor

@marun marun commented Aug 1, 2019

For any invocation of kubefedctl that does not specify a value for --host-cluster-context, the current config context will be
used. However, other usage of the HostClusterContext variable requires explicitly looking up the name of the current context to avoid using an empty string.

#1065 fixed the join command to lookup the current context. This change ensures the same lookup is performed for all kubefedctl commands.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 1, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 1, 2019
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 1, 2019
@marun
Copy link
Contributor Author

marun commented Aug 1, 2019

cc: @qiujian16

Copy link
Contributor

@font font left a comment

Choose a reason for hiding this comment

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

LGTM

@marun
Copy link
Contributor Author

marun commented Aug 15, 2019

Rebased

For any invocation of `kubefedctl` that does not specify a value for
`--host-cluster-context`, the current config context will be
used. However, other usage of the `HostClusterContext` variable
requires explicitly looking up the name of the current context to
avoid using an empty string.

Previously the `join` command was fixed to lookup the current
context. This change ensures the same lookup is performed for all
`kubefedctl` commands.
@marun
Copy link
Contributor Author

marun commented Aug 16, 2019

Rebased

Copy link
Contributor

@font font left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 16, 2019
@k8s-ci-robot k8s-ci-robot merged commit 7b0f5f8 into kubernetes-retired:master Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants