From c863dbabf7d84bba8c1eeb27a547632ba4901ad3 Mon Sep 17 00:00:00 2001 From: Simon Ferquel Date: Wed, 16 Jan 2019 12:56:15 +0100 Subject: [PATCH] Vendoring update for v1alpha3 Signed-off-by: Simon Ferquel --- vendor.conf | 2 +- .../docker/compose-on-kubernetes/README.md | 2 + .../docker/compose-on-kubernetes/api/check.go | 55 - .../api/client/clientset/clientset.go | 23 + .../api/client/clientset/scheme/register.go | 2 + .../typed/compose/v1alpha3/compose_client.go | 74 ++ .../clientset/typed/compose/v1alpha3/stack.go | 172 +++ .../api/client/informers/compose/interface.go | 7 + .../informers/compose/v1alpha3/interface.go | 25 + .../informers/compose/v1alpha3/stack.go | 51 + .../api/client/informers/generic.go | 4 +- .../compose/v1alpha3/expansion_generated.go | 9 + .../client/listers/compose/v1alpha3/stack.go | 78 ++ .../v1alpha3/composefile_stack_types.go | 26 + .../compose/v1alpha3/conversion_generated.go | 1158 +++++++++++++++++ .../compose/v1alpha3/deepcopy_generated.go | 660 ++++++++++ .../api/compose/v1alpha3/doc.go | 8 + .../api/compose/v1alpha3/owner.go | 30 + .../api/compose/v1alpha3/register.go | 42 + .../api/compose/v1alpha3/scale.go | 29 + .../api/compose/v1alpha3/stack.go | 270 ++++ 21 files changed, 2670 insertions(+), 57 deletions(-) delete mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/check.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1alpha3/compose_client.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1alpha3/stack.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/client/informers/compose/v1alpha3/interface.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/client/informers/compose/v1alpha3/stack.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/client/listers/compose/v1alpha3/expansion_generated.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/client/listers/compose/v1alpha3/stack.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/composefile_stack_types.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/conversion_generated.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/deepcopy_generated.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/doc.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/owner.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/register.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/scale.go create mode 100644 vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/stack.go diff --git a/vendor.conf b/vendor.conf index 73e1fe0bad..d026a893f9 100755 --- a/vendor.conf +++ b/vendor.conf @@ -14,7 +14,7 @@ github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76 # v1.1.0 github.com/dgrijalva/jwt-go a2c85815a77d0f951e33ba4db5ae93629a1530af github.com/docker/distribution 83389a148052d74ac602f5f1d62f86ff2f3c4aa5 github.com/docker/docker f76d6a078d881f410c00e8d900dcdfc2e026c841 -github.com/docker/compose-on-kubernetes a6086e2369e39c2058a003a7eb42e567ecfd1f03 # v0.4.17 +github.com/docker/compose-on-kubernetes 1559927c6b456d56cc9c9b05438252ebb646640b # master w/ v1alpha3 github.com/docker/docker-credential-helpers 5241b46610f2491efdf9d1c85f1ddf5b02f6d962 # the docker/go package contains a customized version of canonical/json # and is used by Notary. The package is periodically rebased on current Go versions. diff --git a/vendor/github.com/docker/compose-on-kubernetes/README.md b/vendor/github.com/docker/compose-on-kubernetes/README.md index 683fae428d..39c7087b22 100644 --- a/vendor/github.com/docker/compose-on-kubernetes/README.md +++ b/vendor/github.com/docker/compose-on-kubernetes/README.md @@ -185,3 +185,5 @@ See the [contributing](./CONTRIBUTING.md) and [debugging](./DEBUGGING.md) guides # Deploying Compose on Kubernetes - Guide for [Azure AKS](./docs/install-on-aks.md). +- Guide for [GKE](./docs/install-on-gke.md). +- Guide for [Minikube](./docs/install-on-minikube.md). diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/check.go b/vendor/github.com/docker/compose-on-kubernetes/api/check.go deleted file mode 100644 index ad36159426..0000000000 --- a/vendor/github.com/docker/compose-on-kubernetes/api/check.go +++ /dev/null @@ -1,55 +0,0 @@ -package apis - -import ( - apiv1beta1 "github.com/docker/compose-on-kubernetes/api/compose/v1beta1" - apiv1beta2 "github.com/docker/compose-on-kubernetes/api/compose/v1beta2" - "github.com/pkg/errors" - apimachinerymetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/kubernetes" -) - -// StackVersion represents the detected Compose Component on Kubernetes side. -type StackVersion string - -const ( - // StackAPIV1Beta1 is returned if it's the most recent version available. - StackAPIV1Beta1 = StackVersion("v1beta1") - // StackAPIV1Beta2 is returned if it's the most recent version available. - StackAPIV1Beta2 = StackVersion("v1beta2") -) - -// GetStackAPIVersion returns the most recent stack API installed. -func GetStackAPIVersion(clientSet *kubernetes.Clientset) (StackVersion, error) { - groups, err := clientSet.Discovery().ServerGroups() - if err != nil { - return "", err - } - - return getAPIVersion(groups) -} - -func getAPIVersion(groups *metav1.APIGroupList) (StackVersion, error) { - switch { - case findVersion(apiv1beta2.SchemeGroupVersion, groups.Groups): - return StackAPIV1Beta2, nil - case findVersion(apiv1beta1.SchemeGroupVersion, groups.Groups): - return StackAPIV1Beta1, nil - default: - return "", errors.Errorf("failed to find a Stack API version") - } -} - -func findVersion(stackAPI schema.GroupVersion, groups []apimachinerymetav1.APIGroup) bool { - for _, group := range groups { - if group.Name == stackAPI.Group { - for _, version := range group.Versions { - if version.Version == stackAPI.Version { - return true - } - } - } - } - return false -} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/clientset.go b/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/clientset.go index 65e8d4fab3..80bccc0104 100644 --- a/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/clientset.go +++ b/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/clientset.go @@ -1,6 +1,7 @@ package clientset import ( + composev1alpha3 "github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1alpha3" composev1beta1 "github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1beta1" composev1beta2 "github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1beta2" glog "github.com/golang/glog" @@ -13,20 +14,36 @@ import ( // FIXME(vdemeester) is it required ? type Interface interface { Discovery() discovery.DiscoveryInterface + ComposeV1alpha3() composev1alpha3.ComposeV1alpha3Interface ComposeV1beta2() composev1beta2.ComposeV1beta2Interface ComposeV1beta1() composev1beta1.ComposeV1beta1Interface // Deprecated: please explicitly pick a version if possible. Compose() composev1beta1.ComposeV1beta1Interface + ComposeLatest() composev1alpha3.ComposeV1alpha3Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient + *composev1alpha3.ComposeV1alpha3Client *composev1beta2.ComposeV1beta2Client *composev1beta1.ComposeV1beta1Client } +// ComposeV1alpha3 retrieves the ComposeV1alpha3Client +func (c *Clientset) ComposeV1alpha3() composev1alpha3.ComposeV1alpha3Interface { + if c == nil { + return nil + } + return c.ComposeV1alpha3Client +} + +// ComposeLatest retrieves the latest version of the client +func (c *Clientset) ComposeLatest() composev1alpha3.ComposeV1alpha3Interface { + return c.ComposeV1alpha3() +} + // ComposeV1beta2 retrieves the ComposeV1beta2Client func (c *Clientset) ComposeV1beta2() composev1beta2.ComposeV1beta2Interface { if c == nil { @@ -68,6 +85,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { } var cs Clientset var err error + cs.ComposeV1alpha3Client, err = composev1alpha3.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.ComposeV1beta2Client, err = composev1beta2.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -89,6 +110,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { // panics if there is an error in the config. func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset + cs.ComposeV1alpha3Client = composev1alpha3.NewForConfigOrDie(c) cs.ComposeV1beta2Client = composev1beta2.NewForConfigOrDie(c) cs.ComposeV1beta1Client = composev1beta1.NewForConfigOrDie(c) @@ -99,6 +121,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset + cs.ComposeV1alpha3Client = composev1alpha3.New(c) cs.ComposeV1beta2Client = composev1beta2.New(c) cs.ComposeV1beta1Client = composev1beta1.New(c) diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/scheme/register.go b/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/scheme/register.go index 2b045a6fd1..8138333834 100644 --- a/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/scheme/register.go +++ b/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/scheme/register.go @@ -1,6 +1,7 @@ package scheme import ( + composev1alpha3 "github.com/docker/compose-on-kubernetes/api/compose/v1alpha3" composev1beta1 "github.com/docker/compose-on-kubernetes/api/compose/v1beta1" composev1beta2 "github.com/docker/compose-on-kubernetes/api/compose/v1beta2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -39,6 +40,7 @@ func init() { // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. func AddToScheme(scheme *runtime.Scheme) { + composev1alpha3.AddToScheme(scheme) composev1beta2.AddToScheme(scheme) composev1beta1.AddToScheme(scheme) diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1alpha3/compose_client.go b/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1alpha3/compose_client.go new file mode 100644 index 0000000000..6bda71f087 --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1alpha3/compose_client.go @@ -0,0 +1,74 @@ +package v1alpha3 + +import ( + "github.com/docker/compose-on-kubernetes/api/client/clientset/scheme" + v1alpha3 "github.com/docker/compose-on-kubernetes/api/compose/v1alpha3" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" +) + +// ComposeV1alpha3Interface defines the methods a compose v1alpha3 client has +type ComposeV1alpha3Interface interface { + RESTClient() rest.Interface + StacksGetter +} + +// ComposeV1alpha3Client is used to interact with features provided by the compose.docker.com group. +type ComposeV1alpha3Client struct { + restClient rest.Interface +} + +// Stacks returns a stack client +func (c *ComposeV1alpha3Client) Stacks(namespace string) StackInterface { + return newStacks(c, namespace) +} + +// NewForConfig creates a new ComposeV1alpha3Client for the given config. +func NewForConfig(c *rest.Config) (*ComposeV1alpha3Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &ComposeV1alpha3Client{client}, nil +} + +// NewForConfigOrDie creates a new ComposeV1alpha3Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ComposeV1alpha3Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new ComposeV1alpha3Client for the given RESTClient. +func New(c rest.Interface) *ComposeV1alpha3Client { + return &ComposeV1alpha3Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha3.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *ComposeV1alpha3Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1alpha3/stack.go b/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1alpha3/stack.go new file mode 100644 index 0000000000..2de253b9d5 --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1alpha3/stack.go @@ -0,0 +1,172 @@ +package v1alpha3 + +import ( + scheme "github.com/docker/compose-on-kubernetes/api/client/clientset/scheme" + v1alpha3 "github.com/docker/compose-on-kubernetes/api/compose/v1alpha3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// StacksGetter has a method to return a StackInterface. +// A group's client should implement this interface. +type StacksGetter interface { + Stacks(namespace string) StackInterface +} + +// StackInterface has methods to work with Stack resources. +type StackInterface interface { + Create(*v1alpha3.Stack) (*v1alpha3.Stack, error) + Update(*v1alpha3.Stack) (*v1alpha3.Stack, error) + UpdateStatus(*v1alpha3.Stack) (*v1alpha3.Stack, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha3.Stack, error) + List(opts v1.ListOptions) (*v1alpha3.StackList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v1alpha3.Stack, error) + WithSkipValidation() StackInterface +} + +// stacks implements StackInterface +type stacks struct { + skipValidation bool + client rest.Interface + ns string +} + +// newStacks returns a Stacks +func newStacks(c *ComposeV1alpha3Client, namespace string) *stacks { + return &stacks{ + client: c.RESTClient(), + ns: namespace, + } +} + +func (c *stacks) handleSkipValidation(req *rest.Request) *rest.Request { + if !c.skipValidation { + return req + } + return req.Param("skip-validation", "1") +} + +// Create takes the representation of a stack and creates it. Returns the server's representation of the stack, and an error, if there is any. +func (c *stacks) Create(stack *v1alpha3.Stack) (*v1alpha3.Stack, error) { + result := &v1alpha3.Stack{} + err := c.handleSkipValidation(c.client.Post(). + Namespace(c.ns). + Resource("stacks"). + Body(stack)). + Do(). + Into(result) + return result, err +} + +// Update takes the representation of a stack and updates it. Returns the server's representation of the stack, and an error, if there is any. +func (c *stacks) Update(stack *v1alpha3.Stack) (*v1alpha3.Stack, error) { + result := &v1alpha3.Stack{} + err := c.handleSkipValidation(c.client.Put(). + Namespace(c.ns). + Resource("stacks"). + Name(stack.Name). + Body(stack)). + Do(). + Into(result) + return result, err +} + +// UpdateStatus was generated because the type contains a Status member. + +func (c *stacks) UpdateStatus(stack *v1alpha3.Stack) (*v1alpha3.Stack, error) { + result := &v1alpha3.Stack{} + err := c.handleSkipValidation(c.client.Put(). + Namespace(c.ns). + Resource("stacks"). + Name(stack.Name). + SubResource("status"). + Body(stack)). + Do(). + Into(result) + return result, err +} + +// Delete takes name of the stack and deletes it. Returns an error if one occurs. +func (c *stacks) Delete(name string, options *v1.DeleteOptions) error { + return c.handleSkipValidation(c.client.Delete(). + Namespace(c.ns). + Resource("stacks"). + Name(name). + Body(options)). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *stacks) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.handleSkipValidation(c.client.Delete(). + Namespace(c.ns). + Resource("stacks"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options)). + Do(). + Error() +} + +// Get takes name of the stack, and returns the corresponding stack object, and an error if there is any. +func (c *stacks) Get(name string, options v1.GetOptions) (*v1alpha3.Stack, error) { + result := &v1alpha3.Stack{} + err := c.client.Get(). + Namespace(c.ns). + Resource("stacks"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return result, err +} + +// List takes label and field selectors, and returns the list of Stacks that match those selectors. +func (c *stacks) List(opts v1.ListOptions) (*v1alpha3.StackList, error) { + result := &v1alpha3.StackList{} + err := c.client.Get(). + Namespace(c.ns). + Resource("stacks"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return result, err +} + +// Watch returns a watch.Interface that watches the requested stacks. +func (c *stacks) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("stacks"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched stack. +func (c *stacks) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v1alpha3.Stack, error) { + result := &v1alpha3.Stack{} + err := c.handleSkipValidation(c.client.Patch(pt). + Namespace(c.ns). + Resource("stacks"). + SubResource(subresources...). + Name(name). + Body(data)). + Do(). + Into(result) + return result, err +} + +// WithSkipValidation creates a new Stack Client interface with validation disabled +func (c *stacks) WithSkipValidation() StackInterface { + return &stacks{ + skipValidation: true, + client: c.client, + ns: c.ns, + } +} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/compose/interface.go b/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/compose/interface.go index d44d1c0db5..f99a8a21ff 100644 --- a/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/compose/interface.go +++ b/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/compose/interface.go @@ -1,6 +1,7 @@ package compose import ( + "github.com/docker/compose-on-kubernetes/api/client/informers/compose/v1alpha3" "github.com/docker/compose-on-kubernetes/api/client/informers/compose/v1beta2" "github.com/docker/compose-on-kubernetes/api/client/informers/internalinterfaces" ) @@ -8,6 +9,7 @@ import ( // Interface provides access to each of this group's versions. type Interface interface { V1beta2() v1beta2.Interface + V1alpha3() v1alpha3.Interface } type group struct { @@ -23,3 +25,8 @@ func New(f internalinterfaces.SharedInformerFactory) Interface { func (g *group) V1beta2() v1beta2.Interface { return v1beta2.New(g.SharedInformerFactory) } + +// V1alpha3 returns a new V1alpha3.Interface. +func (g *group) V1alpha3() v1alpha3.Interface { + return v1alpha3.New(g.SharedInformerFactory) +} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/compose/v1alpha3/interface.go b/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/compose/v1alpha3/interface.go new file mode 100644 index 0000000000..d2d84f0be9 --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/compose/v1alpha3/interface.go @@ -0,0 +1,25 @@ +package v1alpha3 + +import ( + "github.com/docker/compose-on-kubernetes/api/client/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // Stacks returns a StackInformer. + Stacks() StackInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// Stacks returns a StackInformer. +func (v *version) Stacks() StackInformer { + return &stackInformer{factory: v.SharedInformerFactory} +} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/compose/v1alpha3/stack.go b/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/compose/v1alpha3/stack.go new file mode 100644 index 0000000000..31d3a30f5c --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/compose/v1alpha3/stack.go @@ -0,0 +1,51 @@ +package v1alpha3 + +import ( + "time" + + "github.com/docker/compose-on-kubernetes/api/client/clientset" + "github.com/docker/compose-on-kubernetes/api/client/informers/internalinterfaces" + "github.com/docker/compose-on-kubernetes/api/client/listers/compose/v1alpha3" + compose_v1alpha3 "github.com/docker/compose-on-kubernetes/api/compose/v1alpha3" + "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +// StackInformer provides access to a shared informer and lister for +// Stacks. +type StackInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha3.StackLister +} + +type stackInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newStackInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.ComposeV1alpha3().Stacks(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.ComposeV1alpha3().Stacks(v1.NamespaceAll).Watch(options) + }, + }, + &compose_v1alpha3.Stack{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *stackInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&compose_v1alpha3.Stack{}, newStackInformer) +} + +func (f *stackInformer) Lister() v1alpha3.StackLister { + return v1alpha3.NewStackLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/generic.go b/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/generic.go index 0605565786..494ef070f3 100644 --- a/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/generic.go +++ b/vendor/github.com/docker/compose-on-kubernetes/api/client/informers/generic.go @@ -3,6 +3,7 @@ package informers import ( "fmt" + "github.com/docker/compose-on-kubernetes/api/compose/v1alpha3" "github.com/docker/compose-on-kubernetes/api/compose/v1beta2" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/tools/cache" @@ -37,7 +38,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=Compose, Version=V1beta1 case v1beta2.SchemeGroupVersion.WithResource("stacks"): return &genericInformer{resource: resource.GroupResource(), informer: f.Compose().V1beta2().Stacks().Informer()}, nil - + case v1alpha3.SchemeGroupVersion.WithResource("stacks"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Compose().V1alpha3().Stacks().Informer()}, nil } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/client/listers/compose/v1alpha3/expansion_generated.go b/vendor/github.com/docker/compose-on-kubernetes/api/client/listers/compose/v1alpha3/expansion_generated.go new file mode 100644 index 0000000000..fa6a7b24ac --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/client/listers/compose/v1alpha3/expansion_generated.go @@ -0,0 +1,9 @@ +package v1alpha3 + +// StackListerExpansion allows custom methods to be added to +// StackLister. +type StackListerExpansion interface{} + +// StackNamespaceListerExpansion allows custom methods to be added to +// StackNamespaceLister. +type StackNamespaceListerExpansion interface{} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/client/listers/compose/v1alpha3/stack.go b/vendor/github.com/docker/compose-on-kubernetes/api/client/listers/compose/v1alpha3/stack.go new file mode 100644 index 0000000000..8b681553c3 --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/client/listers/compose/v1alpha3/stack.go @@ -0,0 +1,78 @@ +package v1alpha3 + +import ( + "github.com/docker/compose-on-kubernetes/api/compose/v1alpha3" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// StackLister helps list Stacks. +type StackLister interface { + // List lists all Stacks in the indexer. + List(selector labels.Selector) ([]*v1alpha3.Stack, error) + // Stacks returns an object that can list and get Stacks. + Stacks(namespace string) StackNamespaceLister + StackListerExpansion +} + +// stackLister implements the StackLister interface. +type stackLister struct { + indexer cache.Indexer +} + +// NewStackLister returns a new StackLister. +func NewStackLister(indexer cache.Indexer) StackLister { + return &stackLister{indexer: indexer} +} + +// List lists all Stacks in the indexer. +func (s *stackLister) List(selector labels.Selector) ([]*v1alpha3.Stack, error) { + stacks := []*v1alpha3.Stack{} + err := cache.ListAll(s.indexer, selector, func(m interface{}) { + stacks = append(stacks, m.(*v1alpha3.Stack)) + }) + return stacks, err +} + +// Stacks returns an object that can list and get Stacks. +func (s *stackLister) Stacks(namespace string) StackNamespaceLister { + return stackNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// StackNamespaceLister helps list and get Stacks. +type StackNamespaceLister interface { + // List lists all Stacks in the indexer for a given namespace. + List(selector labels.Selector) ([]*v1alpha3.Stack, error) + // Get retrieves the Stack from the indexer for a given namespace and name. + Get(name string) (*v1alpha3.Stack, error) + StackNamespaceListerExpansion +} + +// stackNamespaceLister implements the StackNamespaceLister +// interface. +type stackNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Stacks in the indexer for a given namespace. +func (s stackNamespaceLister) List(selector labels.Selector) ([]*v1alpha3.Stack, error) { + stacks := []*v1alpha3.Stack{} + err := cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + stacks = append(stacks, m.(*v1alpha3.Stack)) + }) + return stacks, err +} + +// Get retrieves the Stack from the indexer for a given namespace and name. +func (s stackNamespaceLister) Get(name string) (*v1alpha3.Stack, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha3.GroupResource("stack"), name) + } + return obj.(*v1alpha3.Stack), nil +} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/composefile_stack_types.go b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/composefile_stack_types.go new file mode 100644 index 0000000000..8d03816a84 --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/composefile_stack_types.go @@ -0,0 +1,26 @@ +package v1alpha3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// ComposeFile is the content of a stack's compose file if any +type ComposeFile struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + ComposeFile string `json:"composeFile,omitempty"` +} + +func (c *ComposeFile) clone() *ComposeFile { + if c == nil { + return nil + } + res := *c + return &res +} + +// DeepCopyObject clones the ComposeFile +func (c *ComposeFile) DeepCopyObject() runtime.Object { + return c.clone() +} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/conversion_generated.go b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/conversion_generated.go new file mode 100644 index 0000000000..718aac8d8e --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/conversion_generated.go @@ -0,0 +1,1158 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha3 + +import ( + v1beta2 "github.com/docker/compose-on-kubernetes/api/compose/v1beta2" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1alpha3_ComposeFile_To_v1beta2_ComposeFile, + Convert_v1beta2_ComposeFile_To_v1alpha3_ComposeFile, + Convert_v1alpha3_ConfigObjConfig_To_v1beta2_ConfigObjConfig, + Convert_v1beta2_ConfigObjConfig_To_v1alpha3_ConfigObjConfig, + Convert_v1alpha3_Constraint_To_v1beta2_Constraint, + Convert_v1beta2_Constraint_To_v1alpha3_Constraint, + Convert_v1alpha3_Constraints_To_v1beta2_Constraints, + Convert_v1beta2_Constraints_To_v1alpha3_Constraints, + Convert_v1alpha3_DeployConfig_To_v1beta2_DeployConfig, + Convert_v1beta2_DeployConfig_To_v1alpha3_DeployConfig, + Convert_v1alpha3_External_To_v1beta2_External, + Convert_v1beta2_External_To_v1alpha3_External, + Convert_v1alpha3_FileObjectConfig_To_v1beta2_FileObjectConfig, + Convert_v1beta2_FileObjectConfig_To_v1alpha3_FileObjectConfig, + Convert_v1alpha3_FileReferenceConfig_To_v1beta2_FileReferenceConfig, + Convert_v1beta2_FileReferenceConfig_To_v1alpha3_FileReferenceConfig, + Convert_v1alpha3_HealthCheckConfig_To_v1beta2_HealthCheckConfig, + Convert_v1beta2_HealthCheckConfig_To_v1alpha3_HealthCheckConfig, + Convert_v1alpha3_Owner_To_v1beta2_Owner, + Convert_v1beta2_Owner_To_v1alpha3_Owner, + Convert_v1alpha3_Placement_To_v1beta2_Placement, + Convert_v1beta2_Placement_To_v1alpha3_Placement, + Convert_v1alpha3_Resource_To_v1beta2_Resource, + Convert_v1beta2_Resource_To_v1alpha3_Resource, + Convert_v1alpha3_Resources_To_v1beta2_Resources, + Convert_v1beta2_Resources_To_v1alpha3_Resources, + Convert_v1alpha3_RestartPolicy_To_v1beta2_RestartPolicy, + Convert_v1beta2_RestartPolicy_To_v1alpha3_RestartPolicy, + Convert_v1alpha3_Scale_To_v1beta2_Scale, + Convert_v1beta2_Scale_To_v1alpha3_Scale, + Convert_v1alpha3_SecretConfig_To_v1beta2_SecretConfig, + Convert_v1beta2_SecretConfig_To_v1alpha3_SecretConfig, + Convert_v1alpha3_ServiceConfig_To_v1beta2_ServiceConfig, + Convert_v1beta2_ServiceConfig_To_v1alpha3_ServiceConfig, + Convert_v1alpha3_ServiceConfigObjConfig_To_v1beta2_ServiceConfigObjConfig, + Convert_v1beta2_ServiceConfigObjConfig_To_v1alpha3_ServiceConfigObjConfig, + Convert_v1alpha3_ServicePortConfig_To_v1beta2_ServicePortConfig, + Convert_v1beta2_ServicePortConfig_To_v1alpha3_ServicePortConfig, + Convert_v1alpha3_ServiceSecretConfig_To_v1beta2_ServiceSecretConfig, + Convert_v1beta2_ServiceSecretConfig_To_v1alpha3_ServiceSecretConfig, + Convert_v1alpha3_ServiceVolumeConfig_To_v1beta2_ServiceVolumeConfig, + Convert_v1beta2_ServiceVolumeConfig_To_v1alpha3_ServiceVolumeConfig, + Convert_v1alpha3_Stack_To_v1beta2_Stack, + Convert_v1beta2_Stack_To_v1alpha3_Stack, + Convert_v1alpha3_StackList_To_v1beta2_StackList, + Convert_v1beta2_StackList_To_v1alpha3_StackList, + Convert_v1alpha3_StackSpec_To_v1beta2_StackSpec, + Convert_v1beta2_StackSpec_To_v1alpha3_StackSpec, + Convert_v1alpha3_StackStatus_To_v1beta2_StackStatus, + Convert_v1beta2_StackStatus_To_v1alpha3_StackStatus, + Convert_v1alpha3_UpdateConfig_To_v1beta2_UpdateConfig, + Convert_v1beta2_UpdateConfig_To_v1alpha3_UpdateConfig, + ) +} + +func autoConvert_v1alpha3_ComposeFile_To_v1beta2_ComposeFile(in *ComposeFile, out *v1beta2.ComposeFile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.ComposeFile = in.ComposeFile + return nil +} + +// Convert_v1alpha3_ComposeFile_To_v1beta2_ComposeFile is an autogenerated conversion function. +func Convert_v1alpha3_ComposeFile_To_v1beta2_ComposeFile(in *ComposeFile, out *v1beta2.ComposeFile, s conversion.Scope) error { + return autoConvert_v1alpha3_ComposeFile_To_v1beta2_ComposeFile(in, out, s) +} + +func autoConvert_v1beta2_ComposeFile_To_v1alpha3_ComposeFile(in *v1beta2.ComposeFile, out *ComposeFile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.ComposeFile = in.ComposeFile + return nil +} + +// Convert_v1beta2_ComposeFile_To_v1alpha3_ComposeFile is an autogenerated conversion function. +func Convert_v1beta2_ComposeFile_To_v1alpha3_ComposeFile(in *v1beta2.ComposeFile, out *ComposeFile, s conversion.Scope) error { + return autoConvert_v1beta2_ComposeFile_To_v1alpha3_ComposeFile(in, out, s) +} + +func autoConvert_v1alpha3_ConfigObjConfig_To_v1beta2_ConfigObjConfig(in *ConfigObjConfig, out *v1beta2.ConfigObjConfig, s conversion.Scope) error { + out.Name = in.Name + out.File = in.File + if err := Convert_v1alpha3_External_To_v1beta2_External(&in.External, &out.External, s); err != nil { + return err + } + out.Labels = in.Labels + return nil +} + +// Convert_v1alpha3_ConfigObjConfig_To_v1beta2_ConfigObjConfig is an autogenerated conversion function. +func Convert_v1alpha3_ConfigObjConfig_To_v1beta2_ConfigObjConfig(in *ConfigObjConfig, out *v1beta2.ConfigObjConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_ConfigObjConfig_To_v1beta2_ConfigObjConfig(in, out, s) +} + +func autoConvert_v1beta2_ConfigObjConfig_To_v1alpha3_ConfigObjConfig(in *v1beta2.ConfigObjConfig, out *ConfigObjConfig, s conversion.Scope) error { + out.Name = in.Name + out.File = in.File + if err := Convert_v1beta2_External_To_v1alpha3_External(&in.External, &out.External, s); err != nil { + return err + } + out.Labels = in.Labels + return nil +} + +// Convert_v1beta2_ConfigObjConfig_To_v1alpha3_ConfigObjConfig is an autogenerated conversion function. +func Convert_v1beta2_ConfigObjConfig_To_v1alpha3_ConfigObjConfig(in *v1beta2.ConfigObjConfig, out *ConfigObjConfig, s conversion.Scope) error { + return autoConvert_v1beta2_ConfigObjConfig_To_v1alpha3_ConfigObjConfig(in, out, s) +} + +func autoConvert_v1alpha3_Constraint_To_v1beta2_Constraint(in *Constraint, out *v1beta2.Constraint, s conversion.Scope) error { + out.Value = in.Value + out.Operator = in.Operator + return nil +} + +// Convert_v1alpha3_Constraint_To_v1beta2_Constraint is an autogenerated conversion function. +func Convert_v1alpha3_Constraint_To_v1beta2_Constraint(in *Constraint, out *v1beta2.Constraint, s conversion.Scope) error { + return autoConvert_v1alpha3_Constraint_To_v1beta2_Constraint(in, out, s) +} + +func autoConvert_v1beta2_Constraint_To_v1alpha3_Constraint(in *v1beta2.Constraint, out *Constraint, s conversion.Scope) error { + out.Value = in.Value + out.Operator = in.Operator + return nil +} + +// Convert_v1beta2_Constraint_To_v1alpha3_Constraint is an autogenerated conversion function. +func Convert_v1beta2_Constraint_To_v1alpha3_Constraint(in *v1beta2.Constraint, out *Constraint, s conversion.Scope) error { + return autoConvert_v1beta2_Constraint_To_v1alpha3_Constraint(in, out, s) +} + +func autoConvert_v1alpha3_Constraints_To_v1beta2_Constraints(in *Constraints, out *v1beta2.Constraints, s conversion.Scope) error { + if in.OperatingSystem != nil { + in, out := &in.OperatingSystem, &out.OperatingSystem + *out = new(v1beta2.Constraint) + if err := Convert_v1alpha3_Constraint_To_v1beta2_Constraint(*in, *out, s); err != nil { + return err + } + } else { + out.OperatingSystem = nil + } + if in.Architecture != nil { + in, out := &in.Architecture, &out.Architecture + *out = new(v1beta2.Constraint) + if err := Convert_v1alpha3_Constraint_To_v1beta2_Constraint(*in, *out, s); err != nil { + return err + } + } else { + out.Architecture = nil + } + if in.Hostname != nil { + in, out := &in.Hostname, &out.Hostname + *out = new(v1beta2.Constraint) + if err := Convert_v1alpha3_Constraint_To_v1beta2_Constraint(*in, *out, s); err != nil { + return err + } + } else { + out.Hostname = nil + } + if in.MatchLabels != nil { + in, out := &in.MatchLabels, &out.MatchLabels + *out = make(map[string]v1beta2.Constraint, len(*in)) + for key, val := range *in { + newVal := new(v1beta2.Constraint) + if err := Convert_v1alpha3_Constraint_To_v1beta2_Constraint(&val, newVal, s); err != nil { + return err + } + (*out)[key] = *newVal + } + } else { + out.MatchLabels = nil + } + return nil +} + +// Convert_v1alpha3_Constraints_To_v1beta2_Constraints is an autogenerated conversion function. +func Convert_v1alpha3_Constraints_To_v1beta2_Constraints(in *Constraints, out *v1beta2.Constraints, s conversion.Scope) error { + return autoConvert_v1alpha3_Constraints_To_v1beta2_Constraints(in, out, s) +} + +func autoConvert_v1beta2_Constraints_To_v1alpha3_Constraints(in *v1beta2.Constraints, out *Constraints, s conversion.Scope) error { + if in.OperatingSystem != nil { + in, out := &in.OperatingSystem, &out.OperatingSystem + *out = new(Constraint) + if err := Convert_v1beta2_Constraint_To_v1alpha3_Constraint(*in, *out, s); err != nil { + return err + } + } else { + out.OperatingSystem = nil + } + if in.Architecture != nil { + in, out := &in.Architecture, &out.Architecture + *out = new(Constraint) + if err := Convert_v1beta2_Constraint_To_v1alpha3_Constraint(*in, *out, s); err != nil { + return err + } + } else { + out.Architecture = nil + } + if in.Hostname != nil { + in, out := &in.Hostname, &out.Hostname + *out = new(Constraint) + if err := Convert_v1beta2_Constraint_To_v1alpha3_Constraint(*in, *out, s); err != nil { + return err + } + } else { + out.Hostname = nil + } + if in.MatchLabels != nil { + in, out := &in.MatchLabels, &out.MatchLabels + *out = make(map[string]Constraint, len(*in)) + for key, val := range *in { + newVal := new(Constraint) + if err := Convert_v1beta2_Constraint_To_v1alpha3_Constraint(&val, newVal, s); err != nil { + return err + } + (*out)[key] = *newVal + } + } else { + out.MatchLabels = nil + } + return nil +} + +// Convert_v1beta2_Constraints_To_v1alpha3_Constraints is an autogenerated conversion function. +func Convert_v1beta2_Constraints_To_v1alpha3_Constraints(in *v1beta2.Constraints, out *Constraints, s conversion.Scope) error { + return autoConvert_v1beta2_Constraints_To_v1alpha3_Constraints(in, out, s) +} + +func autoConvert_v1alpha3_DeployConfig_To_v1beta2_DeployConfig(in *DeployConfig, out *v1beta2.DeployConfig, s conversion.Scope) error { + out.Mode = in.Mode + out.Replicas = in.Replicas + out.Labels = in.Labels + if in.UpdateConfig != nil { + in, out := &in.UpdateConfig, &out.UpdateConfig + *out = new(v1beta2.UpdateConfig) + if err := Convert_v1alpha3_UpdateConfig_To_v1beta2_UpdateConfig(*in, *out, s); err != nil { + return err + } + } else { + out.UpdateConfig = nil + } + if err := Convert_v1alpha3_Resources_To_v1beta2_Resources(&in.Resources, &out.Resources, s); err != nil { + return err + } + if in.RestartPolicy != nil { + in, out := &in.RestartPolicy, &out.RestartPolicy + *out = new(v1beta2.RestartPolicy) + if err := Convert_v1alpha3_RestartPolicy_To_v1beta2_RestartPolicy(*in, *out, s); err != nil { + return err + } + } else { + out.RestartPolicy = nil + } + if err := Convert_v1alpha3_Placement_To_v1beta2_Placement(&in.Placement, &out.Placement, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_DeployConfig_To_v1beta2_DeployConfig is an autogenerated conversion function. +func Convert_v1alpha3_DeployConfig_To_v1beta2_DeployConfig(in *DeployConfig, out *v1beta2.DeployConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_DeployConfig_To_v1beta2_DeployConfig(in, out, s) +} + +func autoConvert_v1beta2_DeployConfig_To_v1alpha3_DeployConfig(in *v1beta2.DeployConfig, out *DeployConfig, s conversion.Scope) error { + out.Mode = in.Mode + out.Replicas = in.Replicas + out.Labels = in.Labels + if in.UpdateConfig != nil { + in, out := &in.UpdateConfig, &out.UpdateConfig + *out = new(UpdateConfig) + if err := Convert_v1beta2_UpdateConfig_To_v1alpha3_UpdateConfig(*in, *out, s); err != nil { + return err + } + } else { + out.UpdateConfig = nil + } + if err := Convert_v1beta2_Resources_To_v1alpha3_Resources(&in.Resources, &out.Resources, s); err != nil { + return err + } + if in.RestartPolicy != nil { + in, out := &in.RestartPolicy, &out.RestartPolicy + *out = new(RestartPolicy) + if err := Convert_v1beta2_RestartPolicy_To_v1alpha3_RestartPolicy(*in, *out, s); err != nil { + return err + } + } else { + out.RestartPolicy = nil + } + if err := Convert_v1beta2_Placement_To_v1alpha3_Placement(&in.Placement, &out.Placement, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_DeployConfig_To_v1alpha3_DeployConfig is an autogenerated conversion function. +func Convert_v1beta2_DeployConfig_To_v1alpha3_DeployConfig(in *v1beta2.DeployConfig, out *DeployConfig, s conversion.Scope) error { + return autoConvert_v1beta2_DeployConfig_To_v1alpha3_DeployConfig(in, out, s) +} + +func autoConvert_v1alpha3_External_To_v1beta2_External(in *External, out *v1beta2.External, s conversion.Scope) error { + out.Name = in.Name + out.External = in.External + return nil +} + +// Convert_v1alpha3_External_To_v1beta2_External is an autogenerated conversion function. +func Convert_v1alpha3_External_To_v1beta2_External(in *External, out *v1beta2.External, s conversion.Scope) error { + return autoConvert_v1alpha3_External_To_v1beta2_External(in, out, s) +} + +func autoConvert_v1beta2_External_To_v1alpha3_External(in *v1beta2.External, out *External, s conversion.Scope) error { + out.Name = in.Name + out.External = in.External + return nil +} + +// Convert_v1beta2_External_To_v1alpha3_External is an autogenerated conversion function. +func Convert_v1beta2_External_To_v1alpha3_External(in *v1beta2.External, out *External, s conversion.Scope) error { + return autoConvert_v1beta2_External_To_v1alpha3_External(in, out, s) +} + +func autoConvert_v1alpha3_FileObjectConfig_To_v1beta2_FileObjectConfig(in *FileObjectConfig, out *v1beta2.FileObjectConfig, s conversion.Scope) error { + out.Name = in.Name + out.File = in.File + if err := Convert_v1alpha3_External_To_v1beta2_External(&in.External, &out.External, s); err != nil { + return err + } + out.Labels = in.Labels + return nil +} + +// Convert_v1alpha3_FileObjectConfig_To_v1beta2_FileObjectConfig is an autogenerated conversion function. +func Convert_v1alpha3_FileObjectConfig_To_v1beta2_FileObjectConfig(in *FileObjectConfig, out *v1beta2.FileObjectConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_FileObjectConfig_To_v1beta2_FileObjectConfig(in, out, s) +} + +func autoConvert_v1beta2_FileObjectConfig_To_v1alpha3_FileObjectConfig(in *v1beta2.FileObjectConfig, out *FileObjectConfig, s conversion.Scope) error { + out.Name = in.Name + out.File = in.File + if err := Convert_v1beta2_External_To_v1alpha3_External(&in.External, &out.External, s); err != nil { + return err + } + out.Labels = in.Labels + return nil +} + +// Convert_v1beta2_FileObjectConfig_To_v1alpha3_FileObjectConfig is an autogenerated conversion function. +func Convert_v1beta2_FileObjectConfig_To_v1alpha3_FileObjectConfig(in *v1beta2.FileObjectConfig, out *FileObjectConfig, s conversion.Scope) error { + return autoConvert_v1beta2_FileObjectConfig_To_v1alpha3_FileObjectConfig(in, out, s) +} + +func autoConvert_v1alpha3_FileReferenceConfig_To_v1beta2_FileReferenceConfig(in *FileReferenceConfig, out *v1beta2.FileReferenceConfig, s conversion.Scope) error { + out.Source = in.Source + out.Target = in.Target + out.UID = in.UID + out.GID = in.GID + out.Mode = in.Mode + return nil +} + +// Convert_v1alpha3_FileReferenceConfig_To_v1beta2_FileReferenceConfig is an autogenerated conversion function. +func Convert_v1alpha3_FileReferenceConfig_To_v1beta2_FileReferenceConfig(in *FileReferenceConfig, out *v1beta2.FileReferenceConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_FileReferenceConfig_To_v1beta2_FileReferenceConfig(in, out, s) +} + +func autoConvert_v1beta2_FileReferenceConfig_To_v1alpha3_FileReferenceConfig(in *v1beta2.FileReferenceConfig, out *FileReferenceConfig, s conversion.Scope) error { + out.Source = in.Source + out.Target = in.Target + out.UID = in.UID + out.GID = in.GID + out.Mode = in.Mode + return nil +} + +// Convert_v1beta2_FileReferenceConfig_To_v1alpha3_FileReferenceConfig is an autogenerated conversion function. +func Convert_v1beta2_FileReferenceConfig_To_v1alpha3_FileReferenceConfig(in *v1beta2.FileReferenceConfig, out *FileReferenceConfig, s conversion.Scope) error { + return autoConvert_v1beta2_FileReferenceConfig_To_v1alpha3_FileReferenceConfig(in, out, s) +} + +func autoConvert_v1alpha3_HealthCheckConfig_To_v1beta2_HealthCheckConfig(in *HealthCheckConfig, out *v1beta2.HealthCheckConfig, s conversion.Scope) error { + out.Test = in.Test + out.Timeout = in.Timeout + out.Interval = in.Interval + out.Retries = in.Retries + return nil +} + +// Convert_v1alpha3_HealthCheckConfig_To_v1beta2_HealthCheckConfig is an autogenerated conversion function. +func Convert_v1alpha3_HealthCheckConfig_To_v1beta2_HealthCheckConfig(in *HealthCheckConfig, out *v1beta2.HealthCheckConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_HealthCheckConfig_To_v1beta2_HealthCheckConfig(in, out, s) +} + +func autoConvert_v1beta2_HealthCheckConfig_To_v1alpha3_HealthCheckConfig(in *v1beta2.HealthCheckConfig, out *HealthCheckConfig, s conversion.Scope) error { + out.Test = in.Test + out.Timeout = in.Timeout + out.Interval = in.Interval + out.Retries = in.Retries + return nil +} + +// Convert_v1beta2_HealthCheckConfig_To_v1alpha3_HealthCheckConfig is an autogenerated conversion function. +func Convert_v1beta2_HealthCheckConfig_To_v1alpha3_HealthCheckConfig(in *v1beta2.HealthCheckConfig, out *HealthCheckConfig, s conversion.Scope) error { + return autoConvert_v1beta2_HealthCheckConfig_To_v1alpha3_HealthCheckConfig(in, out, s) +} + +func autoConvert_v1alpha3_Owner_To_v1beta2_Owner(in *Owner, out *v1beta2.Owner, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Owner = in.Owner + return nil +} + +// Convert_v1alpha3_Owner_To_v1beta2_Owner is an autogenerated conversion function. +func Convert_v1alpha3_Owner_To_v1beta2_Owner(in *Owner, out *v1beta2.Owner, s conversion.Scope) error { + return autoConvert_v1alpha3_Owner_To_v1beta2_Owner(in, out, s) +} + +func autoConvert_v1beta2_Owner_To_v1alpha3_Owner(in *v1beta2.Owner, out *Owner, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Owner = in.Owner + return nil +} + +// Convert_v1beta2_Owner_To_v1alpha3_Owner is an autogenerated conversion function. +func Convert_v1beta2_Owner_To_v1alpha3_Owner(in *v1beta2.Owner, out *Owner, s conversion.Scope) error { + return autoConvert_v1beta2_Owner_To_v1alpha3_Owner(in, out, s) +} + +func autoConvert_v1alpha3_Placement_To_v1beta2_Placement(in *Placement, out *v1beta2.Placement, s conversion.Scope) error { + if in.Constraints != nil { + in, out := &in.Constraints, &out.Constraints + *out = new(v1beta2.Constraints) + if err := Convert_v1alpha3_Constraints_To_v1beta2_Constraints(*in, *out, s); err != nil { + return err + } + } else { + out.Constraints = nil + } + return nil +} + +// Convert_v1alpha3_Placement_To_v1beta2_Placement is an autogenerated conversion function. +func Convert_v1alpha3_Placement_To_v1beta2_Placement(in *Placement, out *v1beta2.Placement, s conversion.Scope) error { + return autoConvert_v1alpha3_Placement_To_v1beta2_Placement(in, out, s) +} + +func autoConvert_v1beta2_Placement_To_v1alpha3_Placement(in *v1beta2.Placement, out *Placement, s conversion.Scope) error { + if in.Constraints != nil { + in, out := &in.Constraints, &out.Constraints + *out = new(Constraints) + if err := Convert_v1beta2_Constraints_To_v1alpha3_Constraints(*in, *out, s); err != nil { + return err + } + } else { + out.Constraints = nil + } + return nil +} + +// Convert_v1beta2_Placement_To_v1alpha3_Placement is an autogenerated conversion function. +func Convert_v1beta2_Placement_To_v1alpha3_Placement(in *v1beta2.Placement, out *Placement, s conversion.Scope) error { + return autoConvert_v1beta2_Placement_To_v1alpha3_Placement(in, out, s) +} + +func autoConvert_v1alpha3_Resource_To_v1beta2_Resource(in *Resource, out *v1beta2.Resource, s conversion.Scope) error { + out.NanoCPUs = in.NanoCPUs + out.MemoryBytes = in.MemoryBytes + return nil +} + +// Convert_v1alpha3_Resource_To_v1beta2_Resource is an autogenerated conversion function. +func Convert_v1alpha3_Resource_To_v1beta2_Resource(in *Resource, out *v1beta2.Resource, s conversion.Scope) error { + return autoConvert_v1alpha3_Resource_To_v1beta2_Resource(in, out, s) +} + +func autoConvert_v1beta2_Resource_To_v1alpha3_Resource(in *v1beta2.Resource, out *Resource, s conversion.Scope) error { + out.NanoCPUs = in.NanoCPUs + out.MemoryBytes = in.MemoryBytes + return nil +} + +// Convert_v1beta2_Resource_To_v1alpha3_Resource is an autogenerated conversion function. +func Convert_v1beta2_Resource_To_v1alpha3_Resource(in *v1beta2.Resource, out *Resource, s conversion.Scope) error { + return autoConvert_v1beta2_Resource_To_v1alpha3_Resource(in, out, s) +} + +func autoConvert_v1alpha3_Resources_To_v1beta2_Resources(in *Resources, out *v1beta2.Resources, s conversion.Scope) error { + if in.Limits != nil { + in, out := &in.Limits, &out.Limits + *out = new(v1beta2.Resource) + if err := Convert_v1alpha3_Resource_To_v1beta2_Resource(*in, *out, s); err != nil { + return err + } + } else { + out.Limits = nil + } + if in.Reservations != nil { + in, out := &in.Reservations, &out.Reservations + *out = new(v1beta2.Resource) + if err := Convert_v1alpha3_Resource_To_v1beta2_Resource(*in, *out, s); err != nil { + return err + } + } else { + out.Reservations = nil + } + return nil +} + +// Convert_v1alpha3_Resources_To_v1beta2_Resources is an autogenerated conversion function. +func Convert_v1alpha3_Resources_To_v1beta2_Resources(in *Resources, out *v1beta2.Resources, s conversion.Scope) error { + return autoConvert_v1alpha3_Resources_To_v1beta2_Resources(in, out, s) +} + +func autoConvert_v1beta2_Resources_To_v1alpha3_Resources(in *v1beta2.Resources, out *Resources, s conversion.Scope) error { + if in.Limits != nil { + in, out := &in.Limits, &out.Limits + *out = new(Resource) + if err := Convert_v1beta2_Resource_To_v1alpha3_Resource(*in, *out, s); err != nil { + return err + } + } else { + out.Limits = nil + } + if in.Reservations != nil { + in, out := &in.Reservations, &out.Reservations + *out = new(Resource) + if err := Convert_v1beta2_Resource_To_v1alpha3_Resource(*in, *out, s); err != nil { + return err + } + } else { + out.Reservations = nil + } + return nil +} + +// Convert_v1beta2_Resources_To_v1alpha3_Resources is an autogenerated conversion function. +func Convert_v1beta2_Resources_To_v1alpha3_Resources(in *v1beta2.Resources, out *Resources, s conversion.Scope) error { + return autoConvert_v1beta2_Resources_To_v1alpha3_Resources(in, out, s) +} + +func autoConvert_v1alpha3_RestartPolicy_To_v1beta2_RestartPolicy(in *RestartPolicy, out *v1beta2.RestartPolicy, s conversion.Scope) error { + out.Condition = in.Condition + return nil +} + +// Convert_v1alpha3_RestartPolicy_To_v1beta2_RestartPolicy is an autogenerated conversion function. +func Convert_v1alpha3_RestartPolicy_To_v1beta2_RestartPolicy(in *RestartPolicy, out *v1beta2.RestartPolicy, s conversion.Scope) error { + return autoConvert_v1alpha3_RestartPolicy_To_v1beta2_RestartPolicy(in, out, s) +} + +func autoConvert_v1beta2_RestartPolicy_To_v1alpha3_RestartPolicy(in *v1beta2.RestartPolicy, out *RestartPolicy, s conversion.Scope) error { + out.Condition = in.Condition + return nil +} + +// Convert_v1beta2_RestartPolicy_To_v1alpha3_RestartPolicy is an autogenerated conversion function. +func Convert_v1beta2_RestartPolicy_To_v1alpha3_RestartPolicy(in *v1beta2.RestartPolicy, out *RestartPolicy, s conversion.Scope) error { + return autoConvert_v1beta2_RestartPolicy_To_v1alpha3_RestartPolicy(in, out, s) +} + +func autoConvert_v1alpha3_Scale_To_v1beta2_Scale(in *Scale, out *v1beta2.Scale, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Spec = in.Spec + out.Status = in.Status + return nil +} + +// Convert_v1alpha3_Scale_To_v1beta2_Scale is an autogenerated conversion function. +func Convert_v1alpha3_Scale_To_v1beta2_Scale(in *Scale, out *v1beta2.Scale, s conversion.Scope) error { + return autoConvert_v1alpha3_Scale_To_v1beta2_Scale(in, out, s) +} + +func autoConvert_v1beta2_Scale_To_v1alpha3_Scale(in *v1beta2.Scale, out *Scale, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Spec = in.Spec + out.Status = in.Status + return nil +} + +// Convert_v1beta2_Scale_To_v1alpha3_Scale is an autogenerated conversion function. +func Convert_v1beta2_Scale_To_v1alpha3_Scale(in *v1beta2.Scale, out *Scale, s conversion.Scope) error { + return autoConvert_v1beta2_Scale_To_v1alpha3_Scale(in, out, s) +} + +func autoConvert_v1alpha3_SecretConfig_To_v1beta2_SecretConfig(in *SecretConfig, out *v1beta2.SecretConfig, s conversion.Scope) error { + out.Name = in.Name + out.File = in.File + if err := Convert_v1alpha3_External_To_v1beta2_External(&in.External, &out.External, s); err != nil { + return err + } + out.Labels = in.Labels + return nil +} + +// Convert_v1alpha3_SecretConfig_To_v1beta2_SecretConfig is an autogenerated conversion function. +func Convert_v1alpha3_SecretConfig_To_v1beta2_SecretConfig(in *SecretConfig, out *v1beta2.SecretConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_SecretConfig_To_v1beta2_SecretConfig(in, out, s) +} + +func autoConvert_v1beta2_SecretConfig_To_v1alpha3_SecretConfig(in *v1beta2.SecretConfig, out *SecretConfig, s conversion.Scope) error { + out.Name = in.Name + out.File = in.File + if err := Convert_v1beta2_External_To_v1alpha3_External(&in.External, &out.External, s); err != nil { + return err + } + out.Labels = in.Labels + return nil +} + +// Convert_v1beta2_SecretConfig_To_v1alpha3_SecretConfig is an autogenerated conversion function. +func Convert_v1beta2_SecretConfig_To_v1alpha3_SecretConfig(in *v1beta2.SecretConfig, out *SecretConfig, s conversion.Scope) error { + return autoConvert_v1beta2_SecretConfig_To_v1alpha3_SecretConfig(in, out, s) +} + +func autoConvert_v1alpha3_ServiceConfig_To_v1beta2_ServiceConfig(in *ServiceConfig, out *v1beta2.ServiceConfig, s conversion.Scope) error { + out.Name = in.Name + out.CapAdd = in.CapAdd + out.CapDrop = in.CapDrop + out.Command = in.Command + if in.Configs != nil { + in, out := &in.Configs, &out.Configs + *out = make([]v1beta2.ServiceConfigObjConfig, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_ServiceConfigObjConfig_To_v1beta2_ServiceConfigObjConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Configs = nil + } + if err := Convert_v1alpha3_DeployConfig_To_v1beta2_DeployConfig(&in.Deploy, &out.Deploy, s); err != nil { + return err + } + out.Entrypoint = in.Entrypoint + out.Environment = in.Environment + out.ExtraHosts = in.ExtraHosts + out.Hostname = in.Hostname + if in.HealthCheck != nil { + in, out := &in.HealthCheck, &out.HealthCheck + *out = new(v1beta2.HealthCheckConfig) + if err := Convert_v1alpha3_HealthCheckConfig_To_v1beta2_HealthCheckConfig(*in, *out, s); err != nil { + return err + } + } else { + out.HealthCheck = nil + } + out.Image = in.Image + out.Ipc = in.Ipc + out.Labels = in.Labels + out.Pid = in.Pid + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]v1beta2.ServicePortConfig, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_ServicePortConfig_To_v1beta2_ServicePortConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Ports = nil + } + out.Privileged = in.Privileged + out.ReadOnly = in.ReadOnly + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = make([]v1beta2.ServiceSecretConfig, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_ServiceSecretConfig_To_v1beta2_ServiceSecretConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Secrets = nil + } + out.StdinOpen = in.StdinOpen + out.StopGracePeriod = in.StopGracePeriod + out.Tmpfs = in.Tmpfs + out.Tty = in.Tty + out.User = in.User + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]v1beta2.ServiceVolumeConfig, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_ServiceVolumeConfig_To_v1beta2_ServiceVolumeConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Volumes = nil + } + out.WorkingDir = in.WorkingDir + return nil +} + +// Convert_v1alpha3_ServiceConfig_To_v1beta2_ServiceConfig is an autogenerated conversion function. +func Convert_v1alpha3_ServiceConfig_To_v1beta2_ServiceConfig(in *ServiceConfig, out *v1beta2.ServiceConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_ServiceConfig_To_v1beta2_ServiceConfig(in, out, s) +} + +func autoConvert_v1beta2_ServiceConfig_To_v1alpha3_ServiceConfig(in *v1beta2.ServiceConfig, out *ServiceConfig, s conversion.Scope) error { + out.Name = in.Name + out.CapAdd = in.CapAdd + out.CapDrop = in.CapDrop + out.Command = in.Command + if in.Configs != nil { + in, out := &in.Configs, &out.Configs + *out = make([]ServiceConfigObjConfig, len(*in)) + for i := range *in { + if err := Convert_v1beta2_ServiceConfigObjConfig_To_v1alpha3_ServiceConfigObjConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Configs = nil + } + if err := Convert_v1beta2_DeployConfig_To_v1alpha3_DeployConfig(&in.Deploy, &out.Deploy, s); err != nil { + return err + } + out.Entrypoint = in.Entrypoint + out.Environment = in.Environment + out.ExtraHosts = in.ExtraHosts + out.Hostname = in.Hostname + if in.HealthCheck != nil { + in, out := &in.HealthCheck, &out.HealthCheck + *out = new(HealthCheckConfig) + if err := Convert_v1beta2_HealthCheckConfig_To_v1alpha3_HealthCheckConfig(*in, *out, s); err != nil { + return err + } + } else { + out.HealthCheck = nil + } + out.Image = in.Image + out.Ipc = in.Ipc + out.Labels = in.Labels + out.Pid = in.Pid + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]ServicePortConfig, len(*in)) + for i := range *in { + if err := Convert_v1beta2_ServicePortConfig_To_v1alpha3_ServicePortConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Ports = nil + } + out.Privileged = in.Privileged + out.ReadOnly = in.ReadOnly + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = make([]ServiceSecretConfig, len(*in)) + for i := range *in { + if err := Convert_v1beta2_ServiceSecretConfig_To_v1alpha3_ServiceSecretConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Secrets = nil + } + out.StdinOpen = in.StdinOpen + out.StopGracePeriod = in.StopGracePeriod + out.Tmpfs = in.Tmpfs + out.Tty = in.Tty + out.User = in.User + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]ServiceVolumeConfig, len(*in)) + for i := range *in { + if err := Convert_v1beta2_ServiceVolumeConfig_To_v1alpha3_ServiceVolumeConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Volumes = nil + } + out.WorkingDir = in.WorkingDir + return nil +} + +// Convert_v1beta2_ServiceConfig_To_v1alpha3_ServiceConfig is an autogenerated conversion function. +func Convert_v1beta2_ServiceConfig_To_v1alpha3_ServiceConfig(in *v1beta2.ServiceConfig, out *ServiceConfig, s conversion.Scope) error { + return autoConvert_v1beta2_ServiceConfig_To_v1alpha3_ServiceConfig(in, out, s) +} + +func autoConvert_v1alpha3_ServiceConfigObjConfig_To_v1beta2_ServiceConfigObjConfig(in *ServiceConfigObjConfig, out *v1beta2.ServiceConfigObjConfig, s conversion.Scope) error { + out.Source = in.Source + out.Target = in.Target + out.UID = in.UID + out.GID = in.GID + out.Mode = in.Mode + return nil +} + +// Convert_v1alpha3_ServiceConfigObjConfig_To_v1beta2_ServiceConfigObjConfig is an autogenerated conversion function. +func Convert_v1alpha3_ServiceConfigObjConfig_To_v1beta2_ServiceConfigObjConfig(in *ServiceConfigObjConfig, out *v1beta2.ServiceConfigObjConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_ServiceConfigObjConfig_To_v1beta2_ServiceConfigObjConfig(in, out, s) +} + +func autoConvert_v1beta2_ServiceConfigObjConfig_To_v1alpha3_ServiceConfigObjConfig(in *v1beta2.ServiceConfigObjConfig, out *ServiceConfigObjConfig, s conversion.Scope) error { + out.Source = in.Source + out.Target = in.Target + out.UID = in.UID + out.GID = in.GID + out.Mode = in.Mode + return nil +} + +// Convert_v1beta2_ServiceConfigObjConfig_To_v1alpha3_ServiceConfigObjConfig is an autogenerated conversion function. +func Convert_v1beta2_ServiceConfigObjConfig_To_v1alpha3_ServiceConfigObjConfig(in *v1beta2.ServiceConfigObjConfig, out *ServiceConfigObjConfig, s conversion.Scope) error { + return autoConvert_v1beta2_ServiceConfigObjConfig_To_v1alpha3_ServiceConfigObjConfig(in, out, s) +} + +func autoConvert_v1alpha3_ServicePortConfig_To_v1beta2_ServicePortConfig(in *ServicePortConfig, out *v1beta2.ServicePortConfig, s conversion.Scope) error { + out.Mode = in.Mode + out.Target = in.Target + out.Published = in.Published + out.Protocol = in.Protocol + return nil +} + +// Convert_v1alpha3_ServicePortConfig_To_v1beta2_ServicePortConfig is an autogenerated conversion function. +func Convert_v1alpha3_ServicePortConfig_To_v1beta2_ServicePortConfig(in *ServicePortConfig, out *v1beta2.ServicePortConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_ServicePortConfig_To_v1beta2_ServicePortConfig(in, out, s) +} + +func autoConvert_v1beta2_ServicePortConfig_To_v1alpha3_ServicePortConfig(in *v1beta2.ServicePortConfig, out *ServicePortConfig, s conversion.Scope) error { + out.Mode = in.Mode + out.Target = in.Target + out.Published = in.Published + out.Protocol = in.Protocol + return nil +} + +// Convert_v1beta2_ServicePortConfig_To_v1alpha3_ServicePortConfig is an autogenerated conversion function. +func Convert_v1beta2_ServicePortConfig_To_v1alpha3_ServicePortConfig(in *v1beta2.ServicePortConfig, out *ServicePortConfig, s conversion.Scope) error { + return autoConvert_v1beta2_ServicePortConfig_To_v1alpha3_ServicePortConfig(in, out, s) +} + +func autoConvert_v1alpha3_ServiceSecretConfig_To_v1beta2_ServiceSecretConfig(in *ServiceSecretConfig, out *v1beta2.ServiceSecretConfig, s conversion.Scope) error { + out.Source = in.Source + out.Target = in.Target + out.UID = in.UID + out.GID = in.GID + out.Mode = in.Mode + return nil +} + +// Convert_v1alpha3_ServiceSecretConfig_To_v1beta2_ServiceSecretConfig is an autogenerated conversion function. +func Convert_v1alpha3_ServiceSecretConfig_To_v1beta2_ServiceSecretConfig(in *ServiceSecretConfig, out *v1beta2.ServiceSecretConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_ServiceSecretConfig_To_v1beta2_ServiceSecretConfig(in, out, s) +} + +func autoConvert_v1beta2_ServiceSecretConfig_To_v1alpha3_ServiceSecretConfig(in *v1beta2.ServiceSecretConfig, out *ServiceSecretConfig, s conversion.Scope) error { + out.Source = in.Source + out.Target = in.Target + out.UID = in.UID + out.GID = in.GID + out.Mode = in.Mode + return nil +} + +// Convert_v1beta2_ServiceSecretConfig_To_v1alpha3_ServiceSecretConfig is an autogenerated conversion function. +func Convert_v1beta2_ServiceSecretConfig_To_v1alpha3_ServiceSecretConfig(in *v1beta2.ServiceSecretConfig, out *ServiceSecretConfig, s conversion.Scope) error { + return autoConvert_v1beta2_ServiceSecretConfig_To_v1alpha3_ServiceSecretConfig(in, out, s) +} + +func autoConvert_v1alpha3_ServiceVolumeConfig_To_v1beta2_ServiceVolumeConfig(in *ServiceVolumeConfig, out *v1beta2.ServiceVolumeConfig, s conversion.Scope) error { + out.Type = in.Type + out.Source = in.Source + out.Target = in.Target + out.ReadOnly = in.ReadOnly + return nil +} + +// Convert_v1alpha3_ServiceVolumeConfig_To_v1beta2_ServiceVolumeConfig is an autogenerated conversion function. +func Convert_v1alpha3_ServiceVolumeConfig_To_v1beta2_ServiceVolumeConfig(in *ServiceVolumeConfig, out *v1beta2.ServiceVolumeConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_ServiceVolumeConfig_To_v1beta2_ServiceVolumeConfig(in, out, s) +} + +func autoConvert_v1beta2_ServiceVolumeConfig_To_v1alpha3_ServiceVolumeConfig(in *v1beta2.ServiceVolumeConfig, out *ServiceVolumeConfig, s conversion.Scope) error { + out.Type = in.Type + out.Source = in.Source + out.Target = in.Target + out.ReadOnly = in.ReadOnly + return nil +} + +// Convert_v1beta2_ServiceVolumeConfig_To_v1alpha3_ServiceVolumeConfig is an autogenerated conversion function. +func Convert_v1beta2_ServiceVolumeConfig_To_v1alpha3_ServiceVolumeConfig(in *v1beta2.ServiceVolumeConfig, out *ServiceVolumeConfig, s conversion.Scope) error { + return autoConvert_v1beta2_ServiceVolumeConfig_To_v1alpha3_ServiceVolumeConfig(in, out, s) +} + +func autoConvert_v1alpha3_Stack_To_v1beta2_Stack(in *Stack, out *v1beta2.Stack, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if in.Spec != nil { + in, out := &in.Spec, &out.Spec + *out = new(v1beta2.StackSpec) + if err := Convert_v1alpha3_StackSpec_To_v1beta2_StackSpec(*in, *out, s); err != nil { + return err + } + } else { + out.Spec = nil + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(v1beta2.StackStatus) + if err := Convert_v1alpha3_StackStatus_To_v1beta2_StackStatus(*in, *out, s); err != nil { + return err + } + } else { + out.Status = nil + } + return nil +} + +// Convert_v1alpha3_Stack_To_v1beta2_Stack is an autogenerated conversion function. +func Convert_v1alpha3_Stack_To_v1beta2_Stack(in *Stack, out *v1beta2.Stack, s conversion.Scope) error { + return autoConvert_v1alpha3_Stack_To_v1beta2_Stack(in, out, s) +} + +func autoConvert_v1beta2_Stack_To_v1alpha3_Stack(in *v1beta2.Stack, out *Stack, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if in.Spec != nil { + in, out := &in.Spec, &out.Spec + *out = new(StackSpec) + if err := Convert_v1beta2_StackSpec_To_v1alpha3_StackSpec(*in, *out, s); err != nil { + return err + } + } else { + out.Spec = nil + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(StackStatus) + if err := Convert_v1beta2_StackStatus_To_v1alpha3_StackStatus(*in, *out, s); err != nil { + return err + } + } else { + out.Status = nil + } + return nil +} + +// Convert_v1beta2_Stack_To_v1alpha3_Stack is an autogenerated conversion function. +func Convert_v1beta2_Stack_To_v1alpha3_Stack(in *v1beta2.Stack, out *Stack, s conversion.Scope) error { + return autoConvert_v1beta2_Stack_To_v1alpha3_Stack(in, out, s) +} + +func autoConvert_v1alpha3_StackList_To_v1beta2_StackList(in *StackList, out *v1beta2.StackList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1beta2.Stack, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_Stack_To_v1beta2_Stack(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha3_StackList_To_v1beta2_StackList is an autogenerated conversion function. +func Convert_v1alpha3_StackList_To_v1beta2_StackList(in *StackList, out *v1beta2.StackList, s conversion.Scope) error { + return autoConvert_v1alpha3_StackList_To_v1beta2_StackList(in, out, s) +} + +func autoConvert_v1beta2_StackList_To_v1alpha3_StackList(in *v1beta2.StackList, out *StackList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Stack, len(*in)) + for i := range *in { + if err := Convert_v1beta2_Stack_To_v1alpha3_Stack(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta2_StackList_To_v1alpha3_StackList is an autogenerated conversion function. +func Convert_v1beta2_StackList_To_v1alpha3_StackList(in *v1beta2.StackList, out *StackList, s conversion.Scope) error { + return autoConvert_v1beta2_StackList_To_v1alpha3_StackList(in, out, s) +} + +func autoConvert_v1alpha3_StackSpec_To_v1beta2_StackSpec(in *StackSpec, out *v1beta2.StackSpec, s conversion.Scope) error { + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = make([]v1beta2.ServiceConfig, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_ServiceConfig_To_v1beta2_ServiceConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Services = nil + } + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = make(map[string]v1beta2.SecretConfig, len(*in)) + for key, val := range *in { + newVal := new(v1beta2.SecretConfig) + if err := Convert_v1alpha3_SecretConfig_To_v1beta2_SecretConfig(&val, newVal, s); err != nil { + return err + } + (*out)[key] = *newVal + } + } else { + out.Secrets = nil + } + if in.Configs != nil { + in, out := &in.Configs, &out.Configs + *out = make(map[string]v1beta2.ConfigObjConfig, len(*in)) + for key, val := range *in { + newVal := new(v1beta2.ConfigObjConfig) + if err := Convert_v1alpha3_ConfigObjConfig_To_v1beta2_ConfigObjConfig(&val, newVal, s); err != nil { + return err + } + (*out)[key] = *newVal + } + } else { + out.Configs = nil + } + return nil +} + +// Convert_v1alpha3_StackSpec_To_v1beta2_StackSpec is an autogenerated conversion function. +func Convert_v1alpha3_StackSpec_To_v1beta2_StackSpec(in *StackSpec, out *v1beta2.StackSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_StackSpec_To_v1beta2_StackSpec(in, out, s) +} + +func autoConvert_v1beta2_StackSpec_To_v1alpha3_StackSpec(in *v1beta2.StackSpec, out *StackSpec, s conversion.Scope) error { + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = make([]ServiceConfig, len(*in)) + for i := range *in { + if err := Convert_v1beta2_ServiceConfig_To_v1alpha3_ServiceConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Services = nil + } + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = make(map[string]SecretConfig, len(*in)) + for key, val := range *in { + newVal := new(SecretConfig) + if err := Convert_v1beta2_SecretConfig_To_v1alpha3_SecretConfig(&val, newVal, s); err != nil { + return err + } + (*out)[key] = *newVal + } + } else { + out.Secrets = nil + } + if in.Configs != nil { + in, out := &in.Configs, &out.Configs + *out = make(map[string]ConfigObjConfig, len(*in)) + for key, val := range *in { + newVal := new(ConfigObjConfig) + if err := Convert_v1beta2_ConfigObjConfig_To_v1alpha3_ConfigObjConfig(&val, newVal, s); err != nil { + return err + } + (*out)[key] = *newVal + } + } else { + out.Configs = nil + } + return nil +} + +// Convert_v1beta2_StackSpec_To_v1alpha3_StackSpec is an autogenerated conversion function. +func Convert_v1beta2_StackSpec_To_v1alpha3_StackSpec(in *v1beta2.StackSpec, out *StackSpec, s conversion.Scope) error { + return autoConvert_v1beta2_StackSpec_To_v1alpha3_StackSpec(in, out, s) +} + +func autoConvert_v1alpha3_StackStatus_To_v1beta2_StackStatus(in *StackStatus, out *v1beta2.StackStatus, s conversion.Scope) error { + out.Phase = v1beta2.StackPhase(in.Phase) + out.Message = in.Message + return nil +} + +// Convert_v1alpha3_StackStatus_To_v1beta2_StackStatus is an autogenerated conversion function. +func Convert_v1alpha3_StackStatus_To_v1beta2_StackStatus(in *StackStatus, out *v1beta2.StackStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_StackStatus_To_v1beta2_StackStatus(in, out, s) +} + +func autoConvert_v1beta2_StackStatus_To_v1alpha3_StackStatus(in *v1beta2.StackStatus, out *StackStatus, s conversion.Scope) error { + out.Phase = StackPhase(in.Phase) + out.Message = in.Message + return nil +} + +// Convert_v1beta2_StackStatus_To_v1alpha3_StackStatus is an autogenerated conversion function. +func Convert_v1beta2_StackStatus_To_v1alpha3_StackStatus(in *v1beta2.StackStatus, out *StackStatus, s conversion.Scope) error { + return autoConvert_v1beta2_StackStatus_To_v1alpha3_StackStatus(in, out, s) +} + +func autoConvert_v1alpha3_UpdateConfig_To_v1beta2_UpdateConfig(in *UpdateConfig, out *v1beta2.UpdateConfig, s conversion.Scope) error { + out.Parallelism = in.Parallelism + return nil +} + +// Convert_v1alpha3_UpdateConfig_To_v1beta2_UpdateConfig is an autogenerated conversion function. +func Convert_v1alpha3_UpdateConfig_To_v1beta2_UpdateConfig(in *UpdateConfig, out *v1beta2.UpdateConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_UpdateConfig_To_v1beta2_UpdateConfig(in, out, s) +} + +func autoConvert_v1beta2_UpdateConfig_To_v1alpha3_UpdateConfig(in *v1beta2.UpdateConfig, out *UpdateConfig, s conversion.Scope) error { + out.Parallelism = in.Parallelism + return nil +} + +// Convert_v1beta2_UpdateConfig_To_v1alpha3_UpdateConfig is an autogenerated conversion function. +func Convert_v1beta2_UpdateConfig_To_v1alpha3_UpdateConfig(in *v1beta2.UpdateConfig, out *UpdateConfig, s conversion.Scope) error { + return autoConvert_v1beta2_UpdateConfig_To_v1alpha3_UpdateConfig(in, out, s) +} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/deepcopy_generated.go b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/deepcopy_generated.go new file mode 100644 index 0000000000..3cfe5c471b --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/deepcopy_generated.go @@ -0,0 +1,660 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by C:\gohome\bin\deepcopy-gen.exe. DO NOT EDIT. + +package v1alpha3 + +import ( + time "time" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigObjConfig) DeepCopyInto(out *ConfigObjConfig) { + *out = *in + out.External = in.External + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigObjConfig. +func (in *ConfigObjConfig) DeepCopy() *ConfigObjConfig { + if in == nil { + return nil + } + out := new(ConfigObjConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Constraint) DeepCopyInto(out *Constraint) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Constraint. +func (in *Constraint) DeepCopy() *Constraint { + if in == nil { + return nil + } + out := new(Constraint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Constraints) DeepCopyInto(out *Constraints) { + *out = *in + if in.OperatingSystem != nil { + in, out := &in.OperatingSystem, &out.OperatingSystem + if *in == nil { + *out = nil + } else { + *out = new(Constraint) + **out = **in + } + } + if in.Architecture != nil { + in, out := &in.Architecture, &out.Architecture + if *in == nil { + *out = nil + } else { + *out = new(Constraint) + **out = **in + } + } + if in.Hostname != nil { + in, out := &in.Hostname, &out.Hostname + if *in == nil { + *out = nil + } else { + *out = new(Constraint) + **out = **in + } + } + if in.MatchLabels != nil { + in, out := &in.MatchLabels, &out.MatchLabels + *out = make(map[string]Constraint, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Constraints. +func (in *Constraints) DeepCopy() *Constraints { + if in == nil { + return nil + } + out := new(Constraints) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeployConfig) DeepCopyInto(out *DeployConfig) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + if *in == nil { + *out = nil + } else { + *out = new(uint64) + **out = **in + } + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.UpdateConfig != nil { + in, out := &in.UpdateConfig, &out.UpdateConfig + if *in == nil { + *out = nil + } else { + *out = new(UpdateConfig) + (*in).DeepCopyInto(*out) + } + } + in.Resources.DeepCopyInto(&out.Resources) + if in.RestartPolicy != nil { + in, out := &in.RestartPolicy, &out.RestartPolicy + if *in == nil { + *out = nil + } else { + *out = new(RestartPolicy) + **out = **in + } + } + in.Placement.DeepCopyInto(&out.Placement) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployConfig. +func (in *DeployConfig) DeepCopy() *DeployConfig { + if in == nil { + return nil + } + out := new(DeployConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *External) DeepCopyInto(out *External) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new External. +func (in *External) DeepCopy() *External { + if in == nil { + return nil + } + out := new(External) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FileObjectConfig) DeepCopyInto(out *FileObjectConfig) { + *out = *in + out.External = in.External + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileObjectConfig. +func (in *FileObjectConfig) DeepCopy() *FileObjectConfig { + if in == nil { + return nil + } + out := new(FileObjectConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FileReferenceConfig) DeepCopyInto(out *FileReferenceConfig) { + *out = *in + if in.Mode != nil { + in, out := &in.Mode, &out.Mode + if *in == nil { + *out = nil + } else { + *out = new(uint32) + **out = **in + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileReferenceConfig. +func (in *FileReferenceConfig) DeepCopy() *FileReferenceConfig { + if in == nil { + return nil + } + out := new(FileReferenceConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HealthCheckConfig) DeepCopyInto(out *HealthCheckConfig) { + *out = *in + if in.Test != nil { + in, out := &in.Test, &out.Test + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + if *in == nil { + *out = nil + } else { + *out = new(time.Duration) + **out = **in + } + } + if in.Interval != nil { + in, out := &in.Interval, &out.Interval + if *in == nil { + *out = nil + } else { + *out = new(time.Duration) + **out = **in + } + } + if in.Retries != nil { + in, out := &in.Retries, &out.Retries + if *in == nil { + *out = nil + } else { + *out = new(uint64) + **out = **in + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheckConfig. +func (in *HealthCheckConfig) DeepCopy() *HealthCheckConfig { + if in == nil { + return nil + } + out := new(HealthCheckConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Placement) DeepCopyInto(out *Placement) { + *out = *in + if in.Constraints != nil { + in, out := &in.Constraints, &out.Constraints + if *in == nil { + *out = nil + } else { + *out = new(Constraints) + (*in).DeepCopyInto(*out) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement. +func (in *Placement) DeepCopy() *Placement { + if in == nil { + return nil + } + out := new(Placement) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Resource) DeepCopyInto(out *Resource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource. +func (in *Resource) DeepCopy() *Resource { + if in == nil { + return nil + } + out := new(Resource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Resources) DeepCopyInto(out *Resources) { + *out = *in + if in.Limits != nil { + in, out := &in.Limits, &out.Limits + if *in == nil { + *out = nil + } else { + *out = new(Resource) + **out = **in + } + } + if in.Reservations != nil { + in, out := &in.Reservations, &out.Reservations + if *in == nil { + *out = nil + } else { + *out = new(Resource) + **out = **in + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resources. +func (in *Resources) DeepCopy() *Resources { + if in == nil { + return nil + } + out := new(Resources) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RestartPolicy) DeepCopyInto(out *RestartPolicy) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestartPolicy. +func (in *RestartPolicy) DeepCopy() *RestartPolicy { + if in == nil { + return nil + } + out := new(RestartPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretConfig) DeepCopyInto(out *SecretConfig) { + *out = *in + out.External = in.External + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretConfig. +func (in *SecretConfig) DeepCopy() *SecretConfig { + if in == nil { + return nil + } + out := new(SecretConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceConfig) DeepCopyInto(out *ServiceConfig) { + *out = *in + if in.CapAdd != nil { + in, out := &in.CapAdd, &out.CapAdd + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.CapDrop != nil { + in, out := &in.CapDrop, &out.CapDrop + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Command != nil { + in, out := &in.Command, &out.Command + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Configs != nil { + in, out := &in.Configs, &out.Configs + *out = make([]ServiceConfigObjConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Deploy.DeepCopyInto(&out.Deploy) + if in.Entrypoint != nil { + in, out := &in.Entrypoint, &out.Entrypoint + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Environment != nil { + in, out := &in.Environment, &out.Environment + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + outVal := *val + (*out)[key] = &outVal + } + } + } + if in.ExtraHosts != nil { + in, out := &in.ExtraHosts, &out.ExtraHosts + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.HealthCheck != nil { + in, out := &in.HealthCheck, &out.HealthCheck + if *in == nil { + *out = nil + } else { + *out = new(HealthCheckConfig) + (*in).DeepCopyInto(*out) + } + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]ServicePortConfig, len(*in)) + copy(*out, *in) + } + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = make([]ServiceSecretConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.StopGracePeriod != nil { + in, out := &in.StopGracePeriod, &out.StopGracePeriod + if *in == nil { + *out = nil + } else { + *out = new(time.Duration) + **out = **in + } + } + if in.Tmpfs != nil { + in, out := &in.Tmpfs, &out.Tmpfs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.User != nil { + in, out := &in.User, &out.User + if *in == nil { + *out = nil + } else { + *out = new(int64) + **out = **in + } + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]ServiceVolumeConfig, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceConfig. +func (in *ServiceConfig) DeepCopy() *ServiceConfig { + if in == nil { + return nil + } + out := new(ServiceConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceConfigObjConfig) DeepCopyInto(out *ServiceConfigObjConfig) { + *out = *in + if in.Mode != nil { + in, out := &in.Mode, &out.Mode + if *in == nil { + *out = nil + } else { + *out = new(uint32) + **out = **in + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceConfigObjConfig. +func (in *ServiceConfigObjConfig) DeepCopy() *ServiceConfigObjConfig { + if in == nil { + return nil + } + out := new(ServiceConfigObjConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServicePortConfig) DeepCopyInto(out *ServicePortConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePortConfig. +func (in *ServicePortConfig) DeepCopy() *ServicePortConfig { + if in == nil { + return nil + } + out := new(ServicePortConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceSecretConfig) DeepCopyInto(out *ServiceSecretConfig) { + *out = *in + if in.Mode != nil { + in, out := &in.Mode, &out.Mode + if *in == nil { + *out = nil + } else { + *out = new(uint32) + **out = **in + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSecretConfig. +func (in *ServiceSecretConfig) DeepCopy() *ServiceSecretConfig { + if in == nil { + return nil + } + out := new(ServiceSecretConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceVolumeConfig) DeepCopyInto(out *ServiceVolumeConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceVolumeConfig. +func (in *ServiceVolumeConfig) DeepCopy() *ServiceVolumeConfig { + if in == nil { + return nil + } + out := new(ServiceVolumeConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StackSpec) DeepCopyInto(out *StackSpec) { + *out = *in + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = make([]ServiceConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = make(map[string]SecretConfig, len(*in)) + for key, val := range *in { + newVal := new(SecretConfig) + val.DeepCopyInto(newVal) + (*out)[key] = *newVal + } + } + if in.Configs != nil { + in, out := &in.Configs, &out.Configs + *out = make(map[string]ConfigObjConfig, len(*in)) + for key, val := range *in { + newVal := new(ConfigObjConfig) + val.DeepCopyInto(newVal) + (*out)[key] = *newVal + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StackSpec. +func (in *StackSpec) DeepCopy() *StackSpec { + if in == nil { + return nil + } + out := new(StackSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UpdateConfig) DeepCopyInto(out *UpdateConfig) { + *out = *in + if in.Parallelism != nil { + in, out := &in.Parallelism, &out.Parallelism + if *in == nil { + *out = nil + } else { + *out = new(uint64) + **out = **in + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateConfig. +func (in *UpdateConfig) DeepCopy() *UpdateConfig { + if in == nil { + return nil + } + out := new(UpdateConfig) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/doc.go b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/doc.go new file mode 100644 index 0000000000..2864b9b3f7 --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/doc.go @@ -0,0 +1,8 @@ +// Api versions allow the api contract for a resource to be changed while keeping +// backward compatibility by support multiple concurrent versions +// of the same resource + +// Package v1alpha3 is the current in dev version of the stack, containing evolution on top of v1beta2 structured spec +// +k8s:openapi-gen=true +// +k8s:conversion-gen=github.com/docker/compose-on-kubernetes/api/compose/v1beta2 +package v1alpha3 diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/owner.go b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/owner.go new file mode 100644 index 0000000000..05d4ba8aff --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/owner.go @@ -0,0 +1,30 @@ +package v1alpha3 + +import ( + "github.com/docker/compose-on-kubernetes/api/compose/impersonation" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// Owner describes the user who created the stack +type Owner struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Owner impersonation.Config `json:"owner,omitempty"` +} + +func (o *Owner) clone() *Owner { + if o == nil { + return nil + } + result := new(Owner) + result.TypeMeta = o.TypeMeta + result.ObjectMeta = o.ObjectMeta + result.Owner = *result.Owner.Clone() + return result +} + +// DeepCopyObject clones the owner +func (o *Owner) DeepCopyObject() runtime.Object { + return o.clone() +} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/register.go b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/register.go new file mode 100644 index 0000000000..b8c4d28b9e --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/register.go @@ -0,0 +1,42 @@ +package v1alpha3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the name of the compose group +const GroupName = "compose.docker.com" + +var ( + // SchemeGroupVersion is group version used to register these objects + SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha3"} + // SchemeBuilder is the scheme builder + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + // AddToScheme adds to scheme + AddToScheme = localSchemeBuilder.AddToScheme +) + +func init() { + localSchemeBuilder.Register(addKnownTypes) +} + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &Stack{}, + &StackList{}, + &Owner{}, + &ComposeFile{}, + &Scale{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// GroupResource takes an unqualified resource and returns a Group qualified GroupResource +func GroupResource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/scale.go b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/scale.go new file mode 100644 index 0000000000..b1f685bc76 --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/scale.go @@ -0,0 +1,29 @@ +package v1alpha3 + +import ( + "github.com/docker/compose-on-kubernetes/api/compose/clone" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// Scale contains the current/desired replica count for services in a stack. +type Scale struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec map[string]int `json:"spec,omitempty"` + Status map[string]int `json:"status,omitempty"` +} + +func (s *Scale) clone() *Scale { + return &Scale{ + TypeMeta: s.TypeMeta, + ObjectMeta: s.ObjectMeta, + Spec: clone.MapOfStringToInt(s.Spec), + Status: clone.MapOfStringToInt(s.Status), + } +} + +// DeepCopyObject clones the scale +func (s *Scale) DeepCopyObject() runtime.Object { + return s.clone() +} diff --git a/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/stack.go b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/stack.go new file mode 100644 index 0000000000..67057ad6df --- /dev/null +++ b/vendor/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3/stack.go @@ -0,0 +1,270 @@ +package v1alpha3 + +import ( + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// StackList is a list of stacks +type StackList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []Stack `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// Stack is v1alpha3's representation of a Stack +type Stack struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec *StackSpec `json:"spec,omitempty"` + Status *StackStatus `json:"status,omitempty"` +} + +// DeepCopyObject clones the stack +func (s *Stack) DeepCopyObject() runtime.Object { + return s.clone() +} + +// DeepCopyObject clones the stack list +func (s *StackList) DeepCopyObject() runtime.Object { + if s == nil { + return nil + } + result := new(StackList) + result.TypeMeta = s.TypeMeta + result.ListMeta = s.ListMeta + if s.Items == nil { + return result + } + result.Items = make([]Stack, len(s.Items)) + for ix, s := range s.Items { + result.Items[ix] = *s.clone() + } + return result +} + +func (s *Stack) clone() *Stack { + if s == nil { + return nil + } + result := new(Stack) + result.TypeMeta = s.TypeMeta + result.ObjectMeta = s.ObjectMeta + result.Spec = s.Spec.DeepCopy() + result.Status = s.Status.clone() + return result +} + +// StackSpec defines the desired state of Stack +// +k8s:deepcopy-gen=true +type StackSpec struct { + Services []ServiceConfig `json:"services,omitempty"` + Secrets map[string]SecretConfig `json:"secrets,omitempty"` + Configs map[string]ConfigObjConfig `json:"configs,omitempty"` +} + +// ServiceConfig is the configuration of one service +// +k8s:deepcopy-gen=true +type ServiceConfig struct { + Name string `json:"name,omitempty"` + + CapAdd []string `json:"cap_add,omitempty"` + CapDrop []string `json:"cap_drop,omitempty"` + Command []string `json:"command,omitempty"` + Configs []ServiceConfigObjConfig `json:"configs,omitempty"` + Deploy DeployConfig `json:"deploy,omitempty"` + Entrypoint []string `json:"entrypoint,omitempty"` + Environment map[string]*string `json:"environment,omitempty"` + ExtraHosts []string `json:"extra_hosts,omitempty"` + Hostname string `json:"hostname,omitempty"` + HealthCheck *HealthCheckConfig `json:"health_check,omitempty"` + Image string `json:"image,omitempty"` + Ipc string `json:"ipc,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Pid string `json:"pid,omitempty"` + Ports []ServicePortConfig `json:"ports,omitempty"` + Privileged bool `json:"privileged,omitempty"` + ReadOnly bool `json:"read_only,omitempty"` + Secrets []ServiceSecretConfig `json:"secrets,omitempty"` + StdinOpen bool `json:"stdin_open,omitempty"` + StopGracePeriod *time.Duration `json:"stop_grace_period,omitempty"` + Tmpfs []string `json:"tmpfs,omitempty"` + Tty bool `json:"tty,omitempty"` + User *int64 `json:"user,omitempty"` + Volumes []ServiceVolumeConfig `json:"volumes,omitempty"` + WorkingDir string `json:"working_dir,omitempty"` +} + +// ServicePortConfig is the port configuration for a service +// +k8s:deepcopy-gen=true +type ServicePortConfig struct { + Mode string `json:"mode,omitempty"` + Target uint32 `json:"target,omitempty"` + Published uint32 `json:"published,omitempty"` + Protocol string `json:"protocol,omitempty"` +} + +// FileObjectConfig is a config type for a file used by a service +// +k8s:deepcopy-gen=true +type FileObjectConfig struct { + Name string `json:"name,omitempty"` + File string `json:"file,omitempty"` + External External `json:"external,omitempty"` + Labels map[string]string `json:"labels,omitempty"` +} + +// SecretConfig for a secret +// +k8s:deepcopy-gen=true +type SecretConfig FileObjectConfig + +// ConfigObjConfig is the config for the swarm "Config" object +// +k8s:deepcopy-gen=true +type ConfigObjConfig FileObjectConfig + +// External identifies a Volume or Network as a reference to a resource that is +// not managed, and should already exist. +// External.name is deprecated and replaced by Volume.name +// +k8s:deepcopy-gen=true +type External struct { + Name string `json:"name,omitempty"` + External bool `json:"external,omitempty"` +} + +// FileReferenceConfig for a reference to a swarm file object +// +k8s:deepcopy-gen=true +type FileReferenceConfig struct { + Source string `json:"source,omitempty"` + Target string `json:"target,omitempty"` + UID string `json:"uid,omitempty"` + GID string `json:"gid,omitempty"` + Mode *uint32 `json:"mode,omitempty"` +} + +// ServiceConfigObjConfig is the config obj configuration for a service +// +k8s:deepcopy-gen=true +type ServiceConfigObjConfig FileReferenceConfig + +// ServiceSecretConfig is the secret configuration for a service +// +k8s:deepcopy-gen=true +type ServiceSecretConfig FileReferenceConfig + +// DeployConfig is the deployment configuration for a service +// +k8s:deepcopy-gen=true +type DeployConfig struct { + Mode string `json:"mode,omitempty"` + Replicas *uint64 `json:"replicas,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + UpdateConfig *UpdateConfig `json:"update_config,omitempty"` + Resources Resources `json:"resources,omitempty"` + RestartPolicy *RestartPolicy `json:"restart_policy,omitempty"` + Placement Placement `json:"placement,omitempty"` +} + +// UpdateConfig is the service update configuration +// +k8s:deepcopy-gen=true +type UpdateConfig struct { + Parallelism *uint64 `json:"paralellism,omitempty"` +} + +// Resources the resource limits and reservations +// +k8s:deepcopy-gen=true +type Resources struct { + Limits *Resource `json:"limits,omitempty"` + Reservations *Resource `json:"reservations,omitempty"` +} + +// Resource is a resource to be limited or reserved +// +k8s:deepcopy-gen=true +type Resource struct { + NanoCPUs string `json:"cpus,omitempty"` + MemoryBytes int64 `json:"memory,omitempty"` +} + +// RestartPolicy is the service restart policy +// +k8s:deepcopy-gen=true +type RestartPolicy struct { + Condition string `json:"condition,omitempty"` +} + +// Placement constraints for the service +// +k8s:deepcopy-gen=true +type Placement struct { + Constraints *Constraints `json:"constraints,omitempty"` +} + +// Constraints lists constraints that can be set on the service +// +k8s:deepcopy-gen=true +type Constraints struct { + OperatingSystem *Constraint + Architecture *Constraint + Hostname *Constraint + MatchLabels map[string]Constraint +} + +// Constraint defines a constraint and it's operator (== or !=) +// +k8s:deepcopy-gen=true +type Constraint struct { + Value string + Operator string +} + +// HealthCheckConfig the healthcheck configuration for a service +// +k8s:deepcopy-gen=true +type HealthCheckConfig struct { + Test []string `json:"test,omitempty"` + Timeout *time.Duration `json:"timeout,omitempty"` + Interval *time.Duration `json:"interval,omitempty"` + Retries *uint64 `json:"retries,omitempty"` +} + +// ServiceVolumeConfig are references to a volume used by a service +// +k8s:deepcopy-gen=true +type ServiceVolumeConfig struct { + Type string `json:"type,omitempty"` + Source string `json:"source,omitempty"` + Target string `json:"target,omitempty"` + ReadOnly bool `json:"read_only,omitempty"` +} + +// StackPhase is the deployment phase of a stack +type StackPhase string + +// These are valid conditions of a stack. +const ( + // StackAvailable means the stack is available. + StackAvailable StackPhase = "Available" + // StackProgressing means the deployment is progressing. + StackProgressing StackPhase = "Progressing" + // StackFailure is added in a stack when one of its members fails to be created + // or deleted. + StackFailure StackPhase = "Failure" + // StackReconciliationPending means the stack has not yet been reconciled + StackReconciliationPending StackPhase = "ReconciliationPending" +) + +// StackStatus defines the observed state of Stack +type StackStatus struct { + // Current condition of the stack. + // +optional + Phase StackPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=StackPhase"` + // A human readable message indicating details about the stack. + // +optional + Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` +} + +func (s *StackStatus) clone() *StackStatus { + if s == nil { + return nil + } + result := *s + return &result +} + +// Clone clones a Stack +func (s *Stack) Clone() *Stack { + return s.clone() +}