Skip to content

Commit

Permalink
feat(gce): add partnerMetadata in instanceProperties for GCE deployme…
Browse files Browse the repository at this point in the history
…nt (#6297)

* feat(gce): add partner metadata in instanceProperties

* feat(gce): format instanceProperties
  • Loading branch information
edgarulg authored Oct 17, 2024
1 parent f9afff4 commit aab2a60
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.netflix.spinnaker.clouddriver.google.deploy.description

import com.google.api.services.compute.model.StructuredEntries
import com.netflix.spinnaker.clouddriver.google.model.GoogleDisk
import com.netflix.spinnaker.clouddriver.google.model.GoogleLabeledResource
import com.netflix.spinnaker.kork.artifacts.model.Artifact
Expand Down Expand Up @@ -69,6 +70,7 @@ class BaseGoogleInstanceDescription extends AbstractGoogleCredentialsDescription
String accountName

Map<String, String> resourceManagerTags
Map<String, StructuredEntries> partnerMetadata

// The source of the image to deploy
// ARTIFACT: An artifact of type gce/image stored in imageArtifact
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,17 +416,20 @@ class BasicGoogleDeployHandler implements DeployHandler<BasicGoogleDeployDescrip
"Accelerators are only supported with regional server groups if the zones are specified by the user.");
}

def instanceProperties = new InstanceProperties(machineType: machineTypeName,
disks: attachedDisks,
guestAccelerators: description.acceleratorConfigs ?: [],
networkInterfaces: [networkInterface],
canIpForward: canIpForward,
metadata: metadata,
tags: tags,
labels: labels,
scheduling: scheduling,
serviceAccounts: serviceAccount,
resourceManagerTags: description.resourceManagerTags,)
def instanceProperties = new InstanceProperties(
machineType: machineTypeName,
disks: attachedDisks,
guestAccelerators: description.acceleratorConfigs ?: [],
networkInterfaces: [networkInterface],
canIpForward: canIpForward,
metadata: metadata,
tags: tags,
labels: labels,
scheduling: scheduling,
serviceAccounts: serviceAccount,
resourceManagerTags: description.resourceManagerTags,
partnerMetadata: description.partnerMetadata,
)

if (GCEUtil.isShieldedVmCompatible(bootImage)) {
def shieldedVmConfig = GCEUtil.buildShieldedVmConfig(description)
Expand Down

0 comments on commit aab2a60

Please sign in to comment.