-
Notifications
You must be signed in to change notification settings - Fork 39
Remote agent refactor cert provider #808
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
base: remote-agent
Are you sure you want to change the base?
Remote agent refactor cert provider #808
Conversation
|
|
||
| // CertRequest represents a certificate creation request | ||
| type CertRequest struct { | ||
| TargetName string `json:"targetName"` |
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.
can we name this field more generic? as a cert request, what does target name mean?
| * SPDX-License-Identifier: MIT | ||
| */ | ||
|
|
||
| package k8scert |
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.
name it as osscertmgr
| if v, ok := properties["name"]; ok { | ||
| ret.Name = v | ||
| } | ||
| if v, ok := properties["inCluster"]; ok { |
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.
if you only support inCluster, why you provide options here?
| // Set default duration if not specified | ||
| duration := req.Duration | ||
| if duration == 0 { | ||
| duration = 365 * 24 * time.Hour // 1 year default |
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.
use constant
| } | ||
|
|
||
| // Create the certificate | ||
| certDER, err := x509.CreateCertificate(rand.Reader, &template, &template, &privateKey.PublicKey, privateKey) |
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.
why you didn't use OSS cert-manager (certificate CR) to manipulate cert?
dffced2 to
8b2b2ac
Compare
No description provided.