diff --git a/clouddriver-core/src/main/groovy/com/netflix/spinnaker/clouddriver/model/securitygroups/Rule.java b/clouddriver-core/src/main/groovy/com/netflix/spinnaker/clouddriver/model/securitygroups/Rule.java index 03cdd6797f0..b66c128eefd 100644 --- a/clouddriver-core/src/main/groovy/com/netflix/spinnaker/clouddriver/model/securitygroups/Rule.java +++ b/clouddriver-core/src/main/groovy/com/netflix/spinnaker/clouddriver/model/securitygroups/Rule.java @@ -41,8 +41,8 @@ public interface Rule { @Data class PortRange implements Comparable { - Integer startPort; - Integer endPort; + protected Integer startPort; + protected Integer endPort; @Override public int compareTo(PortRange o) { diff --git a/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/model/KubernetesSecurityGroup.groovy b/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/model/KubernetesV1SecurityGroup.groovy similarity index 95% rename from clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/model/KubernetesSecurityGroup.groovy rename to clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/model/KubernetesV1SecurityGroup.groovy index 0efb500491c..11ddf7625f0 100644 --- a/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/model/KubernetesSecurityGroup.groovy +++ b/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/model/KubernetesV1SecurityGroup.groovy @@ -28,7 +28,7 @@ import groovy.transform.EqualsAndHashCode import io.fabric8.kubernetes.api.model.extensions.Ingress @EqualsAndHashCode(includes = ["name", "namespace", "accountName"]) -class KubernetesSecurityGroup implements SecurityGroup, Serializable { +class KubernetesV1SecurityGroup implements SecurityGroup, Serializable { final String type = KubernetesCloudProvider.ID final String cloudProvider = KubernetesCloudProvider.ID @@ -55,7 +55,7 @@ class KubernetesSecurityGroup implements SecurityGroup, Serializable { Ingress ingress KubernetesSecurityGroupDescription description - KubernetesSecurityGroup(String application, String account, Ingress ingress, boolean includeRules) { + KubernetesV1SecurityGroup(String application, String account, Ingress ingress, boolean includeRules) { this.ingress = ingress this.application = application diff --git a/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/view/KubernetesV1ClusterProvider.groovy b/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/view/KubernetesV1ClusterProvider.groovy index 5e9a2f748e4..e4ed453ccb7 100644 --- a/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/view/KubernetesV1ClusterProvider.groovy +++ b/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/view/KubernetesV1ClusterProvider.groovy @@ -41,7 +41,7 @@ class KubernetesV1ClusterProvider implements ClusterProvider [k, new HashSet(v)] } } - static loadBalancerToSecurityGroupMap(KubernetesSecurityGroupProvider securityGroupProvider, Cache cacheView, Collection loadBalancers) { + static loadBalancerToSecurityGroupMap(KubernetesV1SecurityGroupProvider securityGroupProvider, Cache cacheView, Collection loadBalancers) { Collection allSecurityGroups = resolveRelationshipDataForCollection(cacheView, loadBalancers, Keys.Namespace.SECURITY_GROUPS.ns, RelationshipCacheFilter.none()) Map> securityGroups = [:].withDefault { _ -> [] as Set } diff --git a/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/view/KubernetesSecurityGroupProvider.groovy b/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/view/KubernetesV1SecurityGroupProvider.groovy similarity index 67% rename from clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/view/KubernetesSecurityGroupProvider.groovy rename to clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/view/KubernetesV1SecurityGroupProvider.groovy index 925296dfcff..1f9ef708d29 100644 --- a/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/view/KubernetesSecurityGroupProvider.groovy +++ b/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/view/KubernetesV1SecurityGroupProvider.groovy @@ -20,7 +20,7 @@ import com.fasterxml.jackson.databind.ObjectMapper import com.netflix.spinnaker.cats.cache.Cache import com.netflix.spinnaker.cats.cache.CacheData import com.netflix.spinnaker.clouddriver.kubernetes.KubernetesCloudProvider -import com.netflix.spinnaker.clouddriver.kubernetes.v1.model.KubernetesSecurityGroup +import com.netflix.spinnaker.clouddriver.kubernetes.v1.model.KubernetesV1SecurityGroup import com.netflix.spinnaker.clouddriver.kubernetes.v1.caching.Keys import com.netflix.spinnaker.clouddriver.model.SecurityGroupProvider import io.fabric8.kubernetes.api.model.extensions.Ingress @@ -28,58 +28,58 @@ import org.springframework.beans.factory.annotation.Autowired import org.springframework.stereotype.Component @Component -class KubernetesSecurityGroupProvider implements SecurityGroupProvider { +class KubernetesV1SecurityGroupProvider implements SecurityGroupProvider { final String cloudProvider = KubernetesCloudProvider.ID private final Cache cacheView private final ObjectMapper objectMapper @Autowired - KubernetesSecurityGroupProvider(Cache cacheView, ObjectMapper objectMapper) { + KubernetesV1SecurityGroupProvider(Cache cacheView, ObjectMapper objectMapper) { this.cacheView = cacheView this.objectMapper = objectMapper } @Override - Set getAll(boolean includeRules) { + Set getAll(boolean includeRules) { lookup("*", "*", "*", includeRules) } @Override - Set getAllByRegion(boolean includeRules, String namespace) { + Set getAllByRegion(boolean includeRules, String namespace) { lookup("*", namespace, "*", includeRules) } @Override - Set getAllByAccount(boolean includeRules, String account) { + Set getAllByAccount(boolean includeRules, String account) { lookup(account, "*", "*", includeRules) } @Override - Set getAllByAccountAndName(boolean includeRules, String account, String name) { + Set getAllByAccountAndName(boolean includeRules, String account, String name) { lookup(account, "*", name, includeRules) } @Override - Set getAllByAccountAndRegion(boolean includeRules, String account, String namespace) { + Set getAllByAccountAndRegion(boolean includeRules, String account, String namespace) { lookup(account, namespace, "*", includeRules) } @Override - KubernetesSecurityGroup get(String account, String namespace, String name, String vpcId) { + KubernetesV1SecurityGroup get(String account, String namespace, String name, String vpcId) { lookup(account, namespace, name, true).getAt(0) } - Set lookup(String account, String namespace, String name, boolean includeRule) { + Set lookup(String account, String namespace, String name, boolean includeRule) { def keys = cacheView.filterIdentifiers(Keys.Namespace.SECURITY_GROUPS.ns, Keys.getSecurityGroupKey(account, namespace, name)) cacheView.getAll(Keys.Namespace.SECURITY_GROUPS.ns, keys).collect { translateSecurityGroup(it, includeRule) } } - public KubernetesSecurityGroup translateSecurityGroup(CacheData securityGroupEntry, boolean includeRule) { + public KubernetesV1SecurityGroup translateSecurityGroup(CacheData securityGroupEntry, boolean includeRule) { def parts = Keys.parse(securityGroupEntry.id) Ingress ingress = objectMapper.convertValue(securityGroupEntry.attributes.ingress, Ingress) - return new KubernetesSecurityGroup(parts.application, parts.account, ingress, includeRule) + return new KubernetesV1SecurityGroup(parts.application, parts.account, ingress, includeRule) } } diff --git a/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v2/caching/view/model/KubernetesV2SecurityGroup.java b/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v2/caching/view/model/KubernetesV2SecurityGroup.java new file mode 100644 index 00000000000..7213cac9227 --- /dev/null +++ b/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v2/caching/view/model/KubernetesV2SecurityGroup.java @@ -0,0 +1,160 @@ +/* + * Copyright 2017 Google, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package com.netflix.spinnaker.clouddriver.kubernetes.v2.caching.view.model; + +import com.netflix.spinnaker.cats.cache.CacheData; +import com.netflix.spinnaker.clouddriver.kubernetes.v2.caching.Keys; +import com.netflix.spinnaker.clouddriver.kubernetes.v2.caching.agent.KubernetesCacheDataConverter; +import com.netflix.spinnaker.clouddriver.kubernetes.v2.description.manifest.KubernetesKind; +import com.netflix.spinnaker.clouddriver.kubernetes.v2.description.manifest.KubernetesManifest; +import com.netflix.spinnaker.clouddriver.model.SecurityGroup; +import com.netflix.spinnaker.clouddriver.model.SecurityGroupSummary; +import com.netflix.spinnaker.clouddriver.model.securitygroups.Rule; +import io.kubernetes.client.models.V1NetworkPolicy; +import io.kubernetes.client.models.V1NetworkPolicyPort; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; +import java.util.stream.Collectors; + +@EqualsAndHashCode(callSuper = true) +@Data +@Slf4j +public class KubernetesV2SecurityGroup extends ManifestBasedModel implements SecurityGroup { + KubernetesManifest manifest; + Keys.InfrastructureCacheKey key; + String id; + + @Override + public String getApplication() { + return getMoniker().getApp(); + } + + Set inboundRules; + Set outboundRules; + + @Override + public SecurityGroupSummary getSummary() { + return KubernetesV2SecurityGroupSummary.builder() + .id(id) + .name(id) + .build(); + } + + KubernetesV2SecurityGroup(KubernetesManifest manifest, String key, Set inboundRules, Set outboundRules) { + this.manifest = manifest; + this.id = manifest.getName(); + this.key = (Keys.InfrastructureCacheKey) Keys.parseKey(key).get(); + this.inboundRules = inboundRules; + this.outboundRules = outboundRules; + } + + public static KubernetesV2SecurityGroup fromCacheData(CacheData cd) { + if (cd == null) { + return null; + } + + KubernetesManifest manifest = KubernetesCacheDataConverter.getManifest(cd); + + if (manifest == null) { + log.warn("Cache data {} inserted without a manifest", cd.getId()); + return null; + } + + Set inboundRules = new HashSet<>(); + Set outboundRules = new HashSet<>(); + + if (manifest.getKind() != KubernetesKind.NETWORK_POLICY) { + log.warn("Unknown security group kind " + manifest.getKind()); + } else { + switch (manifest.getApiVersion()) { + case NETWORKING_K8S_IO_V1: + V1NetworkPolicy v1beta1NetworkPolicy = KubernetesCacheDataConverter.getResource(manifest, V1NetworkPolicy.class); + inboundRules = inboundRules(v1beta1NetworkPolicy); + outboundRules = outboundRules(v1beta1NetworkPolicy); + break; + default: + log.warn("Could not determine (in)/(out)bound rules for " + manifest.getName() + " at version " + manifest.getApiVersion()); + } + } + + return new KubernetesV2SecurityGroup(manifest, cd.getId(), inboundRules, outboundRules); + } + + private static Set inboundRules(V1NetworkPolicy policy) { + return policy.getSpec().getIngress().stream() + .map(i -> i.getPorts().stream().map(KubernetesV2SecurityGroup::fromPolicyPort)) + .flatMap(s -> s) + .collect(Collectors.toSet()); + } + + private static Set outboundRules(V1NetworkPolicy policy) { + return policy.getSpec().getEgress().stream() + .map(i -> i.getPorts().stream().map(KubernetesV2SecurityGroup::fromPolicyPort)) + .flatMap(s -> s) + .collect(Collectors.toSet()); + } + + private static Rule fromPolicyPort(V1NetworkPolicyPort policyPort) { + String port = policyPort.getPort(); + return new PortRule() + .setProtocol(policyPort.getProtocol()) + .setPortRanges(new TreeSet<>(Collections.singletonList(new StringPortRange(port)))); + } + + @Data + @NoArgsConstructor + @AllArgsConstructor + @Builder + private static class KubernetesV2SecurityGroupSummary implements SecurityGroupSummary { + String name; + String id; + } + + @Data + public static class PortRule implements Rule { + SortedSet portRanges; + String protocol; + } + + @Data + public static class StringPortRange extends Rule.PortRange { + protected String startPortName; + protected String endPortName; + StringPortRange(String port) { + Integer numPort; + try { + numPort = Integer.parseInt(port); + this.startPort = numPort; + this.endPort = numPort; + } catch (Exception e) { + this.startPortName = port; + this.endPortName = port; + } + } + } +} diff --git a/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v2/caching/view/provider/KubernetesV2SecurityGroupProvider.java b/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v2/caching/view/provider/KubernetesV2SecurityGroupProvider.java new file mode 100644 index 00000000000..60a4dab6203 --- /dev/null +++ b/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v2/caching/view/provider/KubernetesV2SecurityGroupProvider.java @@ -0,0 +1,128 @@ +/* + * Copyright 2017 Google, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package com.netflix.spinnaker.clouddriver.kubernetes.v2.caching.view.provider; + +import com.netflix.spinnaker.clouddriver.kubernetes.KubernetesCloudProvider; +import com.netflix.spinnaker.clouddriver.kubernetes.v2.caching.Keys; +import com.netflix.spinnaker.clouddriver.kubernetes.v2.caching.view.model.KubernetesV2SecurityGroup; +import com.netflix.spinnaker.clouddriver.kubernetes.v2.description.KubernetesSpinnakerKindMap; +import com.netflix.spinnaker.clouddriver.kubernetes.v2.description.manifest.KubernetesKind; +import com.netflix.spinnaker.clouddriver.model.SecurityGroupProvider; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.Collection; +import java.util.Objects; +import java.util.Set; +import java.util.stream.Collectors; + +@Component +@Slf4j +public class KubernetesV2SecurityGroupProvider implements SecurityGroupProvider { + private final KubernetesCacheUtils cacheUtils; + private final KubernetesSpinnakerKindMap kindMap; + + @Autowired + KubernetesV2SecurityGroupProvider(KubernetesCacheUtils cacheUtils, KubernetesSpinnakerKindMap kindMap) { + this.cacheUtils = cacheUtils; + this.kindMap = kindMap; + } + + @Override + public String getCloudProvider() { + return KubernetesCloudProvider.getID(); + } + + @Override + public Set getAll(boolean includeRules) { + return kindMap.translateSpinnakerKind(KubernetesSpinnakerKindMap.SpinnakerKind.SECURITY_GROUP) + .stream() + .map(KubernetesKind::toString) + .map(cacheUtils::getAllKeys) + .flatMap(Collection::stream) + .map(KubernetesV2SecurityGroup::fromCacheData) + .collect(Collectors.toSet()); + } + + @Override + public Set getAllByRegion(boolean includeRules, String namespace) { + return kindMap.translateSpinnakerKind(KubernetesSpinnakerKindMap.SpinnakerKind.SECURITY_GROUP) + .stream() + .map(k -> { + String key = Keys.infrastructure(k, "*", namespace, "*"); + return cacheUtils.getAllDataMatchingPattern(k.toString(), key); + }) + .flatMap(Collection::stream) + .map(KubernetesV2SecurityGroup::fromCacheData) + .collect(Collectors.toSet()); + } + + @Override + public Set getAllByAccount(boolean includeRules, String account) { + return kindMap.translateSpinnakerKind(KubernetesSpinnakerKindMap.SpinnakerKind.SECURITY_GROUP) + .stream() + .map(k -> { + String key = Keys.infrastructure(k, account, "*", "*"); + return cacheUtils.getAllDataMatchingPattern(k.toString(), key); + }) + .flatMap(Collection::stream) + .map(KubernetesV2SecurityGroup::fromCacheData) + .collect(Collectors.toSet()); + } + + @Override + public Set getAllByAccountAndName(boolean includeRules, String account, String name) { + return kindMap.translateSpinnakerKind(KubernetesSpinnakerKindMap.SpinnakerKind.SECURITY_GROUP) + .stream() + .map(k -> { + String key = Keys.infrastructure(k, account, "*", name); + return cacheUtils.getAllDataMatchingPattern(k.toString(), key); + }) + .flatMap(Collection::stream) + .map(KubernetesV2SecurityGroup::fromCacheData) + .collect(Collectors.toSet()); + } + + @Override + public Set getAllByAccountAndRegion(boolean includeRule, String account, String namespace) { + return kindMap.translateSpinnakerKind(KubernetesSpinnakerKindMap.SpinnakerKind.SECURITY_GROUP) + .stream() + .map(k -> { + String key = Keys.infrastructure(k, account, namespace, "*"); + return cacheUtils.getAllDataMatchingPattern(k.toString(), key); + }) + .flatMap(Collection::stream) + .map(KubernetesV2SecurityGroup::fromCacheData) + .collect(Collectors.toSet()); + } + + @Override + public KubernetesV2SecurityGroup get(String account, String namespace, String name, String _unused) { + return kindMap.translateSpinnakerKind(KubernetesSpinnakerKindMap.SpinnakerKind.SECURITY_GROUP) + .stream() + .map(k -> { + String key = Keys.infrastructure(k, account, namespace, name); + return cacheUtils.getSingleEntry(k.toString(), key).orElse(null); + }) + .filter(Objects::nonNull) + .map(KubernetesV2SecurityGroup::fromCacheData) + .findFirst() + .orElse(null); + } +} diff --git a/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v2/description/manifest/KubernetesApiVersion.java b/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v2/description/manifest/KubernetesApiVersion.java index 5a46afd9f5b..794c729078a 100644 --- a/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v2/description/manifest/KubernetesApiVersion.java +++ b/clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v2/description/manifest/KubernetesApiVersion.java @@ -24,9 +24,10 @@ public enum KubernetesApiVersion { V1("v1"), - EXTENSIONS_V1BETA1("extensions.v1beta1"), - APPS_V1BETA1("apps.v1beta1"), - APPS_V1BETA2("apps.v1beta2"); + EXTENSIONS_V1BETA1("extensions/v1beta1"), + NETWORKING_K8S_IO_V1("network.k8s.io/v1"), + APPS_V1BETA1("apps/v1beta1"), + APPS_V1BETA2("apps/v1beta2"); private final String name; @@ -42,9 +43,8 @@ public String toString() { @JsonCreator public static KubernetesApiVersion fromString(String name) { - String replacedName = name.replace("/", "."); return Arrays.stream(values()) - .filter(v -> v.toString().equalsIgnoreCase(replacedName)) + .filter(v -> v.toString().equalsIgnoreCase(name)) .findAny() .orElseThrow(() -> new IllegalArgumentException("API version " + name + " is not yet supported.")); } diff --git a/clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/deploy/ops/securitygroup/UpsertKubernetesSecurityGroupAtomicOperationSpec.groovy b/clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/deploy/ops/securitygroup/UpsertKubernetesV1SecurityGroupAtomicOperationSpec.groovy similarity index 98% rename from clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/deploy/ops/securitygroup/UpsertKubernetesSecurityGroupAtomicOperationSpec.groovy rename to clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/deploy/ops/securitygroup/UpsertKubernetesV1SecurityGroupAtomicOperationSpec.groovy index 54edcd1dc2c..fdcb5736312 100644 --- a/clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/deploy/ops/securitygroup/UpsertKubernetesSecurityGroupAtomicOperationSpec.groovy +++ b/clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/deploy/ops/securitygroup/UpsertKubernetesV1SecurityGroupAtomicOperationSpec.groovy @@ -31,7 +31,7 @@ import io.fabric8.kubernetes.api.model.extensions.IngressTLS import spock.lang.Specification import spock.lang.Subject -class UpsertKubernetesSecurityGroupAtomicOperationSpec extends Specification { +class UpsertKubernetesV1SecurityGroupAtomicOperationSpec extends Specification { final static List NAMESPACES = ['default', 'prod'] final static String NAMESPACE = 'prod' final static String INGRESS_NAME = "fooingress" diff --git a/clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/agent/KubernetesSecurityGroupCachingAgentSpec.groovy b/clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/agent/KubernetesV1SecurityGroupCachingAgentSpec.groovy similarity index 97% rename from clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/agent/KubernetesSecurityGroupCachingAgentSpec.groovy rename to clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/agent/KubernetesV1SecurityGroupCachingAgentSpec.groovy index be582944939..1eb71d72695 100644 --- a/clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/agent/KubernetesSecurityGroupCachingAgentSpec.groovy +++ b/clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v1/provider/agent/KubernetesV1SecurityGroupCachingAgentSpec.groovy @@ -28,7 +28,7 @@ import com.netflix.spinnaker.clouddriver.security.AccountCredentialsRepository import spock.lang.Specification import spock.lang.Unroll -class KubernetesSecurityGroupCachingAgentSpec extends Specification { +class KubernetesV1SecurityGroupCachingAgentSpec extends Specification { static final private String NAMESPACE = "default" static final private String ACCOUNT_NAME = "account1"