Skip to content

Commit ab07890

Browse files
committed
[Misc] Quality: minor issues addressed
misc Q fixes.
1 parent 44fbe30 commit ab07890

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

cmd/server/internal/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,6 @@ func (s *SubscriptionHandler) DeleteTenant(reqInfo *RequestInfo) *Result {
510510
}
511511

512512
func (s *SubscriptionHandler) authorizationCheck(headerDetails *requestHeaderDetails, ca *v1alpha1.CAPApplication, subscription subscriptionType, step string) (saasData *util.SaasRegistryCredentials, smsData *util.SmsCredentials, err error) {
513-
uaaData := &util.XSUAACredentials{}
514513
switch subscription {
515514
case SMS:
516515
// fetch SMS information
@@ -523,6 +522,7 @@ func (s *SubscriptionHandler) authorizationCheck(headerDetails *requestHeaderDet
523522
err = s.checkCertIssuerAndSubject(headerDetails.xForwardedClientCert, smsData, step)
524523

525524
default:
525+
uaaData := &util.XSUAACredentials{}
526526
// fetch SaaS Registry and XSUAA information
527527
saasData, uaaData = s.getServiceDetails(ca, step)
528528
if saasData == nil || uaaData == nil {

internal/controller/reconcile-captenant.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ func (c *Controller) getCAPApplicationVersionForTenantOperationType(ctx context.
580580
case v1alpha1.CAPTenantOperationTypeDeprovisioning: // for deletion - use the current CAPApplicationVersion (from status)
581581
if cat.Status.CurrentCAPApplicationVersionInstance == "" {
582582
err := fmt.Errorf("cannot identify %s for %s %s.%s", v1alpha1.CAPApplicationVersionKind, v1alpha1.CAPTenantKind, cat.Namespace, cat.Name)
583-
util.LogError(err, "Cannot identify applicaion version", string(Deprovisioning), cat, nil, "tenantId", cat.Spec.TenantId)
583+
util.LogError(err, "Cannot identify application version", string(Deprovisioning), cat, nil, "tenantId", cat.Spec.TenantId)
584584
return nil, err
585585
}
586586
cav, err := c.crdClient.SmeV1alpha1().CAPApplicationVersions(cat.Namespace).Get(ctx, cat.Status.CurrentCAPApplicationVersionInstance, metav1.GetOptions{})

pkg/apis/sme.sap.com/v1alpha1/types.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const (
2424
CAPTenantOperationKind = "CAPTenantOperation"
2525
CAPTenantOperationResource = "captenantoperations"
2626
CAPTenantOutputKind = "CAPTenantOutput"
27-
CAPTenantOutputResource = "captenantouputs"
27+
CAPTenantOutputResource = "captenantoutputs"
2828
DomainKind = "Domain"
2929
DomainResource = "domains"
3030
ClusterDomainKind = "ClusterDomain"
@@ -92,7 +92,7 @@ type CAPApplicationSpec struct {
9292
DomainRefs []DomainRef `json:"domainRefs,omitempty"`
9393
// [DEPRECATED] Domains used by the application // Will be removed in future versions
9494
Domains ApplicationDomains `json:"domains,omitempty"`
95-
// SAP BTP Global Account Identifier where services are entitles for the current application
95+
// SAP BTP Global Account Identifier where services are entitled for the current application
9696
// Will soon be deprecated, use ProviderSubaccountId instead
9797
GlobalAccountId string `json:"globalAccountId"`
9898
// The subaccount ID in which the application is provided (will soon replace GlobalAccountId)
@@ -393,11 +393,11 @@ type DeletionRules struct {
393393
//
394394
// Rule evaluation for Gauge type metric: The time series data of the metric (restricted to the current workload by setting `job` label as workload service name) is calculated as an average over the specified period.
395395
// A sum of the calculated average from different time series is then compared to the provided threshold value to determine whether the rule has been satisfied.
396-
// Evaluation: `sum(avg_over_time(<gauge-metric>{job=<workload-service-name>}[<lookback-duration>])) <= <lower0threshold-value>`
396+
// Evaluation: `sum(avg_over_time(<gauge-metric>{job=<workload-service-name>}[<lookback-duration>])) <= <lower-threshold-value>`
397397
//
398398
// Rule evaluation for Counter type metric: The time series data of the metric (restricted to the current workload by setting `job` label as workload service name) is calculated as rate of increase over the specified period.
399399
// The sum of the calculated rates from different time series is then compared to the provided threshold value to determine whether the rule has been satisfied.
400-
// Evaluation: `sum(rate(<counter-metric>{job=<workload-service-name>}[<lookback-duration>])) <= <lower0threshold-value>`
400+
// Evaluation: `sum(rate(<counter-metric>{job=<workload-service-name>}[<lookback-duration>])) <= <lower-threshold-value>`
401401
type MetricRule struct {
402402
// Prometheus metric. For example `http_request_count`
403403
Name string `json:"name"`
@@ -450,7 +450,7 @@ type JobDetails struct {
450450
BackoffLimit *int32 `json:"backoffLimit,omitempty"`
451451
// Specifies the time after which the job may be cleaned up.
452452
TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`
453-
// Specifies the duration in sections for which the job may be continuously active.
453+
// Specifies the duration in seconds for which the job may be continuously active.
454454
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
455455
}
456456

@@ -798,7 +798,7 @@ type DomainSpec struct {
798798
type DNSTemplate struct {
799799
// Domain name for which a DNS record will be created
800800
Name string `json:"name"`
801-
// Target of the DNS reord
801+
// Target of the DNS record
802802
Target string `json:"target"`
803803
}
804804

0 commit comments

Comments
 (0)