Documentation
¶
Index ¶
- func CreateAndPrintDiffForManifests(old Manifest, new Manifest, formatAsMarkdownCodeBlock bool, output io.Writer)
- func FilterUnchangedManifests(oldManifests ManifestMap, newManifests ManifestMap) (ManifestMap, ManifestMap)
- func GetUniqueManifestHashes(old ManifestMap, new ManifestMap) []string
- type Manifest
- type ManifestMap
- type YamlObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAndPrintDiffForManifests ¶
func CreateAndPrintDiffForManifests(old Manifest, new Manifest, formatAsMarkdownCodeBlock bool, output io.Writer)
Creates and prints the diff for two manifests.
func FilterUnchangedManifests ¶
func FilterUnchangedManifests(oldManifests ManifestMap, newManifests ManifestMap) (ManifestMap, ManifestMap)
Filters all common manifests with identical content from the given manifest maps. Returns two new maps which contain only the changed (new, altered or removed) manifests.
func GetUniqueManifestHashes ¶
func GetUniqueManifestHashes(old ManifestMap, new ManifestMap) []string
Returns a list of MD5 hashes for all manifests in the given input maps. If a manifest with identical MD5 hash is present in both maps, the hash is returned only once.
Types ¶
type Manifest ¶
A manifest describes a Kubernetes object with the most important parameters and its content.
func (Manifest) CalculateHash ¶
Calculates the MD5 hash for a manifest header (apiVersion, kind, name and namespace). Can be used to compare manifests.
type ManifestMap ¶
This type contains the manifest hash as key and the manifest itself as value.
func SplitKustomizationIntoManifests ¶
func SplitKustomizationIntoManifests(kustomization string) (ManifestMap, error)
Splits the given Kustomization into individual manifests per object.
type YamlObject ¶
type YamlObject map[string]interface{}
This type is a convenience layer on top of a generic map and represents a YAML object.