Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

add support for target url or target -u with dashboard url #190

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

neo-liang-sap
Copy link
Contributor

@neo-liang-sap neo-liang-sap commented Apr 20, 2020

What this PR does / why we need it:
Enable gardenctl target dashboardUrl dashboard_url or gardenctl target -u dashboard_url for directly targeting garden and shoot

This requires your (virtual) garden config to have dashboardUrl field set.
E.g.

gardenClusters:
  - kubeConfig: /path/to/kubeconfig.yaml
    name: foo
    dashboardUrl: https://dashboard.foo.example.com

Which issue(s) this PR fixes:
Fixes #188

Special notes for your reviewer:
the url could be in following two formats:

  • https:///namespace/garden-project/shoots/my-shoot/
  • https:///namespace/garden-project/shoots/my-shoot

Release note:

Enable `gardenctl target dashboardUrl <dashboard_url>` or `gardenctl target -u <dashboard_url>` for directly targeting garden and shoot. Make sure to have `dashboardUrl` field set for each of your (virtual) garden configurations

@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 20, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 20, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 20, 2020
@neo-liang-sap
Copy link
Contributor Author

tested in following scenraio , sorry for my bad drawing skills
image

pkg/cmd/target.go Outdated Show resolved Hide resolved
@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 21, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 21, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 21, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 21, 2020
@neo-liang-sap
Copy link
Contributor Author

Hi @petersutter ,
Thanks, i've fixed all issues according to your comments.
-Neo

pkg/cmd/target.go Outdated Show resolved Hide resolved
@gardener-robot-ci-2 gardener-robot-ci-2 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 21, 2020
Copy link
Contributor

@petersutter petersutter left a comment

Choose a reason for hiding this comment

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

one more minor change, otherwise lgtm
thnx!

pkg/cmd/target.go Outdated Show resolved Hide resolved
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 21, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 21, 2020
@petersutter
Copy link
Contributor

@neo-liang-sap I have also updated your description and release note. PTAL

@neo-liang-sap
Copy link
Contributor Author

thanks @petersutter for fixing the description!

Copy link
Contributor

@DockToFuture DockToFuture left a comment

Choose a reason for hiding this comment

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

/lgtm

@DockToFuture DockToFuture merged commit 755ffa4 into gardener-attic:master Apr 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gardenctl target target -u
7 participants