Runtime custom docker img (#1168)
* Add DeploymentOptions to K8s Client * WithBaseImage for Runtime * Revert Change * Fix sequencing
This commit is contained in:
@@ -343,7 +343,8 @@ func (k *kubernetes) Delete(s *runtime.Service) error {
|
||||
|
||||
// create new kubernetes micro service
|
||||
service := newService(s, runtime.CreateOptions{
|
||||
Type: k.options.Type,
|
||||
Type: k.options.Type,
|
||||
BaseImage: k.options.Source,
|
||||
})
|
||||
|
||||
return service.Stop(k.client)
|
||||
|
@@ -16,7 +16,7 @@ type Options struct {
|
||||
Source string
|
||||
}
|
||||
|
||||
// WithSource sets the host addresses to be used by the broker
|
||||
// WithSource sets the base image / repository
|
||||
func WithSource(src string) Option {
|
||||
return func(o *Options) {
|
||||
o.Source = src
|
||||
@@ -51,6 +51,8 @@ type CreateOptions struct {
|
||||
Output io.Writer
|
||||
// Type of service to create
|
||||
Type string
|
||||
// Base image for docker
|
||||
BaseImage string
|
||||
}
|
||||
|
||||
// ReadOptions queries runtime services
|
||||
@@ -92,6 +94,13 @@ func WithOutput(out io.Writer) CreateOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithBaseImage sets the docker img
|
||||
func WithBaseImage(img string) CreateOption {
|
||||
return func(o *CreateOptions) {
|
||||
o.BaseImage = img
|
||||
}
|
||||
}
|
||||
|
||||
// ReadService returns services with the given name
|
||||
func ReadService(service string) ReadOption {
|
||||
return func(o *ReadOptions) {
|
||||
|
Reference in New Issue
Block a user