Documentation ¶
Index ¶
- Constants
- Variables
- func DerefOr[k any](input *k, def k) k
- func EncodeSecretReference(secret, key string) string
- func FindAnnotation(metadata map[string]interface{}, annotation string) (string, bool)
- func FindFirstUnresolvedSecretRef(path string, v interface{}) (string, bool)
- func ListAnnotations(metadata map[string]interface{}) []string
- func PatchMap(current map[string]interface{}, patch map[string]interface{}) map[string]interface{}
- func Ref[k any](input k) *k
- type SecretRef
Constants ¶
View Source
const ( AnnotationPrefix = "k8s.score.dev/" WorkloadKindAnnotation = AnnotationPrefix + "kind" WorkloadServiceNameAnnotation = AnnotationPrefix + "service-name" )
Variables ¶
View Source
var K8sCodecFactory = serializer.CodecFactory{}
View Source
var YamlSerializerInfo = runtime.SerializerInfo{}
Functions ¶
func EncodeSecretReference ¶
func FindAnnotation ¶
func ListAnnotations ¶
func PatchMap ¶
PatchMap performs a JSON Merge Patch as defined in https://datatracker.ietf.org/doc/html/rfc7386.
This should return a new map without modifying the current or patch inputs. Notes:
- if new is nil, the output is an empty object - this allows for in-place
- if a key is not a map, it will be treated as scalar according to the JSON Merge Patch strategy. This includes structs and slices.
Types ¶
type SecretRef ¶
func DecodeSecretReferences ¶
DecodeSecretReferences resolves a string in a kubernetes manifest that may contain secret references into a useful string or reference to the real secret itself. These can be embedded in: - environment variables - file mounts where the file contains only the secret
Click to show internal directories.
Click to hide internal directories.