Documentation
¶
Index ¶
- Constants
- Variables
- func AddYokeMetadata(resources []*unstructured.Unstructured, release, ns, manager string)
- func Canonical(resource *unstructured.Unstructured) string
- func CanonicalMap(resources []*unstructured.Unstructured) map[string]*unstructured.Unstructured
- func CanonicalNameList(resources []*unstructured.Unstructured) []string
- func CanonicalObjectMap(resources []*unstructured.Unstructured) map[string]any
- func CanonicalWithoutVersion(resource *unstructured.Unstructured) string
- func ChecksumFromPath(value string) string
- func Colorize(value string) string
- func CutArgs(args []string) ([]string, []string)
- func Debug(ctx context.Context) ansi.Terminal
- func DebugTimer(ctx context.Context, msg string) func()
- func DropProperties(resource *unstructured.Unstructured, props [][]string) *unstructured.Unstructured
- func Find[S ~[]E, E any](slice S, fn func(E) bool) (E, bool)
- func FindAll[S ~[]E, E any](slice S, fn func(E) bool) []E
- func GetAnnotation(resource *unstructured.Unstructured, key string) string
- func GetFlightConditions(resource *unstructured.Unstructured) []metav1.Condition
- func GetFlightReadyCondition(resource *unstructured.Unstructured) *metav1.Condition
- func GetLabel(resource *unstructured.Unstructured, label string) string
- func GetOwner(resource *unstructured.Unstructured) string
- func GetYokeVersion() string
- func IsCRD(resource *unstructured.Unstructured) bool
- func IsNamespace(resource *unstructured.Unstructured) bool
- func IsPinnableReference(ref string) bool
- func IsWarning(err error) bool
- func JSONReader(value any) io.Reader
- func MatchResource(resource *unstructured.Unstructured, matcher string) bool
- func MatcherContains(parent, child string) bool
- func Must(err error)
- func Must2[T any](value T, err error) T
- func MustParseInt(value string) int
- func MustParseTime(value string) time.Time
- func MustUnstructuredObject[T any](value any) T
- func Namespace(resource *unstructured.Unstructured) string
- func OwnerFrom(release, ns string) string
- func ParseRef(ref string) (ns, gk, name string)
- func RandomString() string
- func RemoveAdditions[T any](expected, actual T) T
- func RemoveYokeMetadata(resources []*unstructured.Unstructured)
- func ResourceRef(resource *unstructured.Unstructured) string
- func ResourcesAreEqual(a, b *unstructured.Unstructured) bool
- func ResourcesAreEqualWithStatus(a, b *unstructured.Unstructured) bool
- func SHA1(data []byte) []byte
- func SHA1HexFromString(data string) string
- func SHA1HexString(data []byte) string
- func SHA256(data []byte) []byte
- func SHA256HexString(data []byte) string
- func Stderr(ctx context.Context) io.Writer
- func Stdin(ctx context.Context) io.Reader
- func Stdout(ctx context.Context) io.Writer
- func ToUnstructured(value any) (*unstructured.Unstructured, error)
- func UnstructuredObject[T any](value any) (T, error)
- func WithDebugFlag(ctx context.Context, debug *bool) context.Context
- func WithStderr(ctx context.Context, w io.Writer) context.Context
- func WithStdin(ctx context.Context, r io.Reader) context.Context
- func WithStdio(ctx context.Context, out, err io.Writer, in io.Reader) context.Context
- func WithStdout(ctx context.Context, w io.Writer) context.Context
- func WriteYAML(filename string, value any) (err error)
- type Globs
- type List
- type Release
- type Revision
- type Source
- type Stage
- type Stages
- type Warning
Constants ¶
View Source
const ( LabelManagedBy = "app.kubernetes.io/managed-by" DeprecatedLabelYokeRelease = "app.kubernetes.io/yoke-release" DeprecatedLabelYokeReleaseNS = "app.kubernetes.io/yoke-release-namespace" AnnotationYokeRelease = "instance.atc.yoke.cd/release" AnnotationYokeNamespace = "instance.atc.yoke.cd/namespace" )
View Source
const ( LabelKind = "internal.yoke/kind" LabelRelease = "internal.yoke/release" AnnotationSourceURL = "internal.yoke/source-url" AnnotationSourceChecksum = "internal.yoke/source-checksum" AnnotationCreatedAt = "internal.yoke/created-at" AnnotationActiveAt = "internal.yoke/active-at" AnnotationResourceCount = "internal.yoke/resources" AnnotationReleaseName = "internal.yoke/release-name" KeyResources = "resources" KeyLockedBy = "lockedBy" )
Variables ¶
View Source
var Info, _ = debug.ReadBuildInfo()
Functions ¶
func AddYokeMetadata ¶
func AddYokeMetadata(resources []*unstructured.Unstructured, release, ns, manager string)
func Canonical ¶
func Canonical(resource *unstructured.Unstructured) string
func CanonicalMap ¶
func CanonicalMap(resources []*unstructured.Unstructured) map[string]*unstructured.Unstructured
func CanonicalNameList ¶
func CanonicalNameList(resources []*unstructured.Unstructured) []string
func CanonicalObjectMap ¶
func CanonicalObjectMap(resources []*unstructured.Unstructured) map[string]any
func CanonicalWithoutVersion ¶ added in v0.7.3
func CanonicalWithoutVersion(resource *unstructured.Unstructured) string
func ChecksumFromPath ¶ added in v0.20.5
func DebugTimer ¶
func DropProperties ¶ added in v0.11.3
func DropProperties(resource *unstructured.Unstructured, props [][]string) *unstructured.Unstructured
func GetAnnotation ¶ added in v0.14.2
func GetAnnotation(resource *unstructured.Unstructured, key string) string
func GetFlightConditions ¶ added in v0.13.0
func GetFlightConditions(resource *unstructured.Unstructured) []metav1.Condition
func GetFlightReadyCondition ¶ added in v0.13.0
func GetFlightReadyCondition(resource *unstructured.Unstructured) *metav1.Condition
func GetLabel ¶ added in v0.17.0
func GetLabel(resource *unstructured.Unstructured, label string) string
func GetOwner ¶ added in v0.11.3
func GetOwner(resource *unstructured.Unstructured) string
func GetYokeVersion ¶ added in v0.17.3
func GetYokeVersion() string
func IsCRD ¶ added in v0.14.0
func IsCRD(resource *unstructured.Unstructured) bool
func IsNamespace ¶ added in v0.14.0
func IsNamespace(resource *unstructured.Unstructured) bool
func IsPinnableReference ¶ added in v0.20.4
func JSONReader ¶ added in v0.18.4
func MatchResource ¶ added in v0.12.8
func MatchResource(resource *unstructured.Unstructured, matcher string) bool
func MatcherContains ¶ added in v0.16.8
func MustParseInt ¶
func MustParseTime ¶
func MustUnstructuredObject ¶ added in v0.4.1
func Namespace ¶
func Namespace(resource *unstructured.Unstructured) string
func RandomString ¶
func RandomString() string
func RemoveAdditions ¶ added in v0.11.3
func RemoveAdditions[T any](expected, actual T) T
RemoveAdditions removes fields from actual that are not in expected. it removes the additional properties in place and returns "actual" back. Values passed to removeAdditions are expected to be generic json compliant structures: map[string]any, []any, or scalars.
func RemoveYokeMetadata ¶ added in v0.14.0
func RemoveYokeMetadata(resources []*unstructured.Unstructured)
func ResourceRef ¶ added in v0.17.0
func ResourceRef(resource *unstructured.Unstructured) string
func ResourcesAreEqual ¶ added in v0.11.3
func ResourcesAreEqual(a, b *unstructured.Unstructured) bool
func ResourcesAreEqualWithStatus ¶ added in v0.13.0
func ResourcesAreEqualWithStatus(a, b *unstructured.Unstructured) bool
func SHA1HexFromString ¶ added in v0.18.0
func SHA1HexString ¶ added in v0.14.3
func SHA256HexString ¶ added in v0.20.5
func ToUnstructured ¶ added in v0.4.1
func ToUnstructured(value any) (*unstructured.Unstructured, error)
func UnstructuredObject ¶ added in v0.4.1
Types ¶
type Globs ¶ added in v0.20.2
type Globs []string
func (*Globs) OpenAPISchema ¶ added in v0.20.2
func (globs *Globs) OpenAPISchema() *apiextensionsv1.JSONSchemaProps
type Release ¶ added in v0.6.0
type Release struct {
Name string `json:"release"`
Namespace string `json:"namespace"`
History []Revision `json:"history"`
}
func (Release) ActiveIndex ¶ added in v0.6.0
func (Release) ActiveRevision ¶ added in v0.6.0
type Source ¶
func SourceFrom ¶
type Stage ¶ added in v0.8.0
type Stage []*unstructured.Unstructured
type Stages ¶ added in v0.8.0
type Stages []Stage
func ParseStages ¶ added in v0.12.5
func (Stages) Flatten ¶ added in v0.8.0
func (stages Stages) Flatten() []*unstructured.Unstructured
Source Files
¶
Click to show internal directories.
Click to hide internal directories.