From 8e5066f5f424d9c2a0f6ec3d8535ae66ebb25359 Mon Sep 17 00:00:00 2001 From: 3deep5me Date: Mon, 8 Jan 2024 18:52:19 +0100 Subject: [PATCH] changed PROXMOX_TOKEN to PROXMOX_USERNAME in main.go --- cmd/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index b1c00459..3eda4f19 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -202,8 +202,8 @@ func initFlagsAndEnv(fs *pflag.FlagSet) { klog.InitFlags(nil) ProxmoxURL = env.GetString("PROXMOX_URL", "") - ProxmoxTokenID = env.GetString("PROXMOX_TOKEN", "") - ProxmoxSecret = env.GetString("PROXMOX_SECRET", "") + ProxmoxTokenID = env.GetString("PROXMOX_USERNAME", "") + ProxmoxSecret = env.GetString("PROXMOX_TOKEN", "") fs.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.") fs.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.") @@ -227,10 +227,10 @@ func validate() error { return errors.New("required variable `PROXMOX_URL` is not set") } if ProxmoxTokenID == "" { - return errors.New("required variable `PROXMOX_TOKEN` is not set") + return errors.New("required variable `PROXMOX_USERNAME` is not set") } if ProxmoxSecret == "" { - return errors.New("required variable `PROXMOX_SECRET` is not set") + return errors.New("required variable `PROXMOX_TOKEN` is not set") } return nil }