Skip to content

Commit 5cdd727

Browse files
committed
Use the new dataSourceRef field
1 parent aa486bf commit 5cdd727

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/data-source-validator/data_source_validator.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,20 +177,20 @@ func (ctrl *populatorController) syncPvcByKey(key string) error {
177177
return err
178178
}
179179

180-
dataSource := pvc.Spec.DataSource
181-
if nil == dataSource {
180+
dataSourceRef := pvc.Spec.DataSourceRef
181+
if nil == dataSourceRef {
182182
// No data source
183183
return nil
184184
}
185-
if nil == dataSource.APIGroup || "" == *dataSource.APIGroup {
185+
if nil == dataSourceRef.APIGroup || "" == *dataSourceRef.APIGroup {
186186
// Data source is a core object
187187
return nil
188188
}
189189

190-
klog.V(3).Infof("PVC %s datasource is %s.%s", pvc.Name, *dataSource.APIGroup, dataSource.Kind)
190+
klog.V(3).Infof("PVC %s datasource is %s.%s", pvc.Name, *dataSourceRef.APIGroup, dataSourceRef.Kind)
191191
gk := metav1.GroupKind{
192-
Group: *dataSource.APIGroup,
193-
Kind: dataSource.Kind,
192+
Group: *dataSourceRef.APIGroup,
193+
Kind: dataSourceRef.Kind,
194194
}
195195

196196
valid, err := ctrl.validateGroupKind(gk)

0 commit comments

Comments
 (0)