Skip to content

Commit

Permalink
[DC][Sidecars] When using private registry with no credentials, treat…
Browse files Browse the repository at this point in the history
… it as public (#7884)

Co-authored-by: Yoona Oh <[email protected]>
  • Loading branch information
yoonaoh and johmsft authored Oct 28, 2024
1 parent 4bc53fb commit 23ef040
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const DeploymentCenterContainerSettings: React.FC<DeploymentCenterFieldProps<Dep
useEffect(() => {
let isSubscribed = true;

portalContext?.getBooleanFlight(ExperimentationConstants.FlightVariable.enableSidecarMigration).then(hasFlightEnabled => {
portalContext?.getBooleanFlight(ExperimentationConstants.FlightVariable.showDCReactView).then(hasFlightEnabled => {
if (isSubscribed) {
setEnableSidecarMigration(hasFlightEnabled);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,10 +733,17 @@ export const getAuthSettings = (values: DeploymentCenterContainerFormData) => {
passwordSecret = '';
}
} else if (values.registrySource === ContainerRegistrySources.privateRegistry) {
authType = SiteContainerAuthType.UserCredentials;
userManagedIdentityClientId = '';
userName = values.privateRegistryUsername;
passwordSecret = values.privateRegistryPassword;
if (values.privateRegistryUsername && values.privateRegistryPassword) {
authType = SiteContainerAuthType.UserCredentials;
userManagedIdentityClientId = '';
userName = values.privateRegistryUsername;
passwordSecret = values.privateRegistryPassword;
} else {
authType = SiteContainerAuthType.Anonymous;
userManagedIdentityClientId = '';
userName = '';
passwordSecret = '';
}
}

return {
Expand Down

0 comments on commit 23ef040

Please sign in to comment.