Skip to content

InitContainers dont work by default when moving from unversioned client to client-go #142

Closed
@krmayankk

Description

@krmayankk
  • I was Migrating an app using Init Containers from unversioned client to client-go
  • All i needed to do in the unversioned client, was populate api.Container into InitContainers field of the PodSpec.
  • the migrated app stopped working in client-go.
  • i had to explictily enable serialization to annotations to make the init containers work in client-go.

I think that is a bad user experience. By default Init Containers or any other alpha feature should work, without requiring any special serialization.

I had to call the following function to make this work https://github.com/kubernetes/kubernetes/blob/master/pkg/api/v1/pod/util.go#L91
which is not part of the client-go code. So i had to duplicate that in my app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions