adds support for CDP to selfsigned issuer
Signed-off-by: srBraun <dev@skra.space>
This commit is contained in:
parent
672f7654a7
commit
04bfddefc3
@ -1531,6 +1531,11 @@ spec:
|
||||
type: string
|
||||
selfSigned:
|
||||
type: object
|
||||
properties:
|
||||
crlDistributionPoints:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
vault:
|
||||
type: object
|
||||
required:
|
||||
|
||||
@ -1531,6 +1531,11 @@ spec:
|
||||
type: string
|
||||
selfSigned:
|
||||
type: object
|
||||
properties:
|
||||
crlDistributionPoints:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
vault:
|
||||
type: object
|
||||
required:
|
||||
|
||||
@ -3681,6 +3681,11 @@ spec:
|
||||
type: string
|
||||
selfSigned:
|
||||
type: object
|
||||
properties:
|
||||
crlDistributionPoints:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
vault:
|
||||
type: object
|
||||
required:
|
||||
@ -5435,6 +5440,11 @@ spec:
|
||||
type: string
|
||||
selfSigned:
|
||||
type: object
|
||||
properties:
|
||||
crlDistributionPoints:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
vault:
|
||||
type: object
|
||||
required:
|
||||
|
||||
@ -147,7 +147,9 @@ type VenafiCloud struct {
|
||||
APITokenSecretRef cmmeta.SecretKeySelector `json:"apiTokenSecretRef"`
|
||||
}
|
||||
|
||||
type SelfSignedIssuer struct{}
|
||||
type SelfSignedIssuer struct {
|
||||
CRLDistributionPoints []string `json:"crlDistributionPoints,omitempty"`
|
||||
}
|
||||
|
||||
type VaultIssuer struct {
|
||||
// Vault authentication
|
||||
|
||||
@ -492,7 +492,7 @@ func (in *IssuerConfig) DeepCopyInto(out *IssuerConfig) {
|
||||
if in.SelfSigned != nil {
|
||||
in, out := &in.SelfSigned, &out.SelfSigned
|
||||
*out = new(SelfSignedIssuer)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Venafi != nil {
|
||||
in, out := &in.Venafi, &out.Venafi
|
||||
@ -593,6 +593,11 @@ func (in *IssuerStatus) DeepCopy() *IssuerStatus {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SelfSignedIssuer) DeepCopyInto(out *SelfSignedIssuer) {
|
||||
*out = *in
|
||||
if in.CRLDistributionPoints != nil {
|
||||
in, out := &in.CRLDistributionPoints, &out.CRLDistributionPoints
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@ -147,7 +147,9 @@ type VenafiCloud struct {
|
||||
APITokenSecretRef cmmeta.SecretKeySelector `json:"apiTokenSecretRef"`
|
||||
}
|
||||
|
||||
type SelfSignedIssuer struct{}
|
||||
type SelfSignedIssuer struct {
|
||||
CRLDistributionPoints []string `json:"crlDistributionPoints,omitempty"`
|
||||
}
|
||||
|
||||
type VaultIssuer struct {
|
||||
// Vault authentication
|
||||
|
||||
@ -487,7 +487,7 @@ func (in *IssuerConfig) DeepCopyInto(out *IssuerConfig) {
|
||||
if in.SelfSigned != nil {
|
||||
in, out := &in.SelfSigned, &out.SelfSigned
|
||||
*out = new(SelfSignedIssuer)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Venafi != nil {
|
||||
in, out := &in.Venafi, &out.Venafi
|
||||
@ -588,6 +588,11 @@ func (in *IssuerStatus) DeepCopy() *IssuerStatus {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SelfSignedIssuer) DeepCopyInto(out *SelfSignedIssuer) {
|
||||
*out = *in
|
||||
if in.CRLDistributionPoints != nil {
|
||||
in, out := &in.CRLDistributionPoints, &out.CRLDistributionPoints
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@ -125,6 +125,8 @@ func (s *SelfSigned) Sign(ctx context.Context, cr *cmapi.CertificateRequest, iss
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
template.CRLDistributionPoints = issuerObj.GetSpec().SelfSigned.CRLDistributionPoints
|
||||
|
||||
// extract the public component of the key
|
||||
publickey, err := pki.PublicKeyForPrivateKey(privatekey)
|
||||
if err != nil {
|
||||
|
||||
@ -126,7 +126,9 @@ type VenafiCloud struct {
|
||||
APITokenSecretRef cmmeta.SecretKeySelector
|
||||
}
|
||||
|
||||
type SelfSignedIssuer struct{}
|
||||
type SelfSignedIssuer struct {
|
||||
CRLDistributionPoints []string `json:"crlDistributionPoints,omitempty"`
|
||||
}
|
||||
|
||||
type VaultIssuer struct {
|
||||
// Vault authentication
|
||||
|
||||
@ -882,6 +882,7 @@ func Convert_certmanager_IssuerStatus_To_v1alpha2_IssuerStatus(in *certmanager.I
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha2_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(in *v1alpha2.SelfSignedIssuer, out *certmanager.SelfSignedIssuer, s conversion.Scope) error {
|
||||
out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -891,6 +892,7 @@ func Convert_v1alpha2_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(in *v1alp
|
||||
}
|
||||
|
||||
func autoConvert_certmanager_SelfSignedIssuer_To_v1alpha2_SelfSignedIssuer(in *certmanager.SelfSignedIssuer, out *v1alpha2.SelfSignedIssuer, s conversion.Scope) error {
|
||||
out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@ -855,6 +855,7 @@ func Convert_certmanager_IssuerStatus_To_v1alpha3_IssuerStatus(in *certmanager.I
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha3_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(in *v1alpha3.SelfSignedIssuer, out *certmanager.SelfSignedIssuer, s conversion.Scope) error {
|
||||
out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -864,6 +865,7 @@ func Convert_v1alpha3_SelfSignedIssuer_To_certmanager_SelfSignedIssuer(in *v1alp
|
||||
}
|
||||
|
||||
func autoConvert_certmanager_SelfSignedIssuer_To_v1alpha3_SelfSignedIssuer(in *certmanager.SelfSignedIssuer, out *v1alpha3.SelfSignedIssuer, s conversion.Scope) error {
|
||||
out.CRLDistributionPoints = *(*[]string)(unsafe.Pointer(&in.CRLDistributionPoints))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@ -487,7 +487,7 @@ func (in *IssuerConfig) DeepCopyInto(out *IssuerConfig) {
|
||||
if in.SelfSigned != nil {
|
||||
in, out := &in.SelfSigned, &out.SelfSigned
|
||||
*out = new(SelfSignedIssuer)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Venafi != nil {
|
||||
in, out := &in.Venafi, &out.Venafi
|
||||
@ -588,6 +588,11 @@ func (in *IssuerStatus) DeepCopy() *IssuerStatus {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SelfSignedIssuer) DeepCopyInto(out *SelfSignedIssuer) {
|
||||
*out = *in
|
||||
if in.CRLDistributionPoints != nil {
|
||||
in, out := &in.CRLDistributionPoints, &out.CRLDistributionPoints
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user