package kubernetes
import "github.com/docker/cli/cli/command/stack/kubernetes"
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 NewFactory(namespace string, config *restclient.Config, clientSet *kubeclient.Clientset) (*Factory, error)
- 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
Functions ¶
func AddNamespaceFlag ¶
AddNamespaceFlag adds the namespace flag to the given flag set
func GetServices ¶
GetServices is the kubernetes implementation of listing stack services
func GetStacks ¶
GetStacks lists the kubernetes stacks
func RunDeploy ¶
RunDeploy is the kubernetes implementation of docker stack deploy
func RunPS ¶
RunPS is the kubernetes implementation of docker stack ps
func RunRemove ¶
RunRemove is the kubernetes implementation of docker stack remove
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
func (*Factory) Stacks ¶
func (s *Factory) Stacks(allNamespaces bool) (StackClient, error)
Stacks returns a client for Docker's Stack on Kubernetes
type KubeCli ¶
KubeCli holds kubernetes specifics (client, namespace) with the command.Cli
func WrapCli ¶
WrapCli wraps command.Cli with kubernetes specifics
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.
Source Files ¶
cli.go client.go conversion.go convert.go deploy.go list.go ps.go remove.go services.go stack.go stackclient.go warnings.go watcher.go
- Version
- v20.10.0+incompatible
- Published
- Dec 7, 2020
- Platform
- linux/amd64
- Imports
- 57 packages
- Last checked
- 12 seconds ago –
Tools for package owners.