From 6c7132b2846d609d0c9ef4937f411bbf2150a0d7 Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Thu, 29 Oct 2020 18:10:27 +0100 Subject: [PATCH] Add datapolicy tags to staging/src/k8s.io/legacy-cloud-providers --- pkg/volume/cinder/cinder_test.go | 2 +- .../k8s.io/legacy-cloud-providers/azure/auth/azure_auth.go | 4 ++-- staging/src/k8s.io/legacy-cloud-providers/gce/gce.go | 2 +- staging/src/k8s.io/legacy-cloud-providers/gce/token_source.go | 4 ++-- .../src/k8s.io/legacy-cloud-providers/openstack/openstack.go | 2 +- .../legacy-cloud-providers/vsphere/credentialmanager.go | 2 +- .../k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go | 2 +- staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere.go | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pkg/volume/cinder/cinder_test.go b/pkg/volume/cinder/cinder_test.go index 1e6f5fa597f..66d1eef9795 100644 --- a/pkg/volume/cinder/cinder_test.go +++ b/pkg/volume/cinder/cinder_test.go @@ -316,7 +316,7 @@ func getOpenstackConfig() openstack.Config { AuthURL string `gcfg:"auth-url"` Username string UserID string `gcfg:"user-id"` - Password string + Password string `datapolicy:"password"` TenantID string `gcfg:"tenant-id"` TenantName string `gcfg:"tenant-name"` TrustID string `gcfg:"trust-id"` diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/auth/azure_auth.go b/staging/src/k8s.io/legacy-cloud-providers/azure/auth/azure_auth.go index af56f19b516..c8a7dfd7866 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/auth/azure_auth.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/auth/azure_auth.go @@ -49,11 +49,11 @@ type AzureAuthConfig struct { // The ClientID for an AAD application with RBAC access to talk to Azure RM APIs AADClientID string `json:"aadClientId,omitempty" yaml:"aadClientId,omitempty"` // The ClientSecret for an AAD application with RBAC access to talk to Azure RM APIs - AADClientSecret string `json:"aadClientSecret,omitempty" yaml:"aadClientSecret,omitempty"` + AADClientSecret string `json:"aadClientSecret,omitempty" yaml:"aadClientSecret,omitempty" datapolicy:"token"` // The path of a client certificate for an AAD application with RBAC access to talk to Azure RM APIs AADClientCertPath string `json:"aadClientCertPath,omitempty" yaml:"aadClientCertPath,omitempty"` // The password of the client certificate for an AAD application with RBAC access to talk to Azure RM APIs - AADClientCertPassword string `json:"aadClientCertPassword,omitempty" yaml:"aadClientCertPassword,omitempty"` + AADClientCertPassword string `json:"aadClientCertPassword,omitempty" yaml:"aadClientCertPassword,omitempty" datapolicy:"password"` // Use managed service identity for the virtual machine to access Azure ARM APIs UseManagedIdentityExtension bool `json:"useManagedIdentityExtension,omitempty" yaml:"useManagedIdentityExtension,omitempty"` // UserAssignedIdentityID contains the Client ID of the user assigned MSI which is assigned to the underlying VMs. If empty the user assigned identity is not used. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce.go index b183afd3ba3..d7104661809 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce.go @@ -171,7 +171,7 @@ type Cloud struct { // TODO: replace gcfg with json type ConfigGlobal struct { TokenURL string `gcfg:"token-url"` - TokenBody string `gcfg:"token-body"` + TokenBody string `gcfg:"token-body" datapolicy:"token"` // ProjectID and NetworkProjectID can either be the numeric or string-based // unique identifier that starts with [a-z]. ProjectID string `gcfg:"project-id"` diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/token_source.go b/staging/src/k8s.io/legacy-cloud-providers/gce/token_source.go index 6eae376c10c..34489dba17c 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/token_source.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/token_source.go @@ -75,7 +75,7 @@ func init() { type AltTokenSource struct { oauthClient *http.Client tokenURL string - tokenBody string + tokenBody string `datapolicy:"token"` throttle flowcontrol.RateLimiter } @@ -104,7 +104,7 @@ func (a *AltTokenSource) token() (*oauth2.Token, error) { return nil, err } var tok struct { - AccessToken string `json:"accessToken"` + AccessToken string `json:"accessToken" datapolicy:"token"` ExpireTime time.Time `json:"expireTime"` } if err := json.NewDecoder(res.Body).Decode(&tok); err != nil { diff --git a/staging/src/k8s.io/legacy-cloud-providers/openstack/openstack.go b/staging/src/k8s.io/legacy-cloud-providers/openstack/openstack.go index 15d9a869b53..3dda71948ab 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/openstack/openstack.go +++ b/staging/src/k8s.io/legacy-cloud-providers/openstack/openstack.go @@ -158,7 +158,7 @@ type Config struct { AuthURL string `gcfg:"auth-url"` Username string UserID string `gcfg:"user-id"` - Password string + Password string `datapolicy:"password"` TenantID string `gcfg:"tenant-id"` TenantName string `gcfg:"tenant-name"` TrustID string `gcfg:"trust-id"` diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/credentialmanager.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/credentialmanager.go index a68be67dfba..d9cf8017444 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/credentialmanager.go +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/credentialmanager.go @@ -53,7 +53,7 @@ type SecretCache struct { type Credential struct { User string `gcfg:"user"` - Password string `gcfg:"password"` + Password string `gcfg:"password" datapolicy:"password"` } type SecretCredentialManager struct { diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go index b726cc1aa49..90361115e97 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go @@ -37,7 +37,7 @@ import ( type VSphereConnection struct { Client *vim25.Client Username string - Password string + Password string `datapolicy:"password"` Hostname string Port string CACert string diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere.go index aa53e3435d9..3b5d2c886b8 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere.go +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere.go @@ -113,7 +113,7 @@ type VirtualCenterConfig struct { // vCenter username. User string `gcfg:"user"` // vCenter password in clear text. - Password string `gcfg:"password"` + Password string `gcfg:"password" datapolicy:"password"` // vCenter port. VCenterPort string `gcfg:"port"` // Datacenter in which VMs are located. @@ -137,7 +137,7 @@ type VSphereConfig struct { // vCenter username. User string `gcfg:"user"` // vCenter password in clear text. - Password string `gcfg:"password"` + Password string `gcfg:"password" datapolicy:"password"` // Deprecated. Use VirtualCenter to specify multiple vCenter Servers. // vCenter IP. VCenterIP string `gcfg:"server"`