Skip to content

Conversation

@yanjiaxin534
Copy link
Contributor

No description provided.

@yanjiaxin534 yanjiaxin534 changed the base branch from main to remote-agent September 18, 2025 07:43

// CertRequest represents a certificate creation request
type CertRequest struct {
TargetName string `json:"targetName"`
Copy link
Contributor

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
Copy link
Contributor

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 {
Copy link
Contributor

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
Copy link
Contributor

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)
Copy link
Contributor

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?

@yanjiaxin534 yanjiaxin534 force-pushed the remote-agent-refactor-cert-provider branch from dffced2 to 8b2b2ac Compare September 19, 2025 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants