Skip to content

Commit 87e6e0f

Browse files
authored
fix: auto-reconcile Tailscale IP in k3s config on agent restart (#122)
Co-authored-by: Flegma <Flegma@users.noreply.github.com>
1 parent 1131d24 commit 87e6e0f

12 files changed

Lines changed: 299 additions & 25 deletions

File tree

generated/schema.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28259,7 +28259,7 @@ export interface notifications_avg_order_by {steam_id?: (order_by | null)}
2825928259

2826028260

2826128261
/** Boolean expression to filter rows from the table "notifications". All fields are combined with a logical 'AND'. */
28262-
export interface notifications_bool_exp {_and?: (notifications_bool_exp[] | null),_not?: (notifications_bool_exp | null),_or?: (notifications_bool_exp[] | null),actions?: (jsonb_comparison_exp | null),created_at?: (timestamptz_comparison_exp | null),deleted_at?: (timestamptz_comparison_exp | null),entity_id?: (String_comparison_exp | null),id?: (uuid_comparison_exp | null),is_read?: (Boolean_comparison_exp | null),message?: (String_comparison_exp | null),player?: (players_bool_exp | null),role?: (e_player_roles_enum_comparison_exp | null),steam_id?: (bigint_comparison_exp | null),title?: (String_comparison_exp | null),type?: (e_notification_types_enum_comparison_exp | null)}
28262+
export interface notifications_bool_exp {_and?: (notifications_bool_exp[] | null),_not?: (notifications_bool_exp | null),_or?: (notifications_bool_exp[] | null),actions?: (jsonb_comparison_exp | null),created_at?: (timestamptz_comparison_exp | null),deletable?: (Boolean_comparison_exp | null),deleted_at?: (timestamptz_comparison_exp | null),entity_id?: (String_comparison_exp | null),id?: (uuid_comparison_exp | null),is_read?: (Boolean_comparison_exp | null),message?: (String_comparison_exp | null),player?: (players_bool_exp | null),role?: (e_player_roles_enum_comparison_exp | null),steam_id?: (bigint_comparison_exp | null),title?: (String_comparison_exp | null),type?: (e_notification_types_enum_comparison_exp | null)}
2826328263

2826428264

2826528265
/** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */
@@ -28279,7 +28279,7 @@ export interface notifications_inc_input {steam_id?: (Scalars['bigint'] | null)}
2827928279

2828028280

2828128281
/** input type for inserting data into table "notifications" */
28282-
export interface notifications_insert_input {actions?: (Scalars['jsonb'] | null),created_at?: (Scalars['timestamptz'] | null),deleted_at?: (Scalars['timestamptz'] | null),entity_id?: (Scalars['String'] | null),id?: (Scalars['uuid'] | null),is_read?: (Scalars['Boolean'] | null),message?: (Scalars['String'] | null),player?: (players_obj_rel_insert_input | null),role?: (e_player_roles_enum | null),steam_id?: (Scalars['bigint'] | null),title?: (Scalars['String'] | null),type?: (e_notification_types_enum | null)}
28282+
export interface notifications_insert_input {actions?: (Scalars['jsonb'] | null),created_at?: (Scalars['timestamptz'] | null),deletable?: (Scalars['Boolean'] | null),deleted_at?: (Scalars['timestamptz'] | null),entity_id?: (Scalars['String'] | null),id?: (Scalars['uuid'] | null),is_read?: (Scalars['Boolean'] | null),message?: (Scalars['String'] | null),player?: (players_obj_rel_insert_input | null),role?: (e_player_roles_enum | null),steam_id?: (Scalars['bigint'] | null),title?: (Scalars['String'] | null),type?: (e_notification_types_enum | null)}
2828328283

2828428284

2828528285
/** aggregate max on columns */
@@ -28346,7 +28346,7 @@ export interface notifications_prepend_input {actions?: (Scalars['jsonb'] | null
2834628346

2834728347

2834828348
/** input type for updating data in table "notifications" */
28349-
export interface notifications_set_input {actions?: (Scalars['jsonb'] | null),created_at?: (Scalars['timestamptz'] | null),deleted_at?: (Scalars['timestamptz'] | null),entity_id?: (Scalars['String'] | null),id?: (Scalars['uuid'] | null),is_read?: (Scalars['Boolean'] | null),message?: (Scalars['String'] | null),role?: (e_player_roles_enum | null),steam_id?: (Scalars['bigint'] | null),title?: (Scalars['String'] | null),type?: (e_notification_types_enum | null)}
28349+
export interface notifications_set_input {actions?: (Scalars['jsonb'] | null),created_at?: (Scalars['timestamptz'] | null),deletable?: (Scalars['Boolean'] | null),deleted_at?: (Scalars['timestamptz'] | null),entity_id?: (Scalars['String'] | null),id?: (Scalars['uuid'] | null),is_read?: (Scalars['Boolean'] | null),message?: (Scalars['String'] | null),role?: (e_player_roles_enum | null),steam_id?: (Scalars['bigint'] | null),title?: (Scalars['String'] | null),type?: (e_notification_types_enum | null)}
2835028350

2835128351

2835228352
/** aggregate stddev on columns */

generated/types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25774,6 +25774,9 @@ export default {
2577425774
"created_at": [
2577525775
2209
2577625776
],
25777+
"deletable": [
25778+
4
25779+
],
2577725780
"deleted_at": [
2577825781
2209
2577925782
],
@@ -25848,6 +25851,9 @@ export default {
2584825851
"created_at": [
2584925852
2208
2585025853
],
25854+
"deletable": [
25855+
3
25856+
],
2585125857
"deleted_at": [
2585225858
2208
2585325859
],
@@ -26078,6 +26084,9 @@ export default {
2607826084
"created_at": [
2607926085
2208
2608026086
],
26087+
"deletable": [
26088+
3
26089+
],
2608126090
"deleted_at": [
2608226091
2208
2608326092
],

hasura/metadata/databases/default/tables/public_game_server_nodes.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ select_permissions:
6262
- cpu_threads_per_core
6363
- csgo_build_id
6464
- demo_network_limiter
65+
- disk_available_gb
66+
- disk_used_percent
6567
- enabled
6668
- end_port_range
6769
- gpu

hasura/metadata/databases/default/tables/public_notifications.yaml

Lines changed: 47 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ select_permissions:
1111
columns:
1212
- actions
1313
- created_at
14+
- deletable
1415
- deleted_at
1516
- entity_id
1617
- id
@@ -32,6 +33,7 @@ select_permissions:
3233
columns:
3334
- actions
3435
- created_at
36+
- deletable
3537
- deleted_at
3638
- entity_id
3739
- id
@@ -53,6 +55,7 @@ select_permissions:
5355
columns:
5456
- actions
5557
- created_at
58+
- deletable
5659
- deleted_at
5760
- entity_id
5861
- id
@@ -76,6 +79,7 @@ select_permissions:
7679
columns:
7780
- actions
7881
- created_at
82+
- deletable
7983
- deleted_at
8084
- entity_id
8185
- id
@@ -102,11 +106,17 @@ update_permissions:
102106
- role:
103107
_eq: administrator
104108
check:
105-
_or:
106-
- steam_id:
107-
_eq: X-Hasura-User-Id
108-
- role:
109-
_eq: administrator
109+
_and:
110+
- _or:
111+
- steam_id:
112+
_eq: X-Hasura-User-Id
113+
- role:
114+
_eq: administrator
115+
- _or:
116+
- deleted_at:
117+
_is_null: true
118+
- deletable:
119+
_eq: true
110120
comment: ""
111121
- role: match_organizer
112122
permission:
@@ -120,11 +130,17 @@ update_permissions:
120130
- role:
121131
_eq: match_organizer
122132
check:
123-
_or:
124-
- steam_id:
125-
_eq: X-Hasura-User-Id
126-
- role:
127-
_eq: match_organizer
133+
_and:
134+
- _or:
135+
- steam_id:
136+
_eq: X-Hasura-User-Id
137+
- role:
138+
_eq: match_organizer
139+
- _or:
140+
- deleted_at:
141+
_is_null: true
142+
- deletable:
143+
_eq: true
128144
comment: ""
129145
- role: tournament_organizer
130146
permission:
@@ -140,13 +156,19 @@ update_permissions:
140156
- match_organizer
141157
- tournament_organizer
142158
check:
143-
_or:
144-
- steam_id:
145-
_eq: X-Hasura-User-Id
146-
- role:
147-
_in:
148-
- match_organizer
149-
- tournament_organizer
159+
_and:
160+
- _or:
161+
- steam_id:
162+
_eq: X-Hasura-User-Id
163+
- role:
164+
_in:
165+
- match_organizer
166+
- tournament_organizer
167+
- _or:
168+
- deleted_at:
169+
_is_null: true
170+
- deletable:
171+
_eq: true
150172
comment: ""
151173
- role: user
152174
permission:
@@ -157,6 +179,12 @@ update_permissions:
157179
steam_id:
158180
_eq: X-Hasura-User-Id
159181
check:
160-
steam_id:
161-
_eq: X-Hasura-User-Id
182+
_and:
183+
- steam_id:
184+
_eq: X-Hasura-User-Id
185+
- _or:
186+
- deleted_at:
187+
_is_null: true
188+
- deletable:
189+
_eq: true
162190
comment: ""
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE "public"."game_server_nodes" DROP COLUMN "disk_available_gb";
2+
ALTER TABLE "public"."game_server_nodes" DROP COLUMN "disk_used_percent";
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE "public"."game_server_nodes" ADD COLUMN "disk_available_gb" integer;
2+
ALTER TABLE "public"."game_server_nodes" ADD COLUMN "disk_used_percent" integer;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "public"."notifications" DROP COLUMN "deletable";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "public"."notifications" ADD COLUMN "deletable" boolean NOT NULL DEFAULT true;

0 commit comments

Comments
 (0)