metadata

package
v0.0.0-...-f7a8afa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInt32Pointer

func GetInt32Pointer(v int32) *int32

func GetInt64ptr

func GetInt64ptr(n int64) *int64

func GetStringPointer

func GetStringPointer(s string) *string

func MergeMetadata

func MergeMetadata(new *metav1.ObjectMeta, old metav1.ObjectMeta)

mergeMetadata takes labels and annotations from the old resource and merges them into the new resource. If a key is present in both resources, the new resource wins. It also copies the ResourceVersion from the old resource to the new resource to prevent update conflicts.

func MergeSlices

func MergeSlices(new []string, old []string) []string

Types

type Annotations

type Annotations map[string]string

func NewAnnotations

func NewAnnotations(annotations ...Annotations) Annotations

func (Annotations) Add

func (a Annotations) Add(key, value string)

func (Annotations) AddAnnotation

func (a Annotations) AddAnnotation(annotation Annotations)

type Labels

type Labels map[string]string

func NewLabels

func NewLabels(labels ...Labels) Labels

func (Labels) Add

func (l Labels) Add(key, value string)

func (Labels) AddLabel

func (l Labels) AddLabel(label Labels)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL