This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
feat!: multiple services depending on same plugin implementation #61
Merged
Merged
Changes from 21 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
f78a72e
refactor generateClusterTopology to improve legibility
leoporoli 7872051
parsing services with kardinal.dev.service/plugin-definition annotati…
leoporoli c55d162
using plugin service name to identify them
leoporoli 59b20f4
Merge branch 'main' into lporoli/generate-cluster-topology-refac
leoporoli cd0881e
small change
leoporoli e4b0a07
adding comments in the dev flow
leoporoli 68c895a
update the plugin.CreateFlow signature to support multiple deployment…
leoporoli dee29ed
refactor how to execute plugins
leoporoli b311c00
Merge branch 'main' into lporoli/plugins-new-signature
leoporoli 27ffdc8
Merge branch 'lporoli/multi-dependents-plugin' into lporoli/plugins-n…
leoporoli 02e3a67
handling services plugins
leoporoli 7fa7fb8
handling plugins delete flow
leoporoli 24d0ff3
updating target service version in apply patch
leoporoli b66b60d
Merge branch 'main' into lporoli/plugins-new-signature
leoporoli 17cab3b
fix delete flow and fix plugins map used to execute plugins
leoporoli 032b753
cleaning the implementation
leoporoli 120ec6a
update plugin tests
leoporoli 3da1351
obd-demo file edited to support new plugins API
leoporoli 5834377
edited obd-demo
leoporoli a99ecd6
ci-e2e-tests edited
leoporoli ace7f77
teplate support new plugins API
leoporoli 29843bd
fix typo
leoporoli 84cd1e9
fix TestServiceConfigsToClusterTopology test
leoporoli 3317561
TODO removed
leoporoli 1785b15
fix TestExternalServicesFlowOnDependentService
leoporoli 19f64e6
fix TestHashFunc test
leoporoli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,6 +80,7 @@ spec: | |
targetPort: 8090 | ||
protocol: TCP | ||
appProtocol: HTTP | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
|
@@ -124,15 +125,12 @@ spec: | |
- name: "Cookie" | ||
value: "shop_session-id=x-liveness-probe" | ||
env: | ||
- name: ADDRESS | ||
value: ":8080" | ||
- name: FREECURRENCYAPIKEY | ||
value: "fca_live_nFVVF8CvfxqJhzMHB4N2x1NH7ffVVPwZr9hg3iNl" | ||
- name: JSDELIVRAPIKEY | ||
value: "prod" | ||
- name: CARTSERVICEHOST | ||
value: cartservice | ||
- name: PRODUCTCATALOGSERVICEHOST | ||
value: productcatalogservice | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
|
@@ -143,12 +141,7 @@ metadata: | |
version: v1 | ||
annotations: | ||
kardinal.dev.service/dependencies: "productcatalogservice:http,cartservice:http" | ||
kardinal.dev.service/plugins: | | ||
- name: https://github.com/kurtosis-tech/free-currency-api-plugin.git | ||
type: external | ||
servicename: free-currency-api | ||
args: | ||
api_key: fca_live_VKZlykCWEiFcpBHnw74pzd4vLi04q1h9JySbVHDF | ||
kardinal.dev.service/plugins: "jsdelivr-api" | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
|
@@ -210,33 +203,7 @@ metadata: | |
version: v1 | ||
annotations: | ||
kardinal.dev.service/stateful: "true" | ||
kardinal.dev.service/plugins: | | ||
- name: github.com/kurtosis-tech/postgres-seed-plugin | ||
args: | ||
seed_script: | | ||
-- create the table | ||
CREATE TABLE IF NOT EXISTS public.items( | ||
id bigserial PRIMARY KEY, | ||
created_at TIMESTAMP WITH TIME ZONE, | ||
updated_at TIMESTAMP WITH TIME ZONE, | ||
deleted_at TIMESTAMP WITH TIME ZONE, | ||
user_id TEXT, | ||
product_id TEXT, | ||
quantity INTEGER | ||
); | ||
|
||
INSERT INTO public.items (id, created_at, updated_at, deleted_at, user_id, product_id, quantity) | ||
VALUES (1, '2024-08-02 13:02:07.656104 +00:00', '2024-08-02 13:02:07.656104 +00:00', null, '0494c5e0-dde0-48fa-a6d8-f7962f5476bf', '66VCHSJNUP', 1); | ||
|
||
INSERT INTO public.items (id, created_at, updated_at, deleted_at, user_id, product_id, quantity) | ||
VALUES (2, '2024-08-02 13:02:10.891407 +00:00', '2024-08-02 13:02:10.891407 +00:00', null, '0494c5e0-dde0-48fa-a6d8-f7962f5476bf', '2ZYFJ3GM2N', 1); | ||
|
||
-- Set the sequence to the correct value after inserting records | ||
SELECT setval('public.items_id_seq', (SELECT MAX(id) FROM public.items)); | ||
db_name: "cart" | ||
db_user: "postgresuser" | ||
db_password: "postgrespass" | ||
|
||
kardinal.dev.service/plugins: "postgres-seed-plugin" | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
|
@@ -332,3 +299,51 @@ spec: | |
name: frontend | ||
port: | ||
number: 80 | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: jsdelivr-api | ||
annotations: | ||
kardinal.dev.service/plugin-definition: | | ||
- name: github.com/leoporoli/jsdelivr-api-plugin | ||
type: external | ||
servicename: jsdelivr-api | ||
args: | ||
api_key: "dev" | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: postgres-seed-plugin | ||
annotations: | ||
kardinal.dev.service/plugin-definition: | | ||
- name: github.com/leoporoli/postgres-seed-plugin | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will replace it in a next PR after merging plugins PRs |
||
type: stateful | ||
servicename: postgres-seed-plugin | ||
args: | ||
seed_script: | | ||
-- create the table | ||
CREATE TABLE IF NOT EXISTS public.items( | ||
id bigserial PRIMARY KEY, | ||
created_at TIMESTAMP WITH TIME ZONE, | ||
updated_at TIMESTAMP WITH TIME ZONE, | ||
deleted_at TIMESTAMP WITH TIME ZONE, | ||
user_id TEXT, | ||
product_id TEXT, | ||
quantity INTEGER | ||
); | ||
|
||
INSERT INTO public.items (id, created_at, updated_at, deleted_at, user_id, product_id, quantity) | ||
VALUES (1, '2024-08-02 13:02:07.656104 +00:00', '2024-08-02 13:02:07.656104 +00:00', null, '0494c5e0-dde0-48fa-a6d8-f7962f5476bf', '66VCHSJNUP', 1); | ||
|
||
INSERT INTO public.items (id, created_at, updated_at, deleted_at, user_id, product_id, quantity) | ||
VALUES (2, '2024-08-02 13:02:10.891407 +00:00', '2024-08-02 13:02:10.891407 +00:00', null, '0494c5e0-dde0-48fa-a6d8-f7962f5476bf', '2ZYFJ3GM2N', 1); | ||
|
||
-- Set the sequence to the correct value after inserting records | ||
SELECT setval('public.items_id_seq', (SELECT MAX(id) FROM public.items)); | ||
db_name: "cart" | ||
db_user: "postgresuser" | ||
db_password: "postgrespass" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will replace it in a next PR after merging plugins PRs