You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DELETEFROM plugin_step_variable WHERE plugin_step_id =(SELECTps.idFROM plugin_metadata p inner JOIN plugin_step ps onps.plugin_id=p.idWHEREp.name='GKE Provisioner v1.1.0'and ps."index"=1andps.deleted=false);
2
+
DELETEFROM plugin_step WHERE plugin_id=(SELECT id FROM plugin_metadata WHERE name='GKE Provisioner v1.1.0');
3
+
DELETEFROM plugin_stage_mapping WHERE plugin_id =(SELECT id FROM plugin_metadata WHERE name='GKE Provisioner v1.1.0');
4
+
DELETEfrom pipeline_stage_step_variable where pipeline_stage_step_id =(select pipeline_stage_id from pipeline_stage_step where name='GKE Provisioner v1.1.0');
5
+
DELETEfrom pipeline_stage_step where name ='GKE Provisioner v1.1.0';
6
+
DELETEfrom plugin_tag_relation where plugin_id=(SELECT id FROM plugin_metadata WHERE name='GKE Provisioner v1.1.0');
7
+
DELETEFROM plugin_metadata WHERE name ='GKE Provisioner v1.1.0';
INSERT INTO plugin_metadata (id,name,description,type,icon,deleted,created_on,created_by,updated_on,updated_by)
2
+
VALUES (nextval('id_seq_plugin_metadata'),'GKE Provisioner v1.1.0','Provision a Google Kubernetes Engine cluster within a Google Cloud Platform project. The cluster should be configured with an initial firewall setting designed to permit access only to SSH, ports 80 and 8080, and NodePorts','PRESET','https://raw.githubusercontent.com/ajaydevtron/devtron/main/assets/gke-plugin-icon.png',false,'now()',1,'now()',1);
3
+
4
+
INSERT INTO plugin_tag (id, name, deleted, created_on, created_by, updated_on, updated_by)
5
+
SELECT
6
+
nextval('id_seq_plugin_tag'),
7
+
'Google Kubernetes Engine',
8
+
false,
9
+
'now()',
10
+
1,
11
+
'now()',
12
+
1
13
+
WHERE NOT EXISTS (
14
+
SELECT1
15
+
FROM plugin_tag
16
+
WHERE name ='Google Kubernetes Engine'
17
+
);
18
+
19
+
INSERT INTO plugin_tag (id, name, deleted, created_on, created_by, updated_on, updated_by)
20
+
SELECT
21
+
nextval('id_seq_plugin_tag'),
22
+
'GCP',
23
+
false,
24
+
'now()',
25
+
1,
26
+
'now()',
27
+
1
28
+
WHERE NOT EXISTS (
29
+
SELECT1
30
+
FROM plugin_tag
31
+
WHERE name ='GCP'
32
+
);
33
+
34
+
INSERT INTO plugin_tag (id, name, deleted, created_on, created_by, updated_on, updated_by)
35
+
SELECT
36
+
nextval('id_seq_plugin_tag'),
37
+
'Kubernetes',
38
+
false,
39
+
'now()',
40
+
1,
41
+
'now()',
42
+
1
43
+
WHERE NOT EXISTS (
44
+
SELECT1
45
+
FROM plugin_tag
46
+
WHERE name ='Kubernetes'
47
+
);
48
+
49
+
50
+
INSERT INTO"plugin_tag_relation" ("id", "tag_id", "plugin_id", "created_on", "created_by", "updated_on", "updated_by") VALUES (nextval('id_seq_plugin_tag_relation'), (SELECT id FROM plugin_tag WHERE name='Google Kubernetes Engine'), (SELECT id FROM plugin_metadata WHERE name='GKE Provisioner v1.1.0'),'now()', 1, 'now()', 1);
51
+
INSERT INTO"plugin_tag_relation" ("id", "tag_id", "plugin_id", "created_on", "created_by", "updated_on", "updated_by") VALUES (nextval('id_seq_plugin_tag_relation'), (SELECT id FROM plugin_tag WHERE name='Kubernetes'), (SELECT id FROM plugin_metadata WHERE name='GKE Provisioner v1.1.0'),'now()', 1, 'now()', 1);
52
+
INSERT INTO"plugin_tag_relation" ("id", "tag_id", "plugin_id", "created_on", "created_by", "updated_on", "updated_by") VALUES (nextval('id_seq_plugin_tag_relation'), (SELECT id FROM plugin_tag WHERE name='GCP'), (SELECT id FROM plugin_metadata WHERE name='GKE Provisioner v1.1.0'),'now()', 1, 'now()', 1);
echo -e "\\n****** The GCP service account has not been provided for provisioning a GKE cluster. Please provide the encoded format of the JSON file for the service account. For instructions on creating a service account and assigning the necessary permissions, refer to the following documentation : https://cloud.google.com/iam/docs/service-accounts-create#iam-service-accounts-create-console"
INSERT INTO"plugin_step" ("id", "plugin_id","name","description","index","step_type","script_id","deleted", "created_on", "created_by", "updated_on", "updated_by") VALUES (nextval('id_seq_plugin_step'), (SELECT id FROM plugin_metadata WHERE name='GKE Provisioner v1.1.0'),'Step 1','Step 1 - GKE Devtron plugin','1','INLINE',(SELECT last_value FROM id_seq_plugin_pipeline_script),'f','now()', 1, 'now()', 1);
140
+
141
+
INSERT INTO plugin_step_variable (id,plugin_step_id,name,format,description,is_exposed,allow_empty_value,default_value,value,variable_type,value_type,previous_step_index,variable_step_index,variable_step_index_in_plugin,reference_variable_name,deleted,created_on,created_by,updated_on,updated_by)
142
+
VALUES (nextval('id_seq_plugin_step_variable'),(SELECTps.idFROM plugin_metadata p inner JOIN plugin_step ps onps.plugin_id=p.idWHEREp.name='GKE Provisioner v1.1.0'and ps."index"=1andps.deleted=false),'GcpServiceAccountEncodedCredential','STRING','GCP service account(base64 encoded) that to be used to create GKE cluster in the project','t','f',null,null,'INPUT','NEW',null,1,null,null,'f','now()',1,'now()',1),
143
+
(nextval('id_seq_plugin_step_variable'),(SELECTps.idFROM plugin_metadata p inner JOIN plugin_step ps onps.plugin_id=p.idWHEREp.name='GKE Provisioner v1.1.0'and ps."index"=1andps.deleted=false),'GkeMinNodes','STRING','The minimum number of nodes in the cluster, default is 1','t','t',null,null,'INPUT','NEW',null,1,null,null,'f','now()',1,'now()',1),
144
+
(nextval('id_seq_plugin_step_variable'),(SELECTps.idFROM plugin_metadata p inner JOIN plugin_step ps onps.plugin_id=p.idWHEREp.name='GKE Provisioner v1.1.0'and ps."index"=1andps.deleted=false),'DisplayGkeKubeConfig','BOOL','Do we want to display the kubeconfig? Value either true or false.','t','t',null,null,'INPUT','NEW',null,1,null,null,'f','now()',1,'now()',1),
145
+
(nextval('id_seq_plugin_step_variable'),(SELECTps.idFROM plugin_metadata p inner JOIN plugin_step ps onps.plugin_id=p.idWHEREp.name='GKE Provisioner v1.1.0'and ps."index"=1andps.deleted=false),'Identifier','STRING','A string which identifies the purpose for which this cluster is being created. Used to name other resources created.','t','f',null,null,'INPUT','NEW',null,1,null,null,'f','now()',1,'now()',1),
146
+
(nextval('id_seq_plugin_step_variable'),(SELECTps.idFROM plugin_metadata p inner JOIN plugin_step ps onps.plugin_id=p.idWHEREp.name='GKE Provisioner v1.1.0'and ps."index"=1andps.deleted=false),'GkeMaxNodes','STRING','The maximum number of nodes in the cluster, default is 3','t','t',null,null,'INPUT','NEW',null,1,null,null,'f','now()',1,'now()',1),
147
+
(nextval('id_seq_plugin_step_variable'),(SELECTps.idFROM plugin_metadata p inner JOIN plugin_step ps onps.plugin_id=p.idWHEREp.name='GKE Provisioner v1.1.0'and ps."index"=1andps.deleted=false),'GkeNodeServiceAccountName','STRING','The Google Cloud Platform Service Account to be used by the node VMs, If no Service Account is specified, the project default service account is used.','t','t',null,null,'INPUT','NEW',null,1,null,null,'f','now()',1,'now()',1),
148
+
(nextval('id_seq_plugin_step_variable'),(SELECTps.idFROM plugin_metadata p inner JOIN plugin_step ps onps.plugin_id=p.idWHEREp.name='GKE Provisioner v1.1.0'and ps."index"=1andps.deleted=false),'GkeRegion','STRING','The region to create the cluster in, default is us-central1 ','t','t',null,null,'INPUT','NEW',null,1,null,null,'f','now()',1,'now()',1),
149
+
(nextval('id_seq_plugin_step_variable'),(SELECTps.idFROM plugin_metadata p inner JOIN plugin_step ps onps.plugin_id=p.idWHEREp.name='GKE Provisioner v1.1.0'and ps."index"=1andps.deleted=false),'GkeMachineType','STRING','The machine type to create, default is n1-standard-4 ','t','t',null,null,'INPUT','NEW',null,1,null,null,'f','now()',1,'now()',1),
150
+
(nextval('id_seq_plugin_step_variable'),(SELECTps.idFROM plugin_metadata p inner JOIN plugin_step ps onps.plugin_id=p.idWHEREp.name='GKE Provisioner v1.1.0'and ps."index"=1andps.deleted=false),'GkeImageType','STRING','The type of image to create the nodes , default is cos','t','t',null,null,'INPUT','NEW',null,1,null,null,'f','now()',1,'now()',1),
151
+
(nextval('id_seq_plugin_step_variable'),(SELECTps.idFROM plugin_metadata p inner JOIN plugin_step ps onps.plugin_id=p.idWHEREp.name='GKE Provisioner v1.1.0'and ps."index"=1andps.deleted=false),'GcpProjectId','STRING','The name of the GCP project in which to create the GKE cluster','t','f',null,null,'INPUT','NEW',null,1,null,null,'f','now()',1,'now()',1),
152
+
(nextval('id_seq_plugin_step_variable'),(SELECTps.idFROM plugin_metadata p inner JOIN plugin_step ps onps.plugin_id=p.idWHEREp.name='GKE Provisioner v1.1.0'and ps."index"=1andps.deleted=false),'GkeClusterVersion','STRING','The GKE k8s version to install, default is latest','t','t',null,null,'INPUT','NEW',null,1,null,null,'f','now()',1,'now()',1),
153
+
(nextval('id_seq_plugin_step_variable'),(SELECTps.idFROM plugin_metadata p inner JOIN plugin_step ps onps.plugin_id=p.idWHEREp.name='GKE Provisioner v1.1.0'and ps."index"=1andps.deleted=false),'GkeKubeconfigFilePath','STRING','The kubeconfig path of gke cluster','t','f',false,null,'OUTPUT','NEW',null,1,null,null,'f','now()',1,'now()',1);
154
+
155
+
156
+
INSERT INTO plugin_stage_mapping (id,plugin_id,stage_type,created_on,created_by,updated_on,updated_by)VALUES (nextval('id_seq_plugin_stage_mapping'),
157
+
158
+
(SELECT id from plugin_metadata where name='GKE Provisioner v1.1.0'), 0,'now()',1,'now()',1);
159
+
160
+
UPDATE plugin_pipeline_script SET script=
161
+
'#!/bin/sh
162
+
repoName=""
163
+
branchName=""
164
+
# Define the function to extract repoName and branchName
0 commit comments