Skip to content

Commit 54184d7

Browse files
Ensure HMAC is not empty (#42)
1 parent f4dcd66 commit 54184d7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ import (
3636
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
3737
"sigs.k8s.io/controller-runtime/pkg/webhook"
3838

39+
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
40+
3941
infrastructurev1alpha1 "github.com/metal-stack/cluster-api-provider-metal-stack/api/v1alpha1"
4042
"github.com/metal-stack/cluster-api-provider-metal-stack/internal/controller"
4143
fcmv2 "github.com/metal-stack/firewall-controller-manager/api/v2"
4244
metalgo "github.com/metal-stack/metal-go"
43-
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
4445
// +kubebuilder:scaffold:imports
4546
)
4647

@@ -197,7 +198,7 @@ func newMetalClient() (metalgo.Client, error) {
197198
}
198199

199200
hmac := os.Getenv("METAL_API_HMAC")
200-
if url == "" {
201+
if hmac == "" {
201202
return nil, errors.New("METAL_API_HMAC environment variable must be set")
202203
}
203204

0 commit comments

Comments
 (0)