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
Copy file name to clipboardExpand all lines: provider/annotations.go
+23-3Lines changed: 23 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,11 @@ package provider
2
2
3
3
import (
4
4
"fmt"
5
+
"os"
5
6
6
7
"github.com/pulumi/pulumi-go-provider/infer"
7
8
)
8
9
9
-
// TODO: computed
10
-
11
10
var_= (infer.Annotated)((*NetworkArgs)(nil))
12
11
var_= (infer.Annotated)((*NetworkState)(nil))
13
12
@@ -80,7 +79,7 @@ func (v *VMInput) Annotate(a infer.Annotator) {
80
79
a.Describe(&v.Description, "The description of the virtual machine workload, optional with no restrictions")
81
80
a.Describe(&v.NodeID, "The node ID to deploy the virtual machine on, required and should match the requested resources")
82
81
a.Describe(&v.Flist, "The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist")
83
-
a.Describe(&v.Entrypoint, "The entry point for the flist. Example: /sbin/zinit init")
82
+
a.Describe(&v.EntryPoint, "The entry point for the flist. Example: /sbin/zinit init")
84
83
a.Describe(&v.FlistChecksum, "The checksum of the flist which should match the checksum of the given flist, optional")
85
84
a.Describe(&v.CPU, "The cpu units needed for the virtual machine. Range in [1: 32]")
86
85
a.Describe(&v.Memory, "The memory capacity for the virtual machine in MB. Min is 250 MB")
@@ -183,13 +182,17 @@ var _ = (infer.Annotated)((*K8sNodeInput)(nil))
a.SetDefault(&k.SSHKey, os.Getenv("SSH_KEY")) // for testing purposes
186
186
187
187
a.Describe(&k.Master, "Master holds the configuration of master node in the kubernetes cluster")
188
188
a.Describe(&k.Workers, "Workers is a list holding the workers configuration for the kubernetes cluster")
189
189
a.Describe(&k.NetworkName, "The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist")
190
190
a.Describe(&k.SolutionType, "The solution type of the cluster, displayed as project name in contract metadata")
191
191
a.Describe(&k.SSHKey, "SSH key to access the cluster nodes")
192
192
a.Describe(&k.Token, "The cluster secret token. Each node has to have this token to be part of the cluster. This token should be an alphanumeric non-empty string")
193
+
a.Describe(&k.Flist, "The flist to be mounted in the kubernetes cluster nodes. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist")
194
+
a.Describe(&k.EntryPoint, "The entry point for the flist. Example: /sbin/zinit init")
195
+
a.Describe(&k.FlistChecksum, "The checksum of the flist which should match the checksum of the given flist, optional")
a.Describe(&k.Name, "The name of the kubernetes node, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported")
210
+
a.Describe(&k.NetworkName, "The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist")
211
+
a.Describe(&k.Description, "The description of the kubernetes node, optional with no restrictions")
212
+
a.Describe(&k.NodeID, "The node ID to deploy the kubernetes node on, required and should match the requested resources")
213
+
a.Describe(&k.Flist, "The flist to be mounted in the kubernetes node. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist")
214
+
a.Describe(&k.EntryPoint, "The entry point for the flist. Example: /sbin/zinit init")
215
+
a.Describe(&k.FlistChecksum, "The checksum of the flist which should match the checksum of the given flist, optional")
216
+
a.Describe(&k.CPU, "The cpu units needed for the kubernetes node. Range in [1: 32]")
217
+
a.Describe(&k.Memory, "The memory capacity for the kubernetes node in MB. Min is 250 MB")
218
+
a.Describe(&k.Mycelium, "A flag to generate a random mycelium IP seed to support mycelium in the kubernetes node")
219
+
a.Describe(&k.MyceliumIPSeed, "The seed used for mycelium IP generated for the kubernetes node. It's length should be 6")
220
+
a.Describe(&k.Planetary, "A flag to enable generating a yggdrasil IP for the kubernetes node")
221
+
a.Describe(&k.PublicIP, "A flag to enable generating a public IP for the kubernetes node, public node is required for it")
222
+
a.Describe(&k.PublicIP6, "A flag to enable generating a public IPv6 for the kubernetes node, public node is required for it")
203
223
a.Describe(&k.DiskSize, "Data disk size in GBs. Must be between 1GB and 10240GBs (10TBs)")
Copy file name to clipboardExpand all lines: provider/cmd/pulumi-resource-threefold/schema.json
+43-48Lines changed: 43 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -155,102 +155,71 @@
155
155
"properties": {
156
156
"cpu": {
157
157
"type": "integer",
158
-
"description": "The cpu units needed for the virtual machine. Range in [1: 32]"
158
+
"description": "The cpu units needed for the kubernetes node. Range in [1: 32]"
159
159
},
160
160
"description": {
161
161
"type": "string",
162
-
"description": "The description of the virtual machine workload, optional with no restrictions"
162
+
"description": "The description of the kubernetes node, optional with no restrictions"
163
163
},
164
164
"disk_size": {
165
165
"type": "integer",
166
166
"description": "Data disk size in GBs. Must be between 1GB and 10240GBs (10TBs)"
167
167
},
168
-
"entrypoint": {
168
+
"entry_point": {
169
169
"type": "string",
170
-
"description": "The entry point for the flist. Example: /sbin/zinit init"
171
-
},
172
-
"env_vars": {
173
-
"type": "object",
174
-
"additionalProperties": {
175
-
"type": "string"
176
-
},
177
-
"description": "The environment variables to be passed to the virtual machine. Example: SSH_KEY"
170
+
"description": "The entry point for the flist. Example: /sbin/zinit init",
171
+
"default": "/sbin/zinit init"
178
172
},
179
173
"flist": {
180
174
"type": "string",
181
-
"description": "The flist to be mounted in the virtual machine, required and should be valid. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist"
175
+
"description": "The flist to be mounted in the kubernetes node. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist",
"description": "The checksum of the flist which should match the checksum of the given flist, optional"
186
181
},
187
-
"gpus": {
188
-
"type": "array",
189
-
"items": {
190
-
"type": "string"
191
-
},
192
-
"description": "A list of gpu IDs to be used in the virtual machine. GPU ID format: \u003cslot\u003e/\u003cvendor\u003e/\u003cdevice\u003e. Example: 0000:28:00.0/1002/731f"
193
-
},
194
182
"memory": {
195
183
"type": "integer",
196
-
"description": "The memory capacity for the virtual machine in MB. Min is 250 MB"
197
-
},
198
-
"mounts": {
199
-
"type": "array",
200
-
"items": {
201
-
"$ref": "#/types/threefold:index:Mount"
202
-
},
203
-
"description": "A list of mounted disks or volumes"
184
+
"description": "The memory capacity for the kubernetes node in MB. Min is 250 MB"
204
185
},
205
186
"mycelium": {
206
187
"type": "boolean",
207
-
"description": "A flag to generate a random mycelium IP seed to support mycelium in the virtual machine"
188
+
"description": "A flag to generate a random mycelium IP seed to support mycelium in the kubernetes node"
208
189
},
209
190
"mycelium_ip_seed": {
210
191
"type": "string",
211
-
"description": "The seed used for mycelium IP generated for the virtual machine. It's length should be 6"
192
+
"description": "The seed used for mycelium IP generated for the kubernetes node. It's length should be 6"
212
193
},
213
194
"name": {
214
195
"type": "string",
215
-
"description": "The name of the virtual machine workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported"
196
+
"description": "The name of the kubernetes node, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported"
216
197
},
217
198
"network_name": {
218
199
"type": "string",
219
200
"description": "The name of the network, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported. Network must exist"
220
201
},
221
202
"node_id": {
222
203
"$ref": "pulumi.json#/Any",
223
-
"description": "The node ID to deploy the virtual machine on, required and should match the requested resources"
204
+
"description": "The node ID to deploy the kubernetes node on, required and should match the requested resources"
224
205
},
225
206
"planetary": {
226
207
"type": "boolean",
227
-
"description": "A flag to enable generating a yggdrasil IP for the virtual machine"
208
+
"description": "A flag to enable generating a yggdrasil IP for the kubernetes node"
228
209
},
229
210
"public_ip": {
230
211
"type": "boolean",
231
-
"description": "A flag to enable generating a public IP for the virtual machine, public node is required for it"
212
+
"description": "A flag to enable generating a public IP for the kubernetes node, public node is required for it"
232
213
},
233
214
"public_ip6": {
234
215
"type": "boolean",
235
-
"description": "A flag to enable generating a public IPv6 for the virtual machine, public node is required for it"
236
-
},
237
-
"rootfs_size": {
238
-
"type": "integer",
239
-
"description": "The root fs size in GB (type SSD). Can be set as 0 to get the default minimum"
240
-
},
241
-
"zlogs": {
242
-
"type": "array",
243
-
"items": {
244
-
"$ref": "#/types/threefold:index:Zlog"
245
-
},
246
-
"description": "A list of virtual machine loggers"
216
+
"description": "A flag to enable generating a public IPv6 for the kubernetes node, public node is required for it"
247
217
}
248
218
},
249
219
"type": "object",
250
220
"required": [
251
221
"cpu",
252
222
"disk_size",
253
-
"flist",
254
223
"memory",
255
224
"name",
256
225
"network_name",
@@ -1083,6 +1052,18 @@
1083
1052
},
1084
1053
"threefold:index:Kubernetes": {
1085
1054
"properties": {
1055
+
"entry_point": {
1056
+
"type": "string",
1057
+
"description": "The entry point for the flist. Example: /sbin/zinit init"
1058
+
},
1059
+
"flist": {
1060
+
"type": "string",
1061
+
"description": "The flist to be mounted in the kubernetes cluster nodes. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist"
1062
+
},
1063
+
"flist_checksum": {
1064
+
"type": "string",
1065
+
"description": "The checksum of the flist which should match the checksum of the given flist, optional"
1066
+
},
1086
1067
"master": {
1087
1068
"$ref": "#/types/threefold:index:K8sNodeInput",
1088
1069
"description": "Master holds the configuration of master node in the kubernetes cluster"
@@ -1116,7 +1097,8 @@
1116
1097
},
1117
1098
"ssh_key": {
1118
1099
"type": "string",
1119
-
"description": "SSH key to access the cluster nodes"
1100
+
"description": "SSH key to access the cluster nodes",
1101
+
"default": ""
1120
1102
},
1121
1103
"token": {
1122
1104
"type": "string",
@@ -1149,6 +1131,18 @@
1149
1131
"workers_computed"
1150
1132
],
1151
1133
"inputProperties": {
1134
+
"entry_point": {
1135
+
"type": "string",
1136
+
"description": "The entry point for the flist. Example: /sbin/zinit init"
1137
+
},
1138
+
"flist": {
1139
+
"type": "string",
1140
+
"description": "The flist to be mounted in the kubernetes cluster nodes. Example: https://hub.grid.tf/tf-official-apps/base:latest.flist"
1141
+
},
1142
+
"flist_checksum": {
1143
+
"type": "string",
1144
+
"description": "The checksum of the flist which should match the checksum of the given flist, optional"
1145
+
},
1152
1146
"master": {
1153
1147
"$ref": "#/types/threefold:index:K8sNodeInput",
1154
1148
"description": "Master holds the configuration of master node in the kubernetes cluster"
@@ -1164,7 +1158,8 @@
1164
1158
},
1165
1159
"ssh_key": {
1166
1160
"type": "string",
1167
-
"description": "SSH key to access the cluster nodes"
1161
+
"description": "SSH key to access the cluster nodes",
0 commit comments