atlassian / smith

Smith is a Kubernetes workflow engine / resource manager
Apache License 2.0
285 stars 24 forks source link

Fix cleanup function for Deployment #285

Closed ash2k closed 6 years ago

ash2k commented 6 years ago
Objects are different after specification re-check:

object[metadata][finalizers]:
  a: []interface {}{}
  b: <nil>
object[metadata][labels]:
  a: map[string]interface {}{}
  b: <nil>
object[spec][template][spec][containers][0][imagePullPolicy]:
  a: <nil>
  b: "IfNotPresent"
object[spec][template][spec][containers][0][terminationMessagePath]:
  a: <nil>
  b: "/dev/termination-log"
object[spec][template][spec][containers][0][terminationMessagePolicy]:
  a: <nil>
  b: "File"
object[status]:
  a: <nil>
  b: map[string]interface {}{"observedGeneration":1, "unavailableReplicas":3, "c
ash2k commented 6 years ago

It is impossible to fix this issue generically because defaulting is done server side. Waiting for server side apply to properly do this. For now the workaround is to specify all the fields explicitly.