Skip to content

Commit 9c3cb08

Browse files
committed
Better error checks for azure
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent 1c64383 commit 9c3cb08

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cloudprovider/azure.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ func (m *CloudProviderAzure) FetchTokens() (tokens []*bootstraptoken.BootstrapTo
122122
secretVersion := m.getSecretVersionFromId(*secret.ID)
123123
secretLogger := contextLogger.WithField("secretVersion", secretVersion)
124124

125+
if secret.Attributes == nil {
126+
secretLogger.Debug("ignoring, secret attributes are not set")
127+
continue
128+
}
129+
125130
// ignore not enabled
126131
if secret.Attributes.Enabled != nil && *secret.Attributes.Enabled == false {
127132
secretLogger.Debug("ignoring, secret is disabled")

0 commit comments

Comments
 (0)