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 ( DomainName = "eksa.aws.com" SignatureAnnotation = "signature" ExcludesAnnotation = "excludes" )
Variables ¶
View Source
var ( PublicKey string EksaDomain Domain )
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)$") )) `)) )
Functions ¶
func GetMetadataInformation ¶
Types ¶
type GojqParams ¶
type Manifest ¶
type Manifest = metav1.ObjectMetaAccessor
Click to show internal directories.
Click to hide internal directories.