Skip to content

self-generated secret for webhook does not seem to generate a compliant tls secret #430

Closed
@raffaelespazzoli

Description

@raffaelespazzoli

self-generated webhook secrets do not seem to follow the standard rules for tls secrets. Which to my undertsanding are:

  1. the secret must be of type kubernetes.io/tls
  2. the keys should be tls.key, tls.crt, ca.crt. ca.crt should contain the entire ca_bundle, so there should not be a need for a fourth file.
    From what I see the code does not set the type of the secret and generates the followinf keys:
const (
	// CAKeyName is the name of the CA private key
	CAKeyName = "ca-key.pem"
	// CACertName is the name of the CA certificate
	CACertName = "ca-cert.pem"
	// ServerKeyName is the name of the server private key
	ServerKeyName = "key.pem"
	// ServerCertName is the name of the serving certificate
	ServerCertName = "cert.pem"
)

Which I guess are the files expected by the code.
This limits interoperability with other mechanism of generating secrets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions