Documentation ¶
Index ¶
- Variables
- func CachedMakeComponent(cache *rc.ObjectCache, objList []rc.ResourceIdent, o obj.ClowdObject, ...) error
- func ExtractSecretData(secrets []core.Secret, fn ExtractFn, keys ...string)
- func ExtractSecretDataAnno(secrets []core.Secret, fn ExtractFnAnno, annoKey string, keys ...string)
- func GetNamespacedName(o obj.ClowdObject, suffix string) types.NamespacedName
- func MakeOrGetSecret(ctx context.Context, obj obj.ClowdObject, cache *rc.ObjectCache, ...) (*map[string]string, error)
- func StrPtr(s string) *string
- type ClowderProvider
- type ExtractFn
- type ExtractFnAnno
- type Labels
- type ObjectMap
- type Provider
Constants ¶
This section is empty.
Variables ¶
var ProvidersRegistration providersRegistration
ProvidersRegistration is an instance of the provider registration system. It is responsible for adding new providers to the registry so that they can be executed in the correct order.
Functions ¶
func CachedMakeComponent ¶
func CachedMakeComponent(cache *rc.ObjectCache, objList []rc.ResourceIdent, o obj.ClowdObject, suffix string, fn makeFnCache, usePVC bool, nodePort bool) error
CachedMakeComponent is a generalised function that, given a ClowdObject will make the given service, deployment and PVC, based on the makeFn that is passed in.
func ExtractSecretData ¶
ExtractSecretData takes a list of secrets, checks that the correct 'keys' are present and then runs the extract function on them.
func ExtractSecretDataAnno ¶
func ExtractSecretDataAnno(secrets []core.Secret, fn ExtractFnAnno, annoKey string, keys ...string)
ExtractSecretDataAnno is just like ExtractSecretData except it expects an annotation to be present on the secret that will provide one of the values needed to extract the data out of the secret
func GetNamespacedName ¶
func GetNamespacedName(o obj.ClowdObject, suffix string) types.NamespacedName
GetNamespacedName returns a unique name of an object in the format name-suffix.
func MakeOrGetSecret ¶
func MakeOrGetSecret(ctx context.Context, obj obj.ClowdObject, cache *rc.ObjectCache, resourceIdent rc.ResourceIdent, nn types.NamespacedName, dataInit func() map[string]string) (*map[string]string, error)
MakeOrGetSecret tries to get the secret described by nn, if it exists it populates a map with the key/value pairs from the secret. If it doesn't exist the dataInit function is run and the resulting data is returned, as well as the secret being created.
Types ¶
type ClowderProvider ¶
type ClowderProvider interface { // Provide is the main function that performs the duty of the provider on a ClowdApp object, as // opposed to a ClowdEnvironment object. Provide(app *crd.ClowdApp, c *config.AppConfig) error }
ClowderProvider is an interface providing a way for a provider to perform its duty.
type ExtractFn ¶
ExtractFn is a function that can extract secret data from a function, the result of this function is usually declared as part of the function so no arguments are passed.
type ExtractFnAnno ¶
ExtractFnAnno is just like ExtractFn except it reads in the value of an annotation
type Labels ¶
Labels is a map containing a key/value style map intended to hold k8s label information.