Documentation ¶
Index ¶
- Constants
- func CreateStepName(moduleName string, assetID string) string
- func CreateUnstructured(group, version, kind, name, namespace string) *unstructured.Unstructured
- func DefaultTestConfiguration(t ginkgo.GinkgoTInterface)
- func GetApplicationNamespace() string
- func GetAuthPath(authPath string) string
- func GetControllerNamespace() string
- func GetDataCatalogServiceAddress() string
- func GetDataPathMaxSize() (int, error)
- func GetDefaultModulesNamespace() string
- func GetFybrikApplicationUUID(fapp *api.FybrikApplication) string
- func GetFybrikApplicationUUIDfromAnnotations(annotations map[string]string) string
- func GetModulesRole() string
- func GetReleaseName(applicationName string, namespace string, instanceName string) string
- func GetReleaseNameByStepName(applicationName string, namespace string, moduleInstanceName string) string
- func GetSystemNamespace() string
- func GetVaultAddress() string
- func HasString(value string, values []string) bool
- func Hash(value string, hashLength int) string
- func HelmConformName(name string) string
- func Intersection(set1 []string, set2 []string) []string
- func IsDenied(actionName taxonomy.ActionName) bool
- func IsVaultEnabled() bool
- func K8sConformName(name string) string
- func ListeningAddress(port int) string
- func LogEnvVariables(log zerolog.Logger)
- func NewScheme(g *gomega.WithT) *runtime.Scheme
- func SetIfNotSet(key string, value string, t ginkgo.GinkgoTInterface)
- func ShortenedName(name string, maxLength int, hashLength int) string
- func StructToMap(data interface{}) (map[string]interface{}, error)
- func UpdateFinalizers(ctx context.Context, cl client.Client, obj client.Object) error
- func UpdateStatus(ctx context.Context, cl client.Client, obj client.Object, ...) error
- type UnstructuredAsLabels
Constants ¶
const ( CatalogConnectorServiceAddressKey string = "CATALOG_CONNECTOR_URL" VaultEnabledKey string = "VAULT_ENABLED" VaultAddressKey string = "VAULT_ADDRESS" VaultModulesRoleKey string = "VAULT_MODULES_ROLE" EnableWebhooksKey string = "ENABLE_WEBHOOKS" ConnectionTimeoutKey string = "CONNECTION_TIMEOUT" MainPolicyManagerNameKey string = "MAIN_POLICY_MANAGER_NAME" MainPolicyManagerConnectorURLKey string = "MAIN_POLICY_MANAGER_CONNECTOR_URL" LoggingVerbosityKey string = "LOGGING_VERBOSITY" PrettyLoggingKey string = "PRETTY_LOGGING" CatalogProviderNameKey string = "CATALOG_PROVIDER_NAME" DatapathLimitKey string = "DATAPATH_LIMIT" )
Attributes that are defined in a config map or the runtime environment
const DefaultControllerNamespace = "fybrik-system"
DefaultControllerNamespace defines a default namespace where fybrik control plane is running
const DefaultModulesNamespace = "fybrik-blueprints"
DefaultModulesNamespace defines a default namespace where module resources will be allocated
const FybrikAppUUID = "app.fybrik.io/app-uuid"
Variables ¶
This section is empty.
Functions ¶
func CreateStepName ¶
Create a name for a step in a blueprint. Since this is part of the name of a release, this should be done in a central location to make testing easier
func CreateUnstructured ¶
func CreateUnstructured(group, version, kind, name, namespace string) *unstructured.Unstructured
CreateUnstructured creates a new Unstructured runtime object
func DefaultTestConfiguration ¶
func DefaultTestConfiguration(t ginkgo.GinkgoTInterface)
func GetApplicationNamespace ¶ added in v0.5.0
func GetApplicationNamespace() string
func GetAuthPath ¶
GetAuthPath returns the auth method path to use It is of the form v1/auth/<auth path>/login TODO - Different credentials for different data flows (read, write, delete)
func GetControllerNamespace ¶ added in v0.5.0
func GetControllerNamespace() string
func GetDataCatalogServiceAddress ¶
func GetDataCatalogServiceAddress() string
GetDataCatalogServiceAddress returns the address where data catalog is running
func GetDataPathMaxSize ¶ added in v0.6.0
GetDataPathMaxSize bounds the data path size (number of modules that access data for read/write/copy, not including transformations)
func GetDefaultModulesNamespace ¶ added in v0.6.0
func GetDefaultModulesNamespace() string
func GetFybrikApplicationUUID ¶ added in v0.6.0
func GetFybrikApplicationUUID(fapp *api.FybrikApplication) string
GetFybrikApplicationUUID returns a globally unique ID for the FybrikApplication instance. It must be unique over time and across clusters, even after the instance has been deleted, because this ID will be used for logging purposes.
func GetFybrikApplicationUUIDfromAnnotations ¶ added in v0.6.0
GetFybrikApplicationUUIDfromAnnotations returns the UUID passed to the resource in its annotations
func GetModulesRole ¶
func GetModulesRole() string
GetModulesRole returns the modules assigned authentication role for accessing dataset credentials
func GetReleaseName ¶
Generating release name based on blueprint module
func GetReleaseNameByStepName ¶
func GetReleaseNameByStepName(applicationName string, namespace string, moduleInstanceName string) string
Generate release name from blueprint module name
func GetSystemNamespace ¶
func GetSystemNamespace() string
GetSystemNamespace returns the namespace of control plane
func GetVaultAddress ¶
func GetVaultAddress() string
GetVaultAddress returns the address and port of the vault system, which is used for managing data set credentials
func HelmConformName ¶
Helm has stricter restrictions than K8s and restricts release names to 53 characters
func Intersection ¶ added in v0.6.0
Intersection finds a common subset of two given sets of strings
func IsDenied ¶
func IsDenied(actionName taxonomy.ActionName) bool
IsDenied returns true if the data access is denied
func IsVaultEnabled ¶ added in v0.6.3
func IsVaultEnabled() bool
func K8sConformName ¶
Some k8s objects only allow for a length of 63 characters. This method shortens the name keeping a prefix and using the last 5 characters of the new name for the hash of the postfix.
func ListeningAddress ¶
func LogEnvVariables ¶ added in v0.6.0
func NewScheme ¶
Creates a scheme that can be used in unit tests The scheme will have the core and batch apis from K8s registered as well as the app api from Fybrik. This function can be tested with a gomega environment if passed or otherwise (if nil is passed) it will ignore tests.
func SetIfNotSet ¶
func SetIfNotSet(key string, value string, t ginkgo.GinkgoTInterface)
func ShortenedName ¶
This function shortens a name to the maximum length given and uses rest of the string that is too long as hash that gets added to the valid name.
func StructToMap ¶
StructToMap converts a struct to a map using JSON marshal
func UpdateFinalizers ¶ added in v0.6.5
UpdateFinalizers adds or removes finalizers for a resource
Types ¶
type UnstructuredAsLabels ¶
type UnstructuredAsLabels struct {
Data *unstructured.Unstructured
}
UnstructuredAsLabels is an implementation of labels.Labels interface which allows us to take advantage of k8s labels library for the purposes of evaluating fail and success conditions
func (UnstructuredAsLabels) Get ¶
func (c UnstructuredAsLabels) Get(label string) string
Get returns the value for the provided label.
func (UnstructuredAsLabels) Has ¶
func (c UnstructuredAsLabels) Has(label string) bool
Has returns whether the provided label exists.