Commit Graph

62 Commits

Author SHA1 Message Date
Lars Lehtonen
98d55545fd
runtime/kubernetes: remove unused name variable 2020-01-30 09:25:50 -08:00
f23638c036 fix import paths for v2 release
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-01-30 14:44:40 +03:00
Asim Aslam
fa0d884cfe fix bad import 2020-01-19 23:31:09 +00:00
Asim Aslam
d918694346 reorganise runtime 2020-01-19 17:47:27 +00:00
Asim Aslam
e1ca40c1fc go fmt 2020-01-19 13:32:30 +00:00
Asim Aslam
11b104677a Shift embedded nats to the default 2020-01-19 00:55:01 +00:00
Asim Aslam
39d7938405 Extract k8s run error 2020-01-18 02:13:24 +00:00
Asim Aslam
be788415ad minor runtime fixes 2020-01-17 14:14:47 +00:00
Asim Aslam
491a42d352 Switch notifier to scheduler 2020-01-16 13:34:04 +00:00
Asim Aslam
e1e6199743 normalise runtime service status 2020-01-10 21:54:28 +00:00
Lars Lehtonen
fe9c68238f runtime/kubernetes: remove unused name variable (#1078) 2020-01-02 20:42:46 +00:00
Asim Aslam
61cde4a9f4
Kubernetes Registry (#1064)
* add teh k8s registry

* add k8s reg config/cmd

* go mod update
2019-12-27 20:08:46 +00:00
Asim Aslam
2fe64001c0 Start runtime services inline 2019-12-24 17:51:30 +00:00
Asim Aslam
c61e12d5ee add event proto for runtiem 2019-12-17 18:17:32 +00:00
Jake Sanders
e95f44d3f8 Move runtime/kubernetes/client to util/kubernetes/client 2019-12-17 11:32:38 +00:00
Asim Aslam
6e28e7a86f Save current state of the world 2019-12-11 14:37:03 +00:00
Asim Aslam
8da77a3ddc use fixed port names for runtime k8s 2019-12-10 14:05:05 +00:00
Asim Aslam
d50f30d743 strip handlers 2019-12-10 11:46:13 +00:00
a1eaf9cc20 linting fixes
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-12-04 00:22:02 +03:00
Asim Aslam
ce4acfa892 fix type filtering for k8s runtime 2019-11-29 13:05:18 +00:00
Asim Aslam
76b4e78a6a fix command to accept variadic args 2019-11-29 11:55:25 +00:00
Asim Aslam
c3ed83dfba Support service types in runtime 2019-11-29 11:35:00 +00:00
Asim Aslam
0d33c029a9
Merge pull request #994 from milosgajdos83/validator-regexp
Remove validator regexp as its no longer needed.
2019-11-27 08:10:00 +00:00
Milos Gajdos
8ecd2381a4
Remove validator regexp as its no longer needed. 2019-11-26 23:10:45 +00:00
Asim Aslam
811275be26 Add fixes for label selector and skipping things that don't match 2019-11-26 22:28:08 +00:00
Asim Aslam
3f3fd38601 Add spec.template.metadata.annotations to the k8s template 2019-11-26 18:14:49 +00:00
Asim Aslam
6475c1f3ad Patch spec template annotations and use event timestmap 2019-11-26 17:33:41 +00:00
Asim Aslam
deabf0b8c9 fix entry into nil map 2019-11-26 14:56:23 +00:00
Asim Aslam
b06854b0d5 Change the k8s runtime notifier update to get the deployment and update build 2019-11-26 13:49:52 +00:00
Asim Aslam
252667398e
Update the runtime for k8s name formatting and move Get to Read endpoint (#978)
* Update the runtime for k8s name formatting and move Get to Read endpoint

* strip regex validation
2019-11-25 16:31:14 +00:00
Asim Aslam
52ccd900c7 reorder service struct fields 2019-11-23 22:50:13 +00:00
Asim Aslam
cae4148594 Fix platform specific os/process build 2019-11-23 08:25:56 +00:00
Milos Gajdos
38e29c5101 Svc metadata (#972)
* Added service metadata

* Added metadata to runtime service

* Add Annotations metadata to service metadata

* Add micro/micro as default service owners

* Update runtime/kubernetes/client/kubernetes.go

Change comment

Co-Authored-By: Jake Sanders <i@am.so-aweso.me>
2019-11-22 17:10:00 +00:00
Milos Gajdos
8dc3fb964e Pass source of service to Deployment API; render templates properly (#969)
* Pass source of service to Deployment API; render templates properly

* Enable Go modules by default. Honor runtime.Service.Exec

* Make sure you remove go.mod and go.sum
2019-11-21 17:31:13 +00:00
Asim Aslam
212144d658 fix windows compilation error 2019-11-21 11:19:52 +00:00
Milos Gajdos
11d81221cc Runtime service implementation (#965) 2019-11-20 14:54:42 +00:00
Milos Gajdos
94d409b180
Change DefaultImage to micro/go-micro 2019-11-19 20:49:01 +00:00
Milos Gajdos
d6e97c5970 Service.Exec is a slice of strings (#960) 2019-11-19 19:36:29 +00:00
Milos Gajdos
6a0082741c Packager is now builder (#958) 2019-11-19 16:09:43 +00:00
Milos Gajdos
97c1300f53 [WIP] Micro Runtime (#947)
* Add Get() and GetOptions.

* Removed watcher. Outline of client. YAML templates

* Added default service and deployment templates and types

* Added API tests and cleaned up errors.

* Small refactoring. Template package is no more.

* Ripped out existing code in preparation to small rework

* Reshuffled the source code to make it organized better

* Create service and deployment in kubernetes runtime

* Major cleanup and refactoring of Kubernetes runtime

* Service now handles low level K8s API calls across both K8s deployment
an service API objects
* Runtime has a task queue that serves for queueing runtime action
requests
* General refactoring

* No need for Lock in k8s service

* Added kubernetes runtime env var to default deployment

* Enable running different versions of the same service

* Can't delete services through labels

* Proto cruft. Added runtime.CreateOptions implementation in proto

* Removed proxy service from default env variables

* Make service name mandatory param to Get method

* Get Delete changes from https://github.com/micro/go-micro/pull/945

* Replaced template files with global variables

* Validate service names before sending K8s API request

* Refactored Kubernetes API client. Fixed typos.

* Added client.Resource to make API resources more explicit in code
2019-11-15 13:41:40 +00:00
Asim Aslam
a91b3f3e8b windows specific os tag 2019-11-15 08:20:05 +00:00
Asim Aslam
383658edf2
Fix a runtime deadlock as well as fixing some graceful exiting issues (#945) 2019-11-14 14:26:21 +00:00
Milos Gajdos
0b1e6d7eaf Simplified k8s API Body watcher code and test. (#923) 2019-11-08 15:57:32 +00:00
Milos Gajdos
1ffa289d39 Make build timestamp parsing errors clearer (#929) 2019-11-08 15:57:07 +00:00
Milos Gajdos
68419cc024 Patch deployment spec metadata (#928) 2019-11-08 14:12:03 +00:00
Milos Gajdos
6f28852e1b K8s list deployments (#921)
* Outline of ListDeployments method

* Added implementation of DeploymentList
2019-11-07 07:44:57 +00:00
Till Knuesting
f67c5e779f preallocated slices (#917) 2019-11-05 17:43:12 +00:00
Asim Aslam
292da40886 runtime handler/proto placeholder 2019-11-02 22:54:35 +00:00
Milos Gajdos
6f7702a093 [WIP] K8s update and runtime package changes (#895)
* First commit: outline of K8s runtime package

* Added poller. Added auto-updater into default runtime

* Added build and updated Poller interface

* Added comments and NewRuntime that accepts Options

* DefaultPoller; Runtime options

* First commit to add Kubernetes cruft

* Add comments

* Add micro- prefix to K8s runtime service names

* Get rid of import cycles. Move K8s runtime into main runtime package

* Major refactoring: Poller replaced by Notifier

POller has been replaced by Notifier which returns a channel of events
that can be consumed and acted upon.

* Added runtime configuration options

* K8s runtime is now Kubernetes runtime in dedicated pkg. Naming kung-fu.

* Fix typo in command.

* Fixed typo

* Dont Delete service when runtime stops.

runtime.Stop stops services; no need to double-stop

* Track runtime services

* Parse Unix timestamps properly

* Added deployments into K8s client. Debug logging
2019-11-02 13:25:10 +00:00
Asim Aslam
e9dfccc616 Fix panic caused when ctrl+c a non started service 2019-11-01 15:08:01 +00:00