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

Adapt gardener adminkubeconfig in local_setup script #845

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

unmarshall
Copy link
Contributor

@unmarshall unmarshall commented Aug 29, 2023

What this PR does / why we need it:
Changes local_setup.sh script which has now been refactored and introduces the following enhancements:

  • New Usage:
        Usage: local_setup.sh [Options]
        Options:
          -d | --seed                       <seed-cluster-name>                 (Required) Name of the Gardener Seed Cluster
          -t | --shoot                      <shoot-cluster-name>                (Required) Name of the Gardener Shoot Cluster
          -p | --project                    <project-name>                      (Required) Name of the Gardener Project
          -i | --provider                   <provider-name>                     (Required) Infrastructure provider name. Supported providers (gcp|aws|azure|vsphere|openstack|alicloud|metal|equinix-metal)
          -l | --landscape                  <landscape-name>                    (Optional) Name of the landscape. Defaults to dev
          -k | --kubeconfig-path           <absolute-kubeconfig-path>           (Optional) Target path to store the control and target KubeConfigs. Default: <PROJECT-DIR>/dev/kube-configs
          -m | --mcm-provider-project-path <absolute-mcm-provider-project-dir>  (Optional) MCM Provider project directory. If not provided then it assumes that both mcm and mcm-provider projects are under the same parent directory
          -e | --kubeconfig-expiry-seconds <expiry-duration-in-seconds>         (Optional) Common expiry durations in seconds for control and target KubeConfigs. Default: 3600 seconds
  • Generates short-lived admin kubeconfigs.
  • Introduced another script local_restore.sh which scales back MCM deployment to 1 and also removes the annotation that prevents DWD to scale MCM down.
       Usage: local_restore.sh [Options]
      Options:
        -t | --shoot                      <shoot-cluster-name>                (Required) Name of the Gardener Shoot Cluster
        -p | --project                    <project-name>                      (Required) Name of the Gardener Project
        -l | --landscape                  <landscape-name>                    (Optional) Name of the landscape. Defaults to dev
        -i | --provider                   <provider-name>                     (Required) Infrastructure provider name. Supported providers (gcp|aws|azure|vsphere|openstack|alicloud|metal|equinix-metal)
        -k | --kubeconfig-path            <relative-kubeconfig-path>          (Optional) Relative path to the <PROJECT-DIR> where kubeconfigs will be downloaded. Path should not start with '/'. Default: <PROJECT-DIR>/dev/kube-configs
        -m | --mcm-provider-project-path  <absolute-mcm-provider-project-dir> (Optional) MCM Provider project directory. If not provided then it assumes that both mcm and mcm-provider projects are under the same parent directory
  • Added a new target in Makefile to add license headers. Quite a lot of files are missing them.

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

Special notes for your reviewer:

Release note:

A new make target is introduced to add license headers.

@unmarshall unmarshall requested a review from a team as a code owner August 29, 2023 07:31
@gardener-robot gardener-robot added needs/review Needs review size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) needs/second-opinion Needs second review by someone else labels Aug 29, 2023
@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) 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 Aug 29, 2023
@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 Aug 29, 2023
Copy link
Contributor

@himanshu-kun himanshu-kun left a comment

Choose a reason for hiding this comment

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

Thanks for the changes and additions, script usage looks much better now (will try it as well)

Didn't know we had so many files without licenses XD (or does it update the licenses also?)
will give lgtm after trying once (reviewer responsibility :p)

hack/local_setup.sh Show resolved Hide resolved
hack/local_setup.sh Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@gardener-robot gardener-robot added the needs/changes Needs (more) changes label Aug 29, 2023
@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 Aug 29, 2023
@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 Aug 31, 2023
@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 Aug 31, 2023
@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 Aug 31, 2023
@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 Aug 31, 2023
@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 Aug 31, 2023
@unmarshall
Copy link
Contributor Author

As discussed @himanshu-kun will create a separate issue to update all providers with the following changes:

  1. Add an empty .env file (copy it from mcm)
  2. Adapt Makefile (include .env and remove the statically defined variables)

Copy link
Contributor

@himanshu-kun himanshu-kun left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/changes Needs (more) changes needs/review Needs review needs/second-opinion Needs second review by someone else labels Sep 4, 2023
@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 Sep 4, 2023
@gardener-robot gardener-robot added needs/second-opinion Needs second review by someone else and removed reviewed/lgtm Has approval for merging labels Sep 11, 2023
@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 Sep 11, 2023
@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 Sep 11, 2023
@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 Sep 11, 2023
@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 Sep 11, 2023
@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 Sep 11, 2023
@himanshu-kun himanshu-kun merged commit c2decbd into gardener:master Sep 11, 2023
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Sep 11, 2023
@himanshu-kun
Copy link
Contributor

Updated the changes made here in #852

@unmarshall unmarshall deleted the setup branch September 25, 2023 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/second-opinion Needs second review by someone else size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt gardener adminkubeconfig in local_setup script
6 participants