package IO::K8s::Api::Certificates::V1beta1::PodCertificateRequestSpec;
# ABSTRACT: PodCertificateRequestSpec describes the certificate request. All fields are immutable after creation.
our $VERSION = '1.105';
use IO::K8s::Resource;

k8s maxExpirationSeconds => Int;


k8s nodeName => Str, 'required';


k8s nodeUID => Str, 'required';


k8s pkixPublicKey => Str;


k8s podName => Str, 'required';


k8s podUID => Str, 'required';


k8s proofOfPossession => Str;


k8s serviceAccountName => Str, 'required';


k8s serviceAccountUID => Str, 'required';


k8s signerName => Str, 'required';


k8s stubPKCS10Request => Str;


k8s unverifiedUserAnnotations => { Str => 1 };


1;

__END__

=pod

=encoding UTF-8

=head1 NAME

IO::K8s::Api::Certificates::V1beta1::PodCertificateRequestSpec - PodCertificateRequestSpec describes the certificate request. All fields are immutable after creation.

=head1 VERSION

version 1.105

=head2 maxExpirationSeconds

maxExpirationSeconds is the maximum lifetime permitted for the certificate.

If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver will reject values shorter than 3600 (1 hour). The maximum allowable value is 7862400 (91 days).

The signer implementation is then free to issue a certificate with any lifetime C<shorter> than MaxExpirationSeconds, but no shorter than 3600 seconds (1 hour). This constraint is enforced by kube-apiserver. C<kubernetes.io> signers will never issue certificates with a lifetime longer than 24 hours.

=head2 nodeName

nodeName is the name of the node the pod is assigned to.

=head2 nodeUID

nodeUID is the UID of the node the pod is assigned to.

=head2 pkixPublicKey

The PKIX-serialized public key the signer will issue the certificate to.

The key must be one of RSA3072, RSA4096, ECDSAP256, ECDSAP384, ECDSAP521, or ED25519. Note that this list may be expanded in the future. Signer implementations do not need to support all key types supported by kube-apiserver and kubelet. If a signer does not support the key type used for a given PodCertificateRequest, it must deny the request by setting a status.conditions entry with a type of "Denied" and a reason of "UnsupportedKeyType". It may also suggest a key type that it does support in the message field.

Deprecated: This field is replaced by StubPKCS10Request. If StubPKCS10Request is set, this field must be empty. Signer implementations should extract the public key from the StubPKCS10Request field.

=head2 podName

podName is the name of the pod into which the certificate will be mounted.

=head2 podUID

podUID is the UID of the pod into which the certificate will be mounted.

=head2 proofOfPossession

A proof that the requesting kubelet holds the private key corresponding to pkixPublicKey. It is contructed by signing the ASCII bytes of the pod's UID using C<pkixPublicKey>. kube-apiserver validates the proof of possession during creation of the PodCertificateRequest.

If the key is an RSA key, then the signature is over the ASCII bytes of the pod UID, using RSASSA-PSS from RFC 8017 (as implemented by the golang function crypto/rsa.SignPSS with nil options).

If the key is an ECDSA key, then the signature is as described by L<SEC 1, Version 2.0|https://www.secg.org/sec1-v2.pdf> (as implemented by the golang library function crypto/ecdsa.SignASN1)

If the key is an ED25519 key, the the signature is as described by the L<ED25519 Specification|https://ed25519.cr.yp.to/> (as implemented by the golang library crypto/ed25519.Sign).

Deprecated: This field is replaced by StubPKCS10Request. If StubPKCS10Request is set, this field must be empty.

=head2 serviceAccountName

serviceAccountName is the name of the service account the pod is running as.

=head2 serviceAccountUID

serviceAccountUID is the UID of the service account the pod is running as.

=head2 signerName

signerName indicates the requested signer. All signer names beginning with C<kubernetes.io> are reserved for use by the Kubernetes project. There is currently one well-known signer documented by the Kubernetes project, C<kubernetes.io/kube-apiserver-client-pod>, which will issue client certificates understood by kube-apiserver. It is currently unimplemented.

=head2 stubPKCS10Request

A PKCS#10 certificate signing request (DER-serialized) generated by Kubelet using the subject private key. Most signer implementations will ignore the contents of the CSR except to extract the subject public key. The API server automatically verifies the CSR signature during admission, so the signer does not need to repeat the verification. CSRs generated by kubelet are completely empty.

The subject public key must be one of RSA3072, RSA4096, ECDSAP256, ECDSAP384, ECDSAP521, or ED25519. Note that this list may be expanded in the future. Signer implementations do not need to support all key types supported by kube-apiserver and kubelet. If a signer does not support the key type used for a given PodCertificateRequest, it must deny the request by setting a status.conditions entry with a type of "Denied" and a reason of "UnsupportedKeyType". It may also suggest a key type that it does support in the message field.

=head2 unverifiedUserAnnotations

unverifiedUserAnnotations allow pod authors to pass additional information to the signer implementation. Kubernetes does not restrict or validate this metadata in any way.

Entries are subject to the same validation as object metadata annotations, with the addition that all keys must be domain-prefixed. No restrictions are placed on values, except an overall size limitation on the entire field.

Signers should document the keys and values they support. Signers should deny requests that contain keys they do not recognize.

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/pplu/io-k8s-p5/issues>.

=head2 IRC

Join C<#kubernetes> on C<irc.perl.org> or message Getty directly.

=head1 CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

=head1 AUTHORS

=over 4

=item *

Torsten Raudssus <torsten@raudssus.de>

=item *

Jose Luis Martinez Torres <jlmartin@cpan.org>

=back

=head1 COPYRIGHT AND LICENSE

This software is Copyright (c) 2018-2026 by Jose Luis Martinez Torres <jlmartin@cpan.org>.

This is free software, licensed under:

  The Apache License, Version 2.0, January 2004

=cut
