Skip to content

Commit

Permalink
fix panic (micro#1348)
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Mar 14, 2020
1 parent 609f482 commit 0449138
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runtime/kubernetes/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ func newService(s *runtime.Service, c runtime.CreateOptions) *service {
kdeploy.Spec.Template.Metadata.Annotations = make(map[string]string)
}

// create if non existent
if s.Metadata == nil {
s.Metadata = make(map[string]string)
}

// add the service metadata to the k8s labels, do this first so we
// don't override any labels used by the runtime, e.g. name
for k, v := range s.Metadata {
Expand Down

0 comments on commit 0449138

Please sign in to comment.