Skip to content

Commit

Permalink
Merge branch 'main' into tedi/envvars
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Oct 18, 2024
2 parents 666bc03 + fde1dc7 commit 7f9726b
Show file tree
Hide file tree
Showing 26 changed files with 1,704 additions and 216 deletions.
9 changes: 9 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
linters:
enable:
- exhaustruct
- exportloopref
- gomnd
- staticcheck
- exhaustive
max-issues-per-linter: 0
sort-results: true
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Changelog

## [0.4.3](https://github.com/kurtosis-tech/kardinal/compare/0.4.2...0.4.3) (2024-10-14)


### Bug Fixes

* fix unsupported resources deployment ([#278](https://github.com/kurtosis-tech/kardinal/issues/278)) ([f278c09](https://github.com/kurtosis-tech/kardinal/commit/f278c09089ab0f37cdeb529839e5805f96655ac4))

## [0.4.2](https://github.com/kurtosis-tech/kardinal/compare/0.4.1...0.4.2) (2024-10-14)


### Features

* deploy unsupported Kubernetes resources ([#272](https://github.com/kurtosis-tech/kardinal/issues/272)) ([6c034d6](https://github.com/kurtosis-tech/kardinal/commit/6c034d694338d338b823da744f91c1b65b134f8d))

## [0.4.1](https://github.com/kurtosis-tech/kardinal/compare/0.4.0...0.4.1) (2024-10-03)


### Bug Fixes

* add auth for statefulset during manager deployment ([#268](https://github.com/kurtosis-tech/kardinal/issues/268)) ([9c011c6](https://github.com/kurtosis-tech/kardinal/commit/9c011c66f8315a5ada9183ac0b5873a4156f7246))

## [0.4.0](https://github.com/kurtosis-tech/kardinal/compare/0.3.3...0.4.0) (2024-10-03)


### ⚠ BREAKING CHANGES

* add support to StatefulSet ([#263](https://github.com/kurtosis-tech/kardinal/issues/263))

### Features

* add canonical tag to website pages ([#266](https://github.com/kurtosis-tech/kardinal/issues/266)) ([64bdab1](https://github.com/kurtosis-tech/kardinal/commit/64bdab125ed308ca5282f70f58b0d88949e3c124)), closes [#236](https://github.com/kurtosis-tech/kardinal/issues/236)
* add support to StatefulSet ([#263](https://github.com/kurtosis-tech/kardinal/issues/263)) ([a1632d5](https://github.com/kurtosis-tech/kardinal/commit/a1632d5aecd857f8de5b77db342c39daff91bcb2))


### Bug Fixes

* avoid trying to delete default namespace ([#265](https://github.com/kurtosis-tech/kardinal/issues/265)) ([907ad38](https://github.com/kurtosis-tech/kardinal/commit/907ad38cde24d7a7baac2b3b900187685be92149))

## [0.3.3](https://github.com/kurtosis-tech/kardinal/compare/0.3.2...0.3.3) (2024-10-02)


Expand Down
87 changes: 52 additions & 35 deletions ci/obd-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ spec:
env:
- name: ADDRESS
value: ":8080"
- name: FREECURRENCYAPIKEY
value: "fca_live_nFVVF8CvfxqJhzMHB4N2x1NH7ffVVPwZr9hg3iNl"
- name: JSDELIVRAPIKEY
value: "prod"
- name: CARTSERVICEHOST
value: cartservice
- name: PRODUCTCATALOGSERVICEHOST
Expand All @@ -143,12 +143,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:
Expand All @@ -162,7 +157,7 @@ spec:

---
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: postgres-v1
labels:
Expand Down Expand Up @@ -210,32 +205,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
Expand Down Expand Up @@ -332,3 +302,50 @@ spec:
name: frontend
port:
number: 80
---
apiVersion: v1
kind: Service
metadata:
name: jsdelivr-api
annotations:
kardinal.dev.service/plugin-definition: |
- name: github.com/kurtosis-tech/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/kurtosis-tech/postgres-seed-plugin
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"
65 changes: 38 additions & 27 deletions ci/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,43 @@ metadata:
name: postgres
annotations:
kardinal.dev.service/shared: "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);
kardinal.dev.service/plugins: "postgres-seed-plugin"

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);

INSERT INTO public.items (id, created_at, updated_at, deleted_at, user_id, product_id, quantity)
VALUES (3, '2024-08-02 13:03:10.891407 +00:00', '2024-08-02 13:02:10.891407 +00:00', null, '0494c5e0-dde0-48fa-a6d8-f7962f5476bf', '2ZYFJ3GM2N', ${last_insert_quantity:-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"
---
apiVersion: v1
kind: Service
metadata:
name: postgres-seed-plugin
annotations:
kardinal.dev.service/plugin-definition: |
- name: github.com/kurtosis-tech/postgres-seed-plugin
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);

INSERT INTO public.items (id, created_at, updated_at, deleted_at, user_id, product_id, quantity)
VALUES (3, '2024-08-02 13:03:10.891407 +00:00', '2024-08-02 13:02:10.891407 +00:00', null, '0494c5e0-dde0-48fa-a6d8-f7962f5476bf', '2ZYFJ3GM2N', ${last_insert_quantity:-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"
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7f9726b

Please sign in to comment.