Documentation
¶
Overview ¶
Package initialize provides functions to initialize some common fields and types.
Index ¶
- func Annotations(object metav1.Object)
- func Bool(v bool) *bool
- func FromPointer[T any](p *T) T
- func Int32(v int32) *int32
- func Int64(v int64) *int64
- func Labels(object metav1.Object)
- func Map[M ~map[K]V, K comparable, V any](m *M)
- func PodSecurityContext() *corev1.PodSecurityContext
- func Pointer[T any](v T) *T
- func Pointers[T any](v ...T) []*T
- func RestrictedSecurityContext() *corev1.SecurityContext
- func String(v string) *string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Annotations ¶
Annotations initializes the Annotations of object when they are nil.
func FromPointer ¶
func FromPointer[T any](p *T) T
FromPointer returns the value that p points to. When p is nil, it returns the zero value of T.
func PodSecurityContext ¶
func PodSecurityContext() *corev1.PodSecurityContext
PodSecurityContext returns a v1.PodSecurityContext with some defaults.
func Pointers ¶
func Pointers[T any](v ...T) []*T
Pointers returns a slice of pointers to the items in v.
func RestrictedSecurityContext ¶
func RestrictedSecurityContext() *corev1.SecurityContext
RestrictedSecurityContext returns a v1.SecurityContext with safe defaults. See https://docs.k8s.io/concepts/security/pod-security-standards/
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.