Documentation ¶
Index ¶
- Constants
- func CreateVCAPEntryFromSecret(serviceInfo *v1alpha1.ServiceInfo, ns string, kubeClient kubernetes.Interface) (entry map[string]any, err error)
- func GetConfig() *rest.Config
- func GetLogger() logr.Logger
- func GetNamespace() string
- func GetXSUAAInfo(consumedServiceInfos []v1alpha1.ServiceInfo, ca *v1alpha1.CAPApplication) *v1alpha1.ServiceInfo
- func InitMetricsServer()
- func InstrumentHttpHandler(handler func(http.ResponseWriter, *http.Request), metricNamePrefix string, ...) http.HandlerFunc
- func LogError(error error, msg string, step string, entity interface{}, child interface{}, ...)
- func LogInfo(msg string, step string, entity interface{}, child interface{}, ...)
- func LogWarning(args ...interface{})
- func ParseJSON[T any](b []byte) (*T, error)
- func ReadServiceCredentialsFromSecret[T any](serviceInfo *v1alpha1.ServiceInfo, ns string, kubeClient kubernetes.Interface) (*T, error)
- type CredentialData
- type MetadataPropertyDescriptor
- type PropertyFormat
- type SaasRegistryCredentials
- type SecretMetadata
- type VCAPServiceInstance
- type XSUAACredentials
Constants ¶
View Source
const ( Step = "step" Name = "name" Namespace = "namespace" Kind = "kind" DependentName = "dependentName" DependentKind = "dependentKind" )
View Source
const (
AnnotationPrimaryXSUAA = "sme.sap.com/primary-xsuaa"
)
View Source
const LabelBTPApplicationIdentifierHash = "sme.sap.com/btp-app-identifier-hash"
Variables ¶
This section is empty.
Functions ¶
func CreateVCAPEntryFromSecret ¶
func CreateVCAPEntryFromSecret(serviceInfo *v1alpha1.ServiceInfo, ns string, kubeClient kubernetes.Interface) (entry map[string]any, err error)
func GetNamespace ¶
func GetNamespace() string
func GetXSUAAInfo ¶
func GetXSUAAInfo(consumedServiceInfos []v1alpha1.ServiceInfo, ca *v1alpha1.CAPApplication) *v1alpha1.ServiceInfo
func InitMetricsServer ¶ added in v0.11.0
func InitMetricsServer()
Initializes the metrics server with default port 9090 and path /metrics based on default prometheus client
func InstrumentHttpHandler ¶ added in v0.11.0
func InstrumentHttpHandler(handler func(http.ResponseWriter, *http.Request), metricNamePrefix string, helpTextSuffix string) http.HandlerFunc
Instruments the given HTTP handler with counter (total requests) and gauge (in flight requests) metrics
func LogWarning ¶ added in v0.10.0
func LogWarning(args ...interface{})
func ReadServiceCredentialsFromSecret ¶
func ReadServiceCredentialsFromSecret[T any](serviceInfo *v1alpha1.ServiceInfo, ns string, kubeClient kubernetes.Interface) (*T, error)
Types ¶
type CredentialData ¶
type CredentialData struct { CredentialType string `json:"credential-type"` ClientId string `json:"clientid"` ClientSecret string `json:"clientsecret"` AuthUrl string `json:"url"` UAADomain string `json:"uaadomain"` ServiceBrokerUrl string `json:"sburl"` CertificateUrl string `json:"certurl"` Certificate string `json:"certificate"` CertificateKey string `json:"key"` VerificationKey string `json:"verificationkey"` CallbackTimeoutMillis string `json:"callbackTimeoutMillis"` }
type MetadataPropertyDescriptor ¶
type MetadataPropertyDescriptor struct { Name string `json:"name"` SourceName string `json:"sourceName"` Format PropertyFormat `json:"format"` Container bool `json:"container"` }
type PropertyFormat ¶
type PropertyFormat string
const ( PropertyFormatText PropertyFormat = "text" PropertyFormatJSON PropertyFormat = "json" )
type SaasRegistryCredentials ¶
type SaasRegistryCredentials struct { CredentialData `json:",inline"` SaasManagerUrl string `json:"saas_registry_url"` }
type SecretMetadata ¶
type SecretMetadata struct { MetadataProperties []MetadataPropertyDescriptor `json:"metaDataProperties"` CredentialProperties []MetadataPropertyDescriptor `json:"credentialProperties"` }
See Kubernetes-Service-Bindings/doc
type VCAPServiceInstance ¶
type VCAPServiceInstance struct { Name string `json:"name"` // this attribute holds the binding name if it exists, otherwise, instance name BindingGUID string `json:"binding_guid,omitempty"` BindingName string `json:"binding_name,omitempty"` InstanceGUID string `json:"instance_guid,omitempty"` InstanceName string `json:"instance_name,omitempty"` Label string `json:"label"` Plan string `json:"plan,omitempty"` Credentials interface{} `json:"credentials"` Tags []string `json:"tags,omitempty"` }
type XSUAACredentials ¶
type XSUAACredentials struct { CredentialData `json:",inline"` XSAppName string `json:"xsappname"` TrusterClientIDSuffix string `json:"trustedclientidsuffix"` }
Click to show internal directories.
Click to hide internal directories.