Skip to content

Commit

Permalink
fix(kubernetes): surface dockerRegistries to credentials endpoint (#4134
Browse files Browse the repository at this point in the history
)
  • Loading branch information
maggieneterval authored and mergify[bot] committed Oct 29, 2019
1 parent 36a1efe commit 94e13e5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.netflix.spinnaker.clouddriver.kubernetes.config.CustomKubernetesResource;
import com.netflix.spinnaker.clouddriver.kubernetes.config.KubernetesCachingPolicy;
import com.netflix.spinnaker.clouddriver.kubernetes.config.KubernetesConfigurationProperties;
import com.netflix.spinnaker.clouddriver.kubernetes.config.LinkedDockerRegistryConfiguration;
import com.netflix.spinnaker.clouddriver.kubernetes.security.KubeconfigFileHasher;
import com.netflix.spinnaker.clouddriver.kubernetes.security.KubernetesCredentialFactory;
import com.netflix.spinnaker.clouddriver.kubernetes.security.KubernetesCredentials;
Expand Down Expand Up @@ -400,6 +401,11 @@ public Map<String, String> getSpinnakerKindMap() {
return kindMap;
}

@Override
public List<LinkedDockerRegistryConfiguration> getDockerRegistries() {
return Collections.emptyList();
}

public KubernetesManifest get(KubernetesKind kind, String namespace, String name) {
return runAndRecordMetrics(
"get", kind, namespace, () -> jobExecutor.get(this, kind, namespace, name));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@

package com.netflix.spinnaker.clouddriver.kubernetes.security;

import com.netflix.spinnaker.clouddriver.kubernetes.config.LinkedDockerRegistryConfiguration;
import java.util.List;
import java.util.Map;

public interface KubernetesCredentials {
List<String> getDeclaredNamespaces();

Map<String, String> getSpinnakerKindMap();

List<LinkedDockerRegistryConfiguration> getDockerRegistries();
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static lombok.EqualsAndHashCode.Include;

import com.netflix.spinnaker.clouddriver.kubernetes.config.KubernetesConfigurationProperties.ManagedAccount;
import com.netflix.spinnaker.clouddriver.kubernetes.config.LinkedDockerRegistryConfiguration;
import com.netflix.spinnaker.clouddriver.security.AccountCredentials;
import com.netflix.spinnaker.clouddriver.security.ProviderVersion;
import com.netflix.spinnaker.fiat.model.resources.Permissions;
Expand Down Expand Up @@ -87,4 +88,8 @@ public List<String> getNamespaces() {
public Map<String, String> getSpinnakerKindMap() {
return credentials.getSpinnakerKindMap();
}

public List<LinkedDockerRegistryConfiguration> getDockerRegistries() {
return credentials.getDockerRegistries();
}
}

0 comments on commit 94e13e5

Please sign in to comment.