Documentation
¶
Index ¶
- Constants
- Variables
- func AssessDeploymentStatus(deployment *appsv1.Deployment) (string, bool)
- func ClusterIsBootstrapped(input *go_hook.HookInput) bool
- func GetValue[TValue any](input *go_hook.HookInput, path string) (TValue, error)
- func IngressClientCA(input *go_hook.HookInput) (*x509.Certificate, error)
- func SnapshotToList[TValue any](input *go_hook.HookInput, name string) ([]TValue, error)
- func SnapshotToMap[TKey comparable, TValue any](input *go_hook.HookInput, name string) (map[TKey]TValue, error)
- func SnapshotToSingle[TValue any](input *go_hook.HookInput, name string) (TValue, error)
- func TrimWithEllipsis(value string) string
- type KeyValue
- type ValuesAccessor
Constants ¶
View Source
const ( RegistryServiceName = "registry" RegistryServiceNamespace = "d8-system" )
Variables ¶
View Source
var ( NamespaceSelector = &types.NamespaceSelector{ NameSelector: &types.NameSelector{ MatchNames: []string{"d8-system"}, }, } RegistryServiceDNSName = fmt.Sprintf("%s.%s.svc", RegistryServiceName, RegistryServiceNamespace) )
View Source
var ( ErrNoSnapshot = errors.New("no snapshot found or too many snapshots") ErrSnapshotTypeError = errors.New("snapshot cannot be converted to requested type") )
View Source
var (
ErrNoValue = errors.New("value not found")
)
Functions ¶
func AssessDeploymentStatus ¶
func AssessDeploymentStatus(deployment *appsv1.Deployment) (string, bool)
AssessDeploymentStatus evaluates whether a Deployment has reached its desired state.
func ClusterIsBootstrapped ¶ added in v1.75.0
ClusterIsBootstrapped checks whether the cluster has completed initial bootstrapping.
Returns:
- bool: true if the cluster is bootstrapped, else false
func IngressClientCA ¶ added in v1.75.0
func IngressClientCA(input *go_hook.HookInput) (*x509.Certificate, error)
IngressClientCA retrieves the ingress CA certificate from the hook input values.
Returns:
- *x509.Certificate: the decoded CA certificate, or nil if it doesn't exist or is empty
- error: decoding error if the certificate is malformed
func SnapshotToList ¶
func SnapshotToMap ¶
func SnapshotToSingle ¶
func TrimWithEllipsis ¶
Types ¶
type KeyValue ¶
type KeyValue[TKey comparable, TValue any] struct { Key TKey Value TValue }
func NewKeyValue ¶
func NewKeyValue[TKey comparable, TValue any](key TKey, value TValue) KeyValue[TKey, TValue]
type ValuesAccessor ¶
type ValuesAccessor[TValue any] interface { Set(value TValue) Get() TValue Clear() }
func NewValuesAccessor ¶
func NewValuesAccessor[TValue any](input *go_hook.HookInput, path string) ValuesAccessor[TValue]
Click to show internal directories.
Click to hide internal directories.