Documentation ¶
Index ¶
- func FilterUnchangedManifests(oldManifests *ManifestMap, newManifests *ManifestMap) (*ManifestMap, *ManifestMap)
- func GetUniqueManifestHashes(old *ManifestMap, new *ManifestMap) *[]string
- func PrintDiff(diff *ManifestDiff, formatAsMarkdownCodeBlock bool, output io.Writer)
- type Manifest
- type ManifestDiff
- type ManifestMap
- type YamlObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ManifestDiff ¶ added in v0.2.0
The diff between two manifests.
func CreateDiffForManifestFiles ¶ added in v0.2.0
func CreateDiffForManifestFiles(old *string, new *string) ([]ManifestDiff, error)
Creates the diff for two manifest files, each containing multiple manifests separated by the YAML separator '---'.
func CreateDiffForManifests ¶ added in v0.2.0
func CreateDiffForManifests(old *Manifest, new *Manifest) *ManifestDiff
Creates the diff for two 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.