Documentation ¶
Index ¶
- Constants
- Variables
- func GetDigest(manifest Manifest, domain Domain) (digest [32]byte, yml []byte, err error)
- func GetMetadataInformation(manifest Manifest, domain Domain) (signature string, excludes []string, err error)
- func ValidateSignature(manifest Manifest, domain Domain) (valid bool, digest [32]byte, yml []byte, err error)
- type Domain
- type GojqParams
- type Manifest
Constants ¶
View Source
const ( PublicKey = "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnP0Yo+ZxzPUEfohcG3bbJ8987UT4f0tj+XVBjS/s35wkfjrxTKrVZQpz3ta3zi5ZlgXzd7a20B1U1Py/TtPsxw==" DomainName = "eksa.aws.com" SignatureAnnotation = "signature" ExcludesAnnotation = "excludes" )
Variables ¶
View Source
var ( AlwaysExcluded = []string{ ".status", ".metadata.creationTimestamp", ".metadata.generation", ".metadata.managedFields", ".metadata.uid", ".metadata.resourceVersion", ".spec.minControllerVersion", } GojqTemplate = template.Must(template.New("gojq_query").Funcs( template.FuncMap{ "StringsJoin": strings.Join, "Escape": func(in string) string { return strings.ReplaceAll(in, ".", "\\\\.") }, }).Parse(` del({{ StringsJoin .Excludes ", "}}) | (.metadata.annotations | objects) |= with_entries(select(.key | test("^{{ Escape .Domain.Name }}/(?:includes|excludes)$") )) `)) )
View Source
var EksaDomain = Domain{Name: DomainName, Pubkey: PublicKey}
Functions ¶
func GetMetadataInformation ¶
Types ¶
type GojqParams ¶
type Manifest ¶
type Manifest = metav1.ObjectMetaAccessor
Click to show internal directories.
Click to hide internal directories.