Skip to content

Commit 7ca8af8

Browse files
committed
Include the AgentVersion and clusterID when requesting a presigned URL
Signed-off-by: Richard Wall <[email protected]>
1 parent 6f10b73 commit 7ca8af8

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

pkg/internal/cyberark/dataupload/dataupload.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"k8s.io/client-go/transport"
1616

1717
"github.com/jetstack/preflight/api"
18+
"github.com/jetstack/preflight/pkg/clusteruid"
1819
"github.com/jetstack/preflight/pkg/version"
1920
)
2021

@@ -97,13 +98,15 @@ func (c *CyberArkClient) retrievePresignedUploadURL(ctx context.Context, checksu
9798
}
9899

99100
request := struct {
100-
ClusterID string `json:"cluster_id"`
101-
ClusterDescription string `json:"cluster_description"`
102-
Checksum string `json:"checksum_sha256"`
101+
ClusterID string `json:"cluster_id"`
102+
// ClusterDescription string `json:"cluster_description"`
103+
Checksum string `json:"checksum_sha256"`
104+
AgentVersion string `json:"agent_version"`
103105
}{
104-
ClusterID: opts.ClusterName,
105-
ClusterDescription: opts.ClusterDescription,
106-
Checksum: checksum,
106+
ClusterID: clusteruid.ClusterUIDFromContext(ctx),
107+
// ClusterDescription: opts.ClusterDescription,
108+
Checksum: checksum,
109+
AgentVersion: version.PreflightVersion,
107110
}
108111

109112
encodedBody := &bytes.Buffer{}

0 commit comments

Comments
 (0)