Skip to content

Commit d258aca

Browse files
committed
config: keep passing down uploader_id, mark uploader_id as deprecated
This commit re-introduced the uploader_id. The venafi-cloud.uploader_id field still doesn't do anything. I propose to remove all mentions to uploader_id in the next PR. And since uploader_id is no longer doing anything anymore, I've marked venafi-cloud.uploader_id as "Deprecated". Note that marking this as deprecated doesn't appear to end-users. Instead, end-users will see the warning about uploader_id being ignored if they set it.
1 parent f00b5fa commit d258aca

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

pkg/agent/config.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,14 @@ type DataGatherer struct {
7373
}
7474

7575
type VenafiCloudConfig struct {
76+
// Deprecated: UploaderID is ignored by the backend and is not needed.
7677
// UploaderID is the upload ID that will be used when creating a cluster
7778
// connection. This field is ignored by the backend and is often arbitrarily
7879
// set to "no".
7980
UploaderID string `yaml:"uploader_id,omitempty"`
80-
// UploadPath is the endpoint path for the upload API.
81+
82+
// UploadPath is the endpoint path for the upload API. Only used in Venafi
83+
// Cloud Key Pair Service Account mode.
8184
UploadPath string `yaml:"upload_path,omitempty"`
8285
}
8386

@@ -702,9 +705,11 @@ func ValidateDataGatherers(dataGatherers []DataGatherer) error {
702705
func createCredentialClient(log *log.Logger, credentials client.Credentials, cfg CombinedConfig, agentMetadata *api.AgentMetadata) (client.Client, error) {
703706
switch creds := credentials.(type) {
704707
case *client.VenafiSvcAccountCredentials:
705-
// check if config has Venafi Cloud data, use config data if it's present
706-
uploaderID := "" // The uploader ID isn't actually used in the backend.
707-
uploadPath := ""
708+
// The uploader ID isn't actually used in the backend, let's use an
709+
// arbitrary value.
710+
uploaderID := "no"
711+
712+
var uploadPath string
708713
if cfg.AuthMode == VenafiCloudKeypair {
709714
// We don't do this for the VenafiCloudVenafiConnection mode because
710715
// the upload_path field is ignored in that mode.

0 commit comments

Comments
 (0)