Skip to content

Commit 6c038ec

Browse files
committed
dev: clarification
1 parent f76dad8 commit 6c038ec

File tree

2 files changed

+5
-2
lines changed
  • pkg
    • apis/clickhouse.altinity.com/v1
    • model/chi/normalizer/templates

2 files changed

+5
-2
lines changed

pkg/apis/clickhouse.altinity.com/v1/types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ func (s CHISelector) Matches(labels map[string]string) bool {
144144
// Labels have the key specified in selector, but selector value is not the same as labels value
145145
// Selector does not match the labels
146146
return false
147+
} else {
148+
// Selector value and label value are equal
149+
// So far label matches selector
150+
// Continue iteration to next value
147151
}
148152
}
149153

pkg/model/chi/normalizer/templates/chi.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ func ApplyCHITemplates(target, chi *api.ClickHouseInstallation) (appliedTemplate
7373
templates := prepareListOfTemplates(chi)
7474

7575
// Apply templates from the list and count applied templates - just to make nice log entry
76-
for i := range templates {
77-
template := templates[i]
76+
for _, template := range templates {
7877
if applyTemplate(target, template, chi) {
7978
appliedTemplates = append(appliedTemplates, template)
8079
}

0 commit comments

Comments
 (0)