feat(kubernetes): add apiVersion, displayName, and namespace to ManifestBasedModel
Deck expects instances, serverGroups, serverGroupManagers, securityGroups, and loadBalancers to each include these four properties. Currently, Deck is combining data returned from each view with data returned from each manifest. Instead, let's just include these properties in each view.
MODIFY
clouddriver-kubernetes/src/main/java/com/netflix/spinnaker/clouddriver/kubernetes/caching/view/model/ManifestBasedModel.java
clouddriver-kubernetes/src/main/java/com/netflix/spinnaker/clouddriver/kubernetes/caching/view/model/ManifestBasedModel.java
@@ -36,6 +36,18 @@ public abstract class ManifestBasedModel {
return getManifest().getFullResourceName();
}
+ public String getDisplayName() {
+ return getManifest().getName();
+ }
+
+ public String getApiVersion() {
+ return getManifest().getApiVersion().toString();
+ }
+
+ public String getNamespace() {
+ return getManifest().getNamespace();
+ }
+
// Spinnaker namespace hacks
public String getZone() {
return getManifest().getNamespace();

feat(kubernetes): add apiVersion, displayName, and namespace to ManifestBasedModel (#4765)

Deck expects instances, serverGroups, serverGroupManagers, securityGroups, and loadBalancers to each include these four properties. Currently, Deck is combining data returned from each view with data returned from each manifest. Instead, let's just include these properties in each view.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>