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

Cleanup old upgrading code that is v1.8->v1.9-specific #60359

Merged
merged 3 commits into from Mar 14, 2018

Conversation

xiangpengzhao
Copy link
Contributor

What this PR does / why we need it:
Cleanup old upgrading code that is v1.8->v1.9-specific

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes kubernetes/kubeadm#622
This will finish the task in the issue.

Special notes for your reviewer:
/cc @luxas @vbmade2000

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Feb 24, 2018
@k8s-ci-robot
Copy link
Contributor

@xiangpengzhao: GitHub didn't allow me to request PR reviews from the following users: vbmade2000.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

What this PR does / why we need it:
Cleanup old upgrading code that is v1.8->v1.9-specific

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes kubernetes/kubeadm#622
This will finish the task in the issue.

Special notes for your reviewer:
/cc @luxas @vbmade2000

Release note:

NONE

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 24, 2018
@xiangpengzhao
Copy link
Contributor Author

cc @kubernetes/sig-cluster-lifecycle-pr-reviews

@k8s-ci-robot k8s-ci-robot added the sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. label Feb 27, 2018
@@ -41,6 +46,9 @@ import (
"k8s.io/kubernetes/pkg/util/version"
)

var v190alpha3 = version.MustParseSemantic("v1.9.0-alpha.3")
Copy link
Member

Choose a reason for hiding this comment

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

This var is not used. Should be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's still used (in line 147: https://github.com/kubernetes/kubernetes/pull/60359/files#diff-668202917ffe6a202af0eea0d7bcf87aR147) and necessary to keep it for now. It can be removed in 1.11 cycle.

@dixudx
Copy link
Member

dixudx commented Feb 28, 2018

/area kubeadm

// shouldBackupAPIServerCertAndKey checks if the cert of kube-apiserver will be expired in 180 days.
func shouldBackupAPIServerCertAndKey(certAndKeyDir string) (bool, error) {
apiServerCert := filepath.Join(certAndKeyDir, kubeadmconstants.APIServerCertName)
data, err := ioutil.ReadFile(apiServerCert)
Copy link
Member

Choose a reason for hiding this comment

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

What about simplifying this part using utility for reading certificate file already available in
cmd/kubeadm/app/phases/certs/pkiutil/ or in k8s.io/client-go/util/cert?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Awesome!!! Fixed. Thanks for the suggestion! @fabriziopandini

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

@xiangpengzhao Thanks for this PR!
Only one comment from my side about simplifying the cert file management reusing utility methods already available in Kubernestes

Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

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

/approve

@timothysc timothysc added kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Mar 5, 2018
@thockin
Copy link
Member

thockin commented Mar 5, 2018

This change is Reviewable

@timothysc timothysc added this to the v1.10 milestone Mar 5, 2018
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 5, 2018
@xiangpengzhao
Copy link
Contributor Author

@fabriziopandini comment addressed. PTAL. Thanks!

@xiangpengzhao
Copy link
Contributor Author

/remove-kind bug
to follow this: Must specify exactly one of kind/bug, kind/cleanup or kind/feature

@k8s-ci-robot k8s-ci-robot removed the kind/bug Categorizes issue or PR as related to a bug. label Mar 7, 2018
@dims
Copy link
Member

dims commented Mar 13, 2018

@dixudx @fabriziopandini @timothysc @luxas - Can one of you please lgtm this PR?

@dixudx
Copy link
Member

dixudx commented Mar 14, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 14, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dixudx, timothysc, xiangpengzhao

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-github-robot
Copy link

/test all

Tests are more than 96 hours old. Re-running tests.

@k8s-github-robot
Copy link

[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process

@dixudx @xiangpengzhao

Pull Request Labels
  • sig/cluster-lifecycle: Pull Request will be escalated to these SIGs if needed.
  • priority/important-soon: Escalate to the pull request owners and SIG owner; move out of milestone after several unsuccessful escalation attempts.
  • kind/cleanup: Adding tests, refactoring, fixing old bugs.
Help

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 61129, 60359). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 0207a09 into kubernetes:master Mar 14, 2018
@xiangpengzhao xiangpengzhao deleted the remove-1.8-upgrade branch March 15, 2018 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bump minimum version to v1.9 and cleanup v1.8-specific code at HEAD
8 participants