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
Cleanup old upgrading code that is v1.8->v1.9-specific #60359
Conversation
@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:
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. |
cc @kubernetes/sig-cluster-lifecycle-pr-reviews |
@@ -41,6 +46,9 @@ import ( | |||
"k8s.io/kubernetes/pkg/util/version" | |||
) | |||
|
|||
var v190alpha3 = version.MustParseSemantic("v1.9.0-alpha.3") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
/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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
9209706
to
e60b245
Compare
@fabriziopandini comment addressed. PTAL. Thanks! |
e60b245
to
1d167d2
Compare
/remove-kind bug |
@dixudx @fabriziopandini @timothysc @luxas - Can one of you please lgtm this PR? |
/lgtm |
[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 |
/test all Tests are more than 96 hours old. Re-running tests. |
[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process Pull Request Labels
|
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. |
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: