Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(provider/kubernetes): Do not raise exception for named port in tcpSocket probes #2619

Merged
merged 3 commits into from
May 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,11 @@ class KubernetesClientApiConverter {
}

def kubernetesTcpSocketAction = new KubernetesTcpSocketAction()
kubernetesTcpSocketAction.port = tcpSocket.port.toInteger() ?: 0
try {
kubernetesTcpSocketAction.port = tcpSocket.port.toInteger() ?: 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you try to use the Spinnaker UI to clone a server group that uses a named port?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried the behavior with the below steps,

  1. Deploy ReplicaSet (new server group) with named ports
  2. Clone created server group to new one

then confirmed that all named ports were cloned properly with name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet!

} catch (NumberFormatException ex) {
log.warn "Port number is not Integer", ex
}
return kubernetesTcpSocketAction
}

Expand Down