added documentation about the format of certificateKey

Signed-off-by: SaumyaBhushan <saumya.bhushan666@gmail.com>
This commit is contained in:
SaumyaBhushan 2023-09-10 11:34:43 +05:30
parent 49768134e5
commit df5c1bb1ea
5 changed files with 8 additions and 2 deletions

View File

@ -60,6 +60,7 @@ type InitConfiguration struct {
// CertificateKey sets the key with which certificates and keys are encrypted prior to being uploaded in // CertificateKey sets the key with which certificates and keys are encrypted prior to being uploaded in
// a secret in the cluster during the uploadcerts init phase. // a secret in the cluster during the uploadcerts init phase.
// The certificate key is a hex encoded string that is an AES key of size 32 bytes.
CertificateKey string CertificateKey string
// SkipPhases is a list of phases to skip during command execution. // SkipPhases is a list of phases to skip during command execution.
@ -337,6 +338,7 @@ type JoinControlPlane struct {
// CertificateKey is the key that is used for decryption of certificates after they are downloaded from the secret // CertificateKey is the key that is used for decryption of certificates after they are downloaded from the secret
// upon joining a new control plane node. The corresponding encryption key is in the InitConfiguration. // upon joining a new control plane node. The corresponding encryption key is in the InitConfiguration.
// The certificate key is a hex encoded string that is an AES key of size 32 bytes.
CertificateKey string CertificateKey string
} }

View File

@ -54,6 +54,7 @@ type InitConfiguration struct {
// CertificateKey sets the key with which certificates and keys are encrypted prior to being uploaded in // CertificateKey sets the key with which certificates and keys are encrypted prior to being uploaded in
// a secret in the cluster during the uploadcerts init phase. // a secret in the cluster during the uploadcerts init phase.
// The certificate key is a hex encoded string that is an AES key of size 32 bytes.
// +optional // +optional
CertificateKey string `json:"certificateKey,omitempty"` CertificateKey string `json:"certificateKey,omitempty"`
@ -354,6 +355,7 @@ type JoinControlPlane struct {
// CertificateKey is the key that is used for decryption of certificates after they are downloaded from the secret // CertificateKey is the key that is used for decryption of certificates after they are downloaded from the secret
// upon joining a new control plane node. The corresponding encryption key is in the InitConfiguration. // upon joining a new control plane node. The corresponding encryption key is in the InitConfiguration.
// The certificate key is a hex encoded string that is an AES key of size 32 bytes.
// +optional // +optional
CertificateKey string `json:"certificateKey,omitempty"` CertificateKey string `json:"certificateKey,omitempty"`
} }

View File

@ -58,6 +58,7 @@ type InitConfiguration struct {
// CertificateKey sets the key with which certificates and keys are encrypted prior to being uploaded in // CertificateKey sets the key with which certificates and keys are encrypted prior to being uploaded in
// a secret in the cluster during the uploadcerts init phase. // a secret in the cluster during the uploadcerts init phase.
// The certificate key is a hex encoded string that is an AES key of size 32 bytes.
// +optional // +optional
CertificateKey string `json:"certificateKey,omitempty"` CertificateKey string `json:"certificateKey,omitempty"`
@ -372,6 +373,7 @@ type JoinControlPlane struct {
// CertificateKey is the key that is used for decryption of certificates after they are downloaded from the secret // CertificateKey is the key that is used for decryption of certificates after they are downloaded from the secret
// upon joining a new control plane node. The corresponding encryption key is in the InitConfiguration. // upon joining a new control plane node. The corresponding encryption key is in the InitConfiguration.
// The certificate key is a hex encoded string that is an AES key of size 32 bytes.
// +optional // +optional
CertificateKey string `json:"certificateKey,omitempty"` CertificateKey string `json:"certificateKey,omitempty"`
} }

View File

@ -188,7 +188,7 @@ func AddInitConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1.InitConfigurati
) )
flagSet.StringVar( flagSet.StringVar(
&cfg.CertificateKey, options.CertificateKey, "", &cfg.CertificateKey, options.CertificateKey, "",
"Key used to encrypt the control-plane certificates in the kubeadm-certs Secret.", "Key used to encrypt the control-plane certificates in the kubeadm-certs Secret. The certificate key is a hex encoded string that is an AES key of size 32 bytes.",
) )
cmdutil.AddCRISocketFlag(flagSet, &cfg.NodeRegistration.CRISocket) cmdutil.AddCRISocketFlag(flagSet, &cfg.NodeRegistration.CRISocket)
} }

View File

@ -251,7 +251,7 @@ func addJoinConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1.JoinConfigurati
) )
flagSet.StringVar( flagSet.StringVar(
&cfg.ControlPlane.CertificateKey, options.CertificateKey, cfg.ControlPlane.CertificateKey, &cfg.ControlPlane.CertificateKey, options.CertificateKey, cfg.ControlPlane.CertificateKey,
"Use this key to decrypt the certificate secrets uploaded by init.", "Use this key to decrypt the certificate secrets uploaded by init. The certificate key is a hex encoded string that is an AES key of size 32 bytes.",
) )
// add control plane endpoint flags to the specified flagset // add control plane endpoint flags to the specified flagset
flagSet.StringVar( flagSet.StringVar(