Skip to content

Commit

Permalink
add default values of flist and entrypoint to master
Browse files Browse the repository at this point in the history
  • Loading branch information
Eslam-Nawara committed Sep 25, 2024
1 parent 4596cdf commit 6a04f2e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.9.0
github.com/threefoldtech/tfgrid-sdk-go/grid-client v0.15.17-dev
github.com/threefoldtech/tfgrid-sdk-go/grid-client v0.15.17
github.com/threefoldtech/tfgrid-sdk-go/grid-proxy v0.15.16
github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.15.16
github.com/threefoldtech/zos v0.5.6-0.20240902110349-172a0a29a6ee
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/threefoldtech/tfchain/clients/tfchain-client-go v0.0.0-20240827163226-d4e15e206974 h1:95Ox9WYNiwm3mVJeVF/lp7iCpVGA28AkU1atN893eDo=
github.com/threefoldtech/tfchain/clients/tfchain-client-go v0.0.0-20240827163226-d4e15e206974/go.mod h1:dtDKAPiUDxAwIkfHV7xcAFZcOm+xwNIuOI1MLFS+MeQ=
github.com/threefoldtech/tfgrid-sdk-go/grid-client v0.15.17-dev h1:8K2ap34utvjglMwXHJiJ57hmY52CJNMBu3Pofk4ydCU=
github.com/threefoldtech/tfgrid-sdk-go/grid-client v0.15.17-dev/go.mod h1:MwKEEeKN7qApCdabKRBTs18lrJ6JzA2Xx5Hd2/zb4o0=
github.com/threefoldtech/tfgrid-sdk-go/grid-client v0.15.17 h1:JwjhOz4mSV0qL0/oF+fdLYtE+l0s7fFjObunzTairYA=
github.com/threefoldtech/tfgrid-sdk-go/grid-client v0.15.17/go.mod h1:MwKEEeKN7qApCdabKRBTs18lrJ6JzA2Xx5Hd2/zb4o0=
github.com/threefoldtech/tfgrid-sdk-go/grid-proxy v0.15.16 h1:Bnt9POje9hc9nv1YwAu13ABnl63DBMH0qL4SeVhNsIQ=
github.com/threefoldtech/tfgrid-sdk-go/grid-proxy v0.15.16/go.mod h1:2Z7uJYHeilN7bASpmkcDxtl+3AT8tim6iIvqZ08pwCg=
github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.15.16 h1:xe3LgMdznykz6d6cOFBt2s+sq3XooOVn20aHOZ3gbQE=
Expand Down
6 changes: 3 additions & 3 deletions internal/provider/resource_k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,17 @@ func resourceKubernetes() *schema.Resource {
"flist": {
Type: schema.TypeString,
Optional: true,
Default: "https://hub.grid.tf/tf-official-apps/threefoldtech-k3s-latest.flist",
Description: "Flist used on all nodes, e.g. https://hub.grid.tf/tf-official-apps/threefoldtech-k3s-latest.flist. All flists could be found in `https://hub.grid.tf/`",
},
"entrypoint": {
Type: schema.TypeString,
Optional: true,
Default: "/sbin/zinit init",
Description: "Command to execute as the kubernetes node init.",
},
"flist_checksum": {
Type: schema.TypeString,
Optional: true,
Description: "if present, the flist is rejected if it has a different hash.",
Description: "If present, the flist is rejected if it has a different hash.",
},
"ssh_key": {
Type: schema.TypeString,
Expand Down Expand Up @@ -120,11 +118,13 @@ func resourceKubernetes() *schema.Resource {
"flist": {
Type: schema.TypeString,
Optional: true,
Default: "https://hub.grid.tf/tf-official-apps/threefoldtech-k3s-latest.flist",
Description: "Flist used on master node, e.g. https://hub.grid.tf/tf-official-apps/threefoldtech-k3s-latest.flist. All flists could be found in `https://hub.grid.tf/`",
},
"entrypoint": {
Type: schema.TypeString,
Optional: true,
Default: "/sbin/zinit init",
Description: "Command to execute as the kubernetes node init.",
},
"flist_checksum": {
Expand Down
1 change: 0 additions & 1 deletion modules/k8s-module/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ resource "grid_deployment" "workers" {
memory = vms.value.memory
publicip = vms.value.publicip
planetary = vms.value.planetary
entrypoint = "/sbin/zinit init"
env_vars = {
SSH_KEY = "${var.ssh}"
K3S_TOKEN = "${var.token}"
Expand Down

0 comments on commit 6a04f2e

Please sign in to comment.