Skip to content

Commit

Permalink
Merge pull request #1176 from Neon-White/change-azure-creds-to-pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Neon-White authored Jul 19, 2023
2 parents 51c88f3 + 8b70af6 commit 18f09ee
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion pkg/backingstore/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ func (r *Reconciler) MakeExternalConnectionParams() (*nb.AddExternalConnectionPa
logsAnalyticsWorkspaceID := r.Secret.StringData["LogsAnalyticsWorkspaceID"]

if tenantID != "" && appID != "" && appSecret != "" && logsAnalyticsWorkspaceID != "" {
conn.AzureLogAccessKeys = nb.AzureLogAccessKeysParams{
conn.AzureLogAccessKeys = &nb.AzureLogAccessKeysParams{
AzureTenantID: tenantID,
AzureClientID: appID,
AzureClientSecret: appSecret,
Expand Down
2 changes: 1 addition & 1 deletion pkg/namespacestore/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ func (r *Reconciler) MakeExternalConnectionParams() (*nb.AddExternalConnectionPa
logsAnalyticsWorkspaceID := r.Secret.StringData["LogsAnalyticsWorkspaceID"]

if tenantID != "" && appID != "" && appSecret != "" && logsAnalyticsWorkspaceID != "" {
conn.AzureLogAccessKeys = nb.AzureLogAccessKeysParams{
conn.AzureLogAccessKeys = &nb.AzureLogAccessKeysParams{
AzureTenantID: tenantID,
AzureClientID: appID,
AzureClientSecret: appSecret,
Expand Down
44 changes: 22 additions & 22 deletions pkg/nb/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -681,28 +681,28 @@ type AzureLogAccessKeysParams struct {

// AddExternalConnectionParams is the params of account_api.add_external_connection()
type AddExternalConnectionParams struct {
Name string `json:"name"`
EndpointType EndpointType `json:"endpoint_type"`
Endpoint string `json:"endpoint"`
Identity string `json:"identity"`
Secret string `json:"secret"`
AuthMethod CloudAuthMethod `json:"auth_method,omitempty"`
AWSSTSARN string `json:"aws_sts_arn,omitempty"`
Region string `json:"region,omitempty"`
AzureLogAccessKeys AzureLogAccessKeysParams `json:"azure_log_access_keys,omitempty"`
Name string `json:"name"`
EndpointType EndpointType `json:"endpoint_type"`
Endpoint string `json:"endpoint"`
Identity string `json:"identity"`
Secret string `json:"secret"`
AuthMethod CloudAuthMethod `json:"auth_method,omitempty"`
AWSSTSARN string `json:"aws_sts_arn,omitempty"`
Region string `json:"region,omitempty"`
AzureLogAccessKeys *AzureLogAccessKeysParams `json:"azure_log_access_keys,omitempty"`
}

// CheckExternalConnectionParams is the params of account_api.check_external_connection()
type CheckExternalConnectionParams struct {
Name string `json:"name"`
EndpointType EndpointType `json:"endpoint_type"`
Endpoint string `json:"endpoint"`
Identity string `json:"identity"`
Secret string `json:"secret"`
AuthMethod CloudAuthMethod `json:"auth_method,omitempty"`
AWSSTSARN string `json:"aws_sts_arn,omitempty"`
IgnoreNameAlreadyExist bool `json:"ignore_name_already_exist,omitempty"`
AzureLogAccessKeys AzureLogAccessKeysParams `json:"azure_log_access_keys,omitempty"`
Name string `json:"name"`
EndpointType EndpointType `json:"endpoint_type"`
Endpoint string `json:"endpoint"`
Identity string `json:"identity"`
Secret string `json:"secret"`
AuthMethod CloudAuthMethod `json:"auth_method,omitempty"`
AWSSTSARN string `json:"aws_sts_arn,omitempty"`
IgnoreNameAlreadyExist bool `json:"ignore_name_already_exist,omitempty"`
AzureLogAccessKeys *AzureLogAccessKeysParams `json:"azure_log_access_keys,omitempty"`
}

// CheckExternalConnectionReply is the reply of account_api.check_external_connection()
Expand All @@ -716,10 +716,10 @@ type CheckExternalConnectionReply struct {

// UpdateExternalConnectionParams is the params of account_api.update_external_connection()
type UpdateExternalConnectionParams struct {
Name string `json:"name"`
Identity string `json:"identity"`
Secret string `json:"secret"`
AzureLogAccessKeys AzureLogAccessKeysParams `json:"azure_log_access_keys,omitempty"`
Name string `json:"name"`
Identity string `json:"identity"`
Secret string `json:"secret"`
AzureLogAccessKeys *AzureLogAccessKeysParams `json:"azure_log_access_keys,omitempty"`
}

// DeleteExternalConnectionParams is the params of account_api.delete_external_connection()
Expand Down

0 comments on commit 18f09ee

Please sign in to comment.