Documentation
      ¶
    
    
  
    
  
    Index ¶
- func AddNamespaceFlag(flags *flag.FlagSet)
 - func GetServices(dockerCli *KubeCli, opts options.Services) ([]swarm.Service, error)
 - func GetStacks(kubeCli *KubeCli, opts options.List) ([]*formatter.Stack, error)
 - func RunDeploy(dockerCli *KubeCli, opts options.Deploy, cfg *composetypes.Config) error
 - func RunPS(dockerCli *KubeCli, options options.PS) error
 - func RunRemove(dockerCli *KubeCli, opts options.Remove) error
 - type Factory
 - func (s *Factory) ConfigMaps() corev1.ConfigMapInterface
 - func (s *Factory) DaemonSets() typesappsv1beta2.DaemonSetInterface
 - func (s *Factory) Nodes() corev1.NodeInterface
 - func (s *Factory) Pods() corev1.PodInterface
 - func (s *Factory) ReplicaSets() typesappsv1beta2.ReplicaSetInterface
 - func (s *Factory) ReplicationControllers() corev1.ReplicationControllerInterface
 - func (s *Factory) Secrets() corev1.SecretInterface
 - func (s *Factory) Services() corev1.ServiceInterface
 - func (s *Factory) Stacks(allNamespaces bool) (StackClient, error)
 
- type KubeCli
 - type Options
 - type Stack
 - type StackClient
 - type StackConverter
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNamespaceFlag ¶
AddNamespaceFlag adds the namespace flag to the given flag set
func GetServices ¶
GetServices is the kubernetes implementation of listing stack services
Types ¶
type Factory ¶
type Factory struct {
	// contains filtered or unexported fields
}
    Factory is the kubernetes client factory
func NewFactory ¶
func NewFactory(namespace string, config *restclient.Config, clientSet *kubeclient.Clientset) (*Factory, error)
NewFactory creates a kubernetes client factory
func (*Factory) ConfigMaps ¶
func (s *Factory) ConfigMaps() corev1.ConfigMapInterface
ConfigMaps returns a client for kubernetes's config maps
func (*Factory) DaemonSets ¶
func (s *Factory) DaemonSets() typesappsv1beta2.DaemonSetInterface
DaemonSets returns a client for kubernetes daemon sets
func (*Factory) Nodes ¶
func (s *Factory) Nodes() corev1.NodeInterface
Nodes returns a client for kubernetes's nodes
func (*Factory) Pods ¶
func (s *Factory) Pods() corev1.PodInterface
Pods returns a client for kubernetes's pods
func (*Factory) ReplicaSets ¶
func (s *Factory) ReplicaSets() typesappsv1beta2.ReplicaSetInterface
ReplicaSets returns a client for kubernetes replace sets
func (*Factory) ReplicationControllers ¶
func (s *Factory) ReplicationControllers() corev1.ReplicationControllerInterface
ReplicationControllers returns a client for kubernetes replication controllers
func (*Factory) Secrets ¶
func (s *Factory) Secrets() corev1.SecretInterface
Secrets returns a client for kubernetes's secrets
func (*Factory) Services ¶
func (s *Factory) Services() corev1.ServiceInterface
Services returns a client for kubernetes's secrets
type Options ¶
type Options struct {
	Namespace    string
	Config       string
	Orchestrator command.Orchestrator
}
    Options contains resolved parameters to initialize kubernetes clients
func NewOptions ¶
func NewOptions(flags *flag.FlagSet, orchestrator command.Orchestrator) Options
NewOptions returns an Options initialized with command line flags
type Stack ¶
Stack is the main type used by stack commands so they remain independent from kubernetes compose component version.
type StackClient ¶
type StackClient interface {
	StackConverter
	CreateOrUpdate(s Stack, childResources []childResource) error
	Delete(name string) error
	Get(name string) (Stack, error)
	List(opts metav1.ListOptions) ([]Stack, error)
	IsColliding(servicesClient corev1.ServiceInterface, s Stack) error
}
    StackClient talks to a kubernetes compose component.
type StackConverter ¶
type StackConverter interface {
	FromCompose(stderr io.Writer, name string, cfg *composetypes.Config) (Stack, error)
}
    StackConverter converts a compose types.Config to a Stack
func NewStackConverter ¶
func NewStackConverter(version string) (StackConverter, error)
NewStackConverter returns a converter from types.Config (compose) to the specified stack version or error out if the version is not supported or existent.