Add inline-certificate as possible payload of config-entry wrapper (#16254)
Co-authored-by: Andrew Stucki <3577250+andrewstucki@users.noreply.github.com>
This commit is contained in:
parent
4b5c8d7edc
commit
859182c1c3
|
@ -81,6 +81,14 @@ func ConfigEntryToStructs(s *ConfigEntry) structs.ConfigEntry {
|
|||
pbcommon.RaftIndexToStructs(s.RaftIndex, &target.RaftIndex)
|
||||
pbcommon.EnterpriseMetaToStructs(s.EnterpriseMeta, &target.EnterpriseMeta)
|
||||
return &target
|
||||
case Kind_KindInlineCertificate:
|
||||
var target structs.InlineCertificateConfigEntry
|
||||
target.Name = s.Name
|
||||
|
||||
InlineCertificateToStructs(s.GetInlineCertificate(), &target)
|
||||
pbcommon.RaftIndexToStructs(s.RaftIndex, &target.RaftIndex)
|
||||
pbcommon.EnterpriseMetaToStructs(s.EnterpriseMeta, &target.EnterpriseMeta)
|
||||
return &target
|
||||
case Kind_KindServiceDefaults:
|
||||
var target structs.ServiceConfigEntry
|
||||
target.Name = s.Name
|
||||
|
@ -177,6 +185,14 @@ func ConfigEntryFromStructs(s structs.ConfigEntry) *ConfigEntry {
|
|||
configEntry.Entry = &ConfigEntry_HTTPRoute{
|
||||
HTTPRoute: &route,
|
||||
}
|
||||
case *structs.InlineCertificateConfigEntry:
|
||||
var cert InlineCertificate
|
||||
InlineCertificateFromStructs(v, &cert)
|
||||
|
||||
configEntry.Kind = Kind_KindInlineCertificate
|
||||
configEntry.Entry = &ConfigEntry_InlineCertificate{
|
||||
InlineCertificate: &cert,
|
||||
}
|
||||
default:
|
||||
panic(fmt.Sprintf("unable to convert %T to proto", s))
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -37,6 +37,7 @@ message ConfigEntry {
|
|||
BoundAPIGateway BoundAPIGateway = 11;
|
||||
TCPRoute TCPRoute = 12;
|
||||
HTTPRoute HTTPRoute = 13;
|
||||
InlineCertificate InlineCertificate = 14;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue