File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ artifacts:
1919 - /spcs_app/napp/img_repo/eap_backend
2020 - /spcs_app/napp/img_repo/eap_router
2121
22+ lifecycle_callbacks :
23+ version_initializer : v1.init
24+
2225privileges :
2326 - BIND SERVICE ENDPOINT :
2427 description : " Ability to create ingress URLs."
Original file line number Diff line number Diff line change 4949
5050GRANT USAGE ON PROCEDURE v1 .get_configuration (STRING) TO APPLICATION ROLE app_admin;
5151
52+ -- The version initializer callback is executed after a successful installation, upgrade, or downgrade of an application object.
53+ -- In case the application fails to upgrade, the version initializer of the previous (successful) version will be executed so you
54+ -- can clean up application state that may have been modified during the failed upgrade.
55+ CREATE OR REPLACE PROCEDURE v1 .init ()
56+ RETURNS STRING
57+ LANGUAGE SQL
58+ EXECUTE AS OWNER
59+ AS
60+ $$
61+ BEGIN
62+ ALTER SERVICE IF EXISTS app_public .frontend FROM SPECIFICATION_FILE= ' frontend.yaml' ;
63+ ALTER SERVICE IF EXISTS app_public .backend FROM SPECIFICATION_FILE= ' backend.yaml' ;
64+ RETURN ' init complete' ;
65+ END $$;
66+
67+ GRANT USAGE ON PROCEDURE v1 .init () TO APPLICATION ROLE app_admin;
68+
5269CREATE OR REPLACE PROCEDURE v1 .start_backend (pool_name VARCHAR )
5370 RETURNS string
5471 LANGUAGE sql
You can’t perform that action at this time.
0 commit comments