Documentation ¶
Index ¶
- Constants
- func BuildSMRequestParameters(kubeClient client.Client, namespace string, ...) (map[string]interface{}, []byte, error)
- func BuildUserInfo(ctx context.Context, userInfo *v1.UserInfo) string
- func GetConditionReason(opType smClientTypes.OperationCategory, state smClientTypes.OperationState) string
- func GetLogger(ctx context.Context) logr.Logger
- func GetSMClient(ctx context.Context, secretResolver *SecretResolver, ...) (sm.Client, error)
- func HandleError(ctx context.Context, k8sClient client.Client, ...) (ctrl.Result, error)
- func InitConditions(ctx context.Context, k8sClient client.Client, obj common.SAPBTPResource) error
- func IsFailed(resource common.SAPBTPResource) bool
- func IsInProgress(object common.SAPBTPResource) bool
- func IsMarkedForDeletion(object metav1.ObjectMeta) bool
- func IsTransientError(smError *sm.ServiceManagerError, log logr.Logger) bool
- func MarkAsNonTransientError(ctx context.Context, k8sClient client.Client, ...) (ctrl.Result, error)
- func MarkAsTransientError(ctx context.Context, k8sClient client.Client, ...) (ctrl.Result, error)
- func MarshalRawParameters(in map[string]interface{}) ([]byte, error)
- func RandStringRunes(n int) string
- func RemoveAnnotations(ctx context.Context, k8sClient client.Client, object common.SAPBTPResource, ...) error
- func RemoveFinalizer(ctx context.Context, k8sClient client.Client, object common.SAPBTPResource, ...) error
- func SetBlockedCondition(ctx context.Context, message string, object common.SAPBTPResource)
- func SetCredRotationInProgressConditions(reason, message string, object common.SAPBTPResource)
- func SetFailureConditions(operationType smClientTypes.OperationCategory, errorMessage string, ...)
- func SetInProgressConditions(ctx context.Context, operationType smClientTypes.OperationCategory, ...)
- func SetSuccessConditions(operationType smClientTypes.OperationCategory, object common.SAPBTPResource)
- func SliceContains(slice []string, i string) bool
- func UnmarshalRawParameters(in []byte) (map[string]interface{}, error)
- func UpdateStatus(ctx context.Context, k8sClient client.Client, object common.SAPBTPResource) error
- type LogKey
- type SecretMetadataProperty
- type SecretResolver
Constants ¶
View Source
const ( TEXT format = "text" JSON format = "json" UNKNOWN format = "unknown" )
View Source
const ( SAPBTPOperatorSecretName = "sap-btp-service-operator" SAPBTPOperatorTLSSecretName = "sap-btp-service-operator-tls" )
Variables ¶
This section is empty.
Functions ¶
func BuildSMRequestParameters ¶
func BuildSMRequestParameters(kubeClient client.Client, namespace string, parametersFrom []servicesv1.ParametersFromSource, parameters *runtime.RawExtension) (map[string]interface{}, []byte, error)
buildParameters generates the parameters JSON structure to be passed to the broker. The first return value is a map of parameters to send to the Broker, including secret values. The second return value is parameters marshalled to byt array The third return value is any error that caused the function to fail.
func GetConditionReason ¶
func GetConditionReason(opType smClientTypes.OperationCategory, state smClientTypes.OperationState) string
func GetSMClient ¶
func HandleError ¶
func HandleError(ctx context.Context, k8sClient client.Client, operationType smClientTypes.OperationCategory, err error, resource common.SAPBTPResource, ignoreNonTransient bool) (ctrl.Result, error)
func InitConditions ¶
func IsFailed ¶
func IsFailed(resource common.SAPBTPResource) bool
func IsInProgress ¶
func IsInProgress(object common.SAPBTPResource) bool
func IsMarkedForDeletion ¶
func IsMarkedForDeletion(object metav1.ObjectMeta) bool
func IsTransientError ¶
func IsTransientError(smError *sm.ServiceManagerError, log logr.Logger) bool
func MarkAsNonTransientError ¶
func MarkAsNonTransientError(ctx context.Context, k8sClient client.Client, operationType smClientTypes.OperationCategory, errMsg string, object common.SAPBTPResource) (ctrl.Result, error)
func MarkAsTransientError ¶
func MarkAsTransientError(ctx context.Context, k8sClient client.Client, operationType smClientTypes.OperationCategory, err error, object common.SAPBTPResource) (ctrl.Result, error)
func MarshalRawParameters ¶
MarshalRawParameters marshals the specified map of parameters into JSON
func RandStringRunes ¶
func RemoveAnnotations ¶
func RemoveFinalizer ¶
func SetBlockedCondition ¶
func SetBlockedCondition(ctx context.Context, message string, object common.SAPBTPResource)
blocked condition marks to the user that action from his side is required, this is considered as in progress operation
func SetCredRotationInProgressConditions ¶
func SetCredRotationInProgressConditions(reason, message string, object common.SAPBTPResource)
func SetFailureConditions ¶
func SetFailureConditions(operationType smClientTypes.OperationCategory, errorMessage string, object common.SAPBTPResource)
func SetInProgressConditions ¶
func SetInProgressConditions(ctx context.Context, operationType smClientTypes.OperationCategory, message string, object common.SAPBTPResource)
func SetSuccessConditions ¶
func SetSuccessConditions(operationType smClientTypes.OperationCategory, object common.SAPBTPResource)
func SliceContains ¶
func UnmarshalRawParameters ¶
UnmarshalRawParameters produces a map structure from a given raw YAML/JSON input
func UpdateStatus ¶
Types ¶
type SecretMetadataProperty ¶
type SecretMetadataProperty struct { Name string `json:"name"` Container bool `json:"container,omitempty"` Format string `json:"format"` }
func NormalizeCredentials ¶
func NormalizeCredentials(credentialsJSON json.RawMessage) (map[string][]byte, []SecretMetadataProperty, error)
type SecretResolver ¶
type SecretResolver struct { ManagementNamespace string ReleaseNamespace string EnableNamespaceSecrets bool Client client.Client Log logr.Logger }
func (*SecretResolver) GetSecretForResource ¶
func (*SecretResolver) GetSecretFromManagementNamespace ¶
Click to show internal directories.
Click to hide internal directories.