Commit Graph

95 Commits

Author SHA1 Message Date
563768b58a v3 refactor ()
* Move to v3

Co-authored-by: Ben Toogood <bentoogood@gmail.com>
2020-07-27 13:22:00 +01:00
fbdf1f2c1c Fixing micro logs being follow by default against k8s () 2020-07-23 09:50:38 +02:00
0d860c53a6 runtime/kubernetes: ignore namespace already exists errors ()
Co-authored-by: Asim Aslam <asim@aslam.me>
2020-07-18 11:12:05 +01:00
7d41c2224e Don't close the stream () 2020-07-15 14:44:31 +01:00
f73ec65ac3 runtime/kubernetes: increase debugging () 2020-07-15 09:26:25 +01:00
09ec20fded runtime: provide credentials to services ()
* runtime: inject credentials into service

* util/auth: self generate accounts (needed for jwt)

* runtime/kubernetes: add logging for creds

* runtime/kubernetes: serialize secret name

* runtime/kubernetes: remove unused code

* runtime/kubernetes: base64 encode secret

* runtime/kubernetes: remove metadata from secret

* util/kubernetes/client: omit empty secret metadata

* util/kubernetes/client: fix secret template

* util/kubernetes/client: fix secrets

* web: update auth util

* util/auth: fix missing arg

* extend token expiry

* extend token expiry
2020-07-10 16:25:46 +01:00
3480e0a64e runtime/kubernetes: remove reference to runtime cells () 2020-07-09 20:21:34 +01:00
6d9a38a747 kubernetes: fixes for production ()
* util/kubernetes/client: add secrets to deployments

* util/kubernetes/client: remove ServiceAccountName override

* debugging

* runtime/kubernetes: fix error

* runtime/kubernetes: remove test secret

* util/kubernetes/client: update default image

* util/kubernetes/client: remove default command for deployments

* runtime/kubernetes: pass source as arg

* runtime/kubernetes: remove debugging

* util/kubernetes/client: revert default image change
2020-07-09 16:29:01 +01:00
86dfcb819b Ignore "no such process" error ()
* Cleanup how status is updated for service. Ignore "no such process" error as it could be that the pid died

* add nice error log to record process error exit
2020-06-12 10:42:52 +01:00
c19b349e96 Update runtime.Event struct 2020-05-19 10:14:07 +01:00
494e0b5060 Runtime: Add Kubernetes ServiceAccounts & Remove imagePullSecrets 2020-04-27 14:13:51 +01:00
d62ae23a9c Strip label 2020-04-23 20:20:48 +01:00
c68226e9b0 only do namespace check if not default 2020-04-23 19:19:13 +01:00
bb25bd94c8 Log k8s requests 2020-04-23 17:56:00 +01:00
616db3442a Debugging 2020-04-23 17:44:40 +01:00
8849b85a7f Merge branch 'master' of https://github.com/micro/go-micro into image-pull-secret-fix 2020-04-23 17:37:15 +01:00
4c05623a3c Image pull secret fix 2020-04-23 17:26:59 +01:00
ec929b3d2f log error and ensure we pass through namespace 2020-04-23 17:14:30 +01:00
2299559397 Check for namespace () 2020-04-23 16:22:41 +01:00
b692c045b5 Merge branch 'master' into git-secrets 2020-04-23 15:01:47 +01:00
88176dca53 Remove debugging 2020-04-23 14:13:07 +01:00
0f42346976 Additonal Debugging 2020-04-23 14:03:04 +01:00
692b27578c Runtime Namespace ()
* Add context option to runtime; Add dynamic namespace to kubectl client

* Add namespace runtime arg

* Fixes & Debugging

* Pass options in k8s runtime

* Set namespace on k8s resources

* Additional Logging

* More debugging

* Remove Debugging

* Ensure namespace exists

* Add debugging

* Refactor namespaceExists check

* Fix

* Fix

* Fix

* Fix

* Change the way we check for namespace

* Fix

* Tidying Up

* Fix Test

* Fix merge bugs

* Serialize k8s namespaces

* Add namespace to watch

* Serialize namespace when creating k8s namespace

Co-authored-by: Ben Toogood <ben@micro.mu>
Co-authored-by: Asim Aslam <asim@aslam.me>
2020-04-23 13:53:42 +01:00
316b81f790 Debugging 2020-04-23 13:11:00 +01:00
501a6bf3ea Add imagePullSecrets to PodSpec 2020-04-23 12:27:36 +01:00
16db76bee2 remove list endpoint from runtime and stop checking type in update 2020-04-17 17:54:34 +01:00
dca5305e8a replaced build with updated timestamp in runtime 2020-04-17 16:29:05 +01:00
2cafa289b6 Stop LogStream if there is an error in k8s pod log streaming ()
* Stop LogStream if there is an error in k8s pod log streaming

* Locking stream Stops

* PR comment
2020-04-02 12:16:35 +01:00
d2b6d35220 log.Errorf when pod streaming fails ()
* log.Errorf when pod streaming fails

* Error method added for loggers

Co-authored-by: Asim Aslam <asim@aslam.me>
2020-04-01 23:03:26 +01:00
bb51b8203e Runtime logs ()
* Runtime logs

* Slightly broken

* Pushing for diff

* Log trailing works locally

* LogsOptions

* Comments and streamcount support for local logs

* Adding kubernetes logs

* Fixing k8s logs

* K8s fixes

* StreamCount is now nuked

* PR comments

* PR comments again

* Fix typo
2020-04-01 15:40:15 +02:00
3d274ab6a2 Add namespace support to Kubernetes client ()
* Add namespace support to Kubernetes client

* Fix LastUpdateTime Condition
2020-03-31 12:03:32 +01:00
8d0826a031 Add check for k8s condition () 2020-03-25 19:32:41 +00:00
d2f153d795 Add type of service () 2020-03-20 12:48:12 +00:00
40ff6ddfcf sigh, further status changes () 2020-03-18 22:47:03 +00:00
5ad7c36bd4 Fix labels for k8s () 2020-03-18 22:13:21 +00:00
99c3fe2bb8 fix status parsing () 2020-03-18 21:50:52 +00:00
1bd340701b add k8s service ip to metadata ()
* add k8s service ip to metadata

* go fmt

* use same port as container
2020-03-18 18:27:29 +00:00
03031a694d use pod phase/status () 2020-03-16 23:47:34 +00:00
ca8684a886 fix k8s issues () 2020-03-15 15:09:18 +00:00
0449138f61 fix panic () 2020-03-14 21:18:41 +00:00
e803fb0855 Runtime hacks ()
* Add Args/Image to runtime

* remove the hacks
2020-03-13 18:39:59 +00:00
7b385bf163 minimize allocations in logger and tunnel code ()
* logs alloc

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* fix allocs

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* fix allocs

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* tunnel allocs

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* try to fix tunnel

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* cache cipher for send

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-11 17:55:39 +00:00
1f2e067f71 k8s runtime - get status from pods () 2020-03-02 15:49:10 +00:00
afe6861e2f Update the k8s deployment to use metadata labels & custom source () 2020-02-28 15:07:55 +00:00
dcf859098b Fix k8s commands for github () 2020-02-25 11:39:03 +00:00
5e8d5834eb Dynamic Runtime source for k8s with github packages ()
* Dynamic Runtime source for k8s

* Still check for source

* Replace / with - for k8s service names

* Simplify sourceForName function
2020-02-24 17:47:47 +00:00
117f56ebf7 prune util/log and user logger ()
* prune util/log and user logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* plaintext logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* add newline

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-23 13:45:20 +00:00
dbeb7cfe9c remove errors import 2020-02-06 18:45:12 +00:00
512df2628f trim source url if its set to github.com/ 2020-02-06 18:34:16 +00:00
0591760932 Arg => Args 2020-02-06 12:17:16 +00:00