Skip to content

Commit

Permalink
Merge pull request #235 from gianlucam76/labels
Browse files Browse the repository at this point in the history
Adjust label identifiers
  • Loading branch information
gianlucam76 authored Nov 17, 2023
2 parents e16bb80 + 8094ed2 commit 3c50883
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions api/v1alpha1/accessrequest_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const (

AccessRequestKind = "AccessRequest"

// AccessRequestLabelName is added to each Secret generated for an AccessRequest
AccessRequestLabelName = "projectsveltos.io/access-request-name"
// AccessRequestNameLabel is added to each Secret generated for an AccessRequest
AccessRequestNameLabel = "projectsveltos.io/access-request-name"
)

// RequestType specifies the type of AccessRequest
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/classifier_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func GetClassifierReportName(classifierName, clusterName string, clusterType *Cl

func GetClassifierReportLabels(classifierName, clusterName string, clusterType *ClusterType) map[string]string {
return map[string]string{
ClassifierLabelName: classifierName,
ClassifierlNameLabel: classifierName,
ClassifierReportClusterNameLabel: clusterName,
ClassifierReportClusterTypeLabel: strings.ToLower(string(*clusterType)),
}
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/classifierreport_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ const (
)

const (
// ClassifierLabelName is added to each ClassifierReport generated
// ClassifierNameLabel is added to each ClassifierReport generated
// for a Classifier instance
ClassifierLabelName = "projectsveltos.io/classifier-name"
ClassifierlNameLabel = "projectsveltos.io/classifier-name"

ClassifierReportKind = "ClassifierReport"

Expand Down
6 changes: 3 additions & 3 deletions api/v1alpha1/eventreport_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ const (
// EventReport before removing it from the apiserver.
EventReportFinalizer = "eventreport.finalizer.projectsveltos.io"

// EventSourceLabelName is added to each EventReport generated
// EventSourceNameLabel is added to each EventReport generated
// for a EventSource instance
EventSourceLabelName = "projectsveltos.io/eventsource-name"
EventSourceNameLabel = "projectsveltos.io/eventsource-name"

// EventReportClusterNameLabel is added to each EventReport
EventReportClusterNameLabel = "eventreport.projectsveltos.io/cluster-name"
Expand All @@ -50,7 +50,7 @@ func GetEventReportName(healthName, clusterName string, clusterType *ClusterType

func GetEventReportLabels(eventSourceName, clusterName string, clusterType *ClusterType) map[string]string {
return map[string]string{
EventSourceLabelName: eventSourceName,
EventSourceNameLabel: eventSourceName,
EventReportClusterNameLabel: clusterName,
EventReportClusterTypeLabel: strings.ToLower(string(*clusterType)),
}
Expand Down
6 changes: 3 additions & 3 deletions api/v1alpha1/healthcheckreport_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ const (
// HealthCheckReport before removing it from the apiserver.
HealthCheckReportFinalizer = "healthcheckreport.finalizer.projectsveltos.io"

// HealthCheckLabelName is added to each HealthCheckReport generated
// HealthCheckNameLabel is added to each HealthCheckReport generated
// for a HealthCheck instance
HealthCheckLabelName = "projectsveltos.io/healthcheck-name"
HealthCheckNameLabel = "projectsveltos.io/healthcheck-name"

// HealthCheckReportClusterNameLabel is added to each HealthCheckReport
HealthCheckReportClusterNameLabel = "healthcheckreport.projectsveltos.io/cluster-name"
Expand All @@ -50,7 +50,7 @@ func GetHealthCheckReportName(healthCheckName, clusterName string, clusterType *

func GetHealthCheckReportLabels(healthCheckName, clusterName string, clusterType *ClusterType) map[string]string {
return map[string]string{
HealthCheckLabelName: healthCheckName,
HealthCheckNameLabel: healthCheckName,
HealthCheckReportClusterNameLabel: clusterName,
HealthCheckReportClusterTypeLabel: strings.ToLower(string(*clusterType)),
}
Expand Down
11 changes: 7 additions & 4 deletions api/v1alpha1/resourcesummary_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ const (

ResourceSummaryKind = "ResourceSummary"

// ClusterSummaryLabelName is added to all ResourceSummary instances
ClusterSummaryLabelName = "projectsveltos.io/cluster-summary-name"
// ClusterSummaryNameLabel is added to all ResourceSummary instances
ClusterSummaryNameLabel = "projectsveltos.io/cluster-summary-name"

// ClusterSummaryLabelNamespace is added to all ResourceSummary instances
ClusterSummaryLabelNamespace = "projectsveltos.io/cluster-summary-namespace"
// ClusterSummaryNamespaceLabel is added to all ResourceSummary instances
ClusterSummaryNamespaceLabel = "projectsveltos.io/cluster-summary-namespace"

// ClusterSummaryTypeLabel is added to all ResourceSummary instances
ClusterSummaryTypeLabel = "projectsveltos.io/cluster-summary-type"
)

type Resource struct {
Expand Down

0 comments on commit 3c50883

Please sign in to comment.