Documentation
¶
Overview ¶
Package initdata handles generation of initdata for Confidential Containers.
Index ¶
- Constants
- Variables
- func Decode(encoded string) (map[string]string, error)
- func Generate(cfg *config.CocoConfig, imagePullSecrets []ImagePullSecretInfo) (string, error)
- func GenerateRaw(cfg *config.CocoConfig, certPEM string, imagePullSecrets []ImagePullSecretInfo) ([]byte, error)
- func IsValidAlgorithm(alg string) bool
- type ImagePullSecretInfo
- type InitData
Constants ¶
View Source
const ( InitDataVersion = "0.1.0" InitDataAlgorithm = "sha256" )
InitData constants define the version and algorithm for initdata generation
Variables ¶
View Source
var ValidAlgorithms = []string{"sha256", "sha384", "sha512"}
ValidAlgorithms lists all hash algorithms accepted during initdata validation.
Functions ¶
func Decode ¶ added in v0.14.0
Decode decodes a base64+gzip encoded initdata string and returns the data map.
func Generate ¶
func Generate(cfg *config.CocoConfig, imagePullSecrets []ImagePullSecretInfo) (string, error)
Generate creates initdata based on the CoCo configuration.
func GenerateRaw ¶ added in v0.14.0
func GenerateRaw(cfg *config.CocoConfig, certPEM string, imagePullSecrets []ImagePullSecretInfo) ([]byte, error)
GenerateRaw returns the raw initdata TOML bytes without gzip/base64 encoding. When certPEM is non-empty it is used directly instead of reading cfg.TrusteeCACert.
func IsValidAlgorithm ¶ added in v0.14.0
IsValidAlgorithm reports whether alg is an accepted initdata algorithm.
Types ¶
type ImagePullSecretInfo ¶ added in v0.5.0
ImagePullSecretInfo holds information about imagePullSecrets for initdata generation
Click to show internal directories.
Click to hide internal directories.