Skip to content

Commit ad1fd22

Browse files
committed
add more logs
1 parent 931d30f commit ad1fd22

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/k8s/environment/environment.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,6 @@ func (m *Environment) validateRequiredChainLinkLabels() error {
259259
// Safely access the map
260260
for _, l := range requiredChainLinkNsLabels {
261261
labels := m.root.Labels()
262-
if labels == nil {
263-
// This additional check is defensive; can be omitted if Labels() is guaranteed non-nil
264-
return fmt.Errorf("unexpected nil labels while iterating")
265-
}
266262
if _, ok := (*labels)[l]; !ok {
267263
missingNsLabels = append(missingNsLabels, l)
268264
}
@@ -427,6 +423,8 @@ func (m *Environment) initApp() error {
427423
return err
428424
}
429425

426+
log.Info().Interface("Labels", nsLabels).Msg("Converted Namespace labels")
427+
430428
m.root = cdk8s.NewChart(m.App, ptr.Ptr(fmt.Sprintf("root-chart-%s", m.Cfg.Namespace)), &cdk8s.ChartProps{
431429
Labels: nsLabels,
432430
Namespace: ptr.Ptr(m.Cfg.Namespace),

0 commit comments

Comments
 (0)