Skip to content

Commit b94c3bd

Browse files
committed
sa: make docker registry service controller check all secrets
1 parent 23a0420 commit b94c3bd

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

pkg/serviceaccounts/controllers/docker_registry_service.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -241,18 +241,14 @@ func getDockerRegistryLocations(lister listers.ServiceLister, location serviceLo
241241
func (e *DockerRegistryServiceController) syncRegistryLocationChange(key string) error {
242242
newLocations := e.getDockerRegistryLocations()
243243
newDockerRegistryLocations := sets.NewString(newLocations...)
244-
existingURLs := e.getRegistryURLs()
245-
if existingURLs.Equal(newDockerRegistryLocations) {
246-
glog.V(4).Infof("No effective update: %v", newDockerRegistryLocations)
247-
return nil
248-
}
249244

250245
// make sure that new dockercfg secrets get the correct locations
251246
e.dockercfgController.SetDockerURLs(newDockerRegistryLocations.List()...)
252247
e.setRegistryURLs(newDockerRegistryLocations.List()...)
253248

254-
// we've changed the docker registry URL. Add items to the work queue for all known secrets
255-
// new secrets will already get the updated value.
249+
// Add all dockercfg secrets into the work queue even if the Docker registry service location was
250+
// not changed. The syncSecretUpdate will make sure the secrets have dockercfg that include all
251+
// locations (DNS and ClusterIP).
256252
for _, obj := range e.secretCache.List() {
257253
switch t := obj.(type) {
258254
case *v1.Secret:

0 commit comments

Comments
 (0)