Skip to content

Commit 0c18f62

Browse files
cahillsfclaude
andcommitted
fix lint: tag alignment, doc comments, unused params
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e76ff9a commit 0c18f62

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

cmd/crossplane/core/core.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ type startCommand struct {
130130
TLSClientCertsDir string `env:"TLS_CLIENT_CERTS_DIR" help:"The path of the folder which will store TLS client certificate of Crossplane."`
131131

132132
TLSClientCACertFileName string `env:"TLS_CLIENT_CA_CERT_FILENAME" help:"The filename of the CA certificate in the TLS client certs directory."`
133-
TLSClientCertFileName string `env:"TLS_CLIENT_CERT_FILENAME" help:"The filename of the client certificate in the TLS client certs directory."`
134-
TLSClientKeyFileName string `env:"TLS_CLIENT_KEY_FILENAME" help:"The filename of the client private key in the TLS client certs directory."`
133+
TLSClientCertFileName string `env:"TLS_CLIENT_CERT_FILENAME" help:"The filename of the client certificate in the TLS client certs directory."`
134+
TLSClientKeyFileName string `env:"TLS_CLIENT_KEY_FILENAME" help:"The filename of the client private key in the TLS client certs directory."`
135135

136136
TLSServerCertFileName string `env:"TLS_SERVER_CERT_FILENAME" help:"The filename of the server certificate in the TLS server certs directory."`
137137
TLSServerKeyFileName string `env:"TLS_SERVER_KEY_FILENAME" help:"The filename of the server private key in the TLS server certs directory."`

cmd/crossplane/core/init.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ type initCommand struct {
5555
TLSServerSecretName string `env:"TLS_SERVER_SECRET_NAME" help:"The name of the Secret that the initializer will fill with TLS server certificates."`
5656
TLSClientSecretName string `env:"TLS_CLIENT_SECRET_NAME" help:"The name of the Secret that the initializer will fill with TLS client certificates."`
5757

58-
WebhookTLSCertDir string `env:"WEBHOOK_TLS_CERT_DIR" help:"Directory containing TLS certificates for webhooks. When set, certificates are read from files instead of Secrets."`
59-
WebhookTLSCACert string `env:"WEBHOOK_TLS_CA_CERT" help:"Filename of the CA certificate within the TLS cert directory."`
58+
WebhookTLSCertDir string `env:"WEBHOOK_TLS_CERT_DIR" help:"Directory containing TLS certificates for webhooks. When set, certificates are read from files instead of Secrets."`
59+
WebhookTLSCACert string `env:"WEBHOOK_TLS_CA_CERT" help:"Filename of the CA certificate within the TLS cert directory."`
6060
}
6161

6262
// Run starts the initialization process.

internal/initializer/webhook_configurations.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ type SecretCAProvider struct {
5050
SecretRef types.NamespacedName
5151
}
5252

53+
// GetCABundle returns the CA bundle from a Kubernetes Secret.
5354
func (p *SecretCAProvider) GetCABundle(ctx context.Context, kube client.Client) ([]byte, error) {
5455
s := &corev1.Secret{}
5556
if err := kube.Get(ctx, p.SecretRef, s); err != nil {
@@ -68,7 +69,8 @@ type FileCAProvider struct {
6869
Path string
6970
}
7071

71-
func (p *FileCAProvider) GetCABundle(ctx context.Context, kube client.Client) ([]byte, error) {
72+
// GetCABundle returns the CA bundle from a file on disk.
73+
func (p *FileCAProvider) GetCABundle(_ context.Context, _ client.Client) ([]byte, error) {
7274
data, err := os.ReadFile(p.Path)
7375
if err != nil {
7476
return nil, errors.Wrap(err, errReadCABundleFile)

0 commit comments

Comments
 (0)