-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Database resource group manager
- Loading branch information
Showing
10 changed files
with
291 additions
and
120 deletions.
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
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
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{- if eq .Values.resourceGroups.type "properties" }} | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: {{ include "trino.fullname" . }}-test-add-resourcegroups-data | ||
labels: | ||
{{- include "trino.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: test | ||
test: add-resource-groups-data | ||
annotations: | ||
"helm.sh/hook": test | ||
"helm.sh/hook-weight": "-1" | ||
spec: | ||
containers: | ||
- name: mysql-client | ||
image: bitnami/mysql:8.1 | ||
command: | ||
- /bin/sh | ||
- -c | ||
- | | ||
echo "Inserting data into MySQL"; | ||
mysql -h trino-resource-groups-db-mysql.mysql.svc.cluster.local -u trino -ppass0000 resource_groups -e " | ||
-- create a root group 'admin' with NULL parent | ||
INSERT INTO resource_groups (name, soft_memory_limit, hard_concurrency_limit, max_queued, scheduling_policy, environment) | ||
VALUES ('admin', '100%', 50, 100, 'query_priority', 'production'); | ||
-- use ID of 'admin' resource group for selector | ||
INSERT INTO selectors (resource_group_id, user_regex, priority) VALUES ((SELECT resource_group_id FROM resource_groups WHERE name = 'admin'), 'admin', 6); | ||
-- check data | ||
SELECT * FROM resource_groups; | ||
SELECT * FROM selectors;"; | ||
sleep 5 | ||
restartPolicy: Never | ||
{{- end }} |
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.