Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
packet: Add a knob to disable self-hosted kubelet
Browse files Browse the repository at this point in the history
This commit adds a boolean variable to controller config called
`disable_self_hosted_kubelet`.

Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
  • Loading branch information
surajssd committed May 14, 2020
1 parent 15dc436 commit be81412
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ module "bootkube" {
container_arch = var.os_arch

expose_on_all_interfaces = true

# Disable the self hosted kubelet
disable_self_hosted_kubelet = var.disable_self_hosted_kubelet
}
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ EOD
default = ""
}

variable "disable_self_hosted_kubelet" {
description = "Disable the self hosted kubelet installed by default"
type = bool
}

# Certificates

variable "certs_validity_period_hours" {
Expand Down
1 change: 1 addition & 0 deletions pkg/platform/packet/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ type config struct {
ReservationIDsDefault string `hcl:"reservation_ids_default,optional"`
CertsValidityPeriodHours int `hcl:"certs_validity_period_hours,optional"`
NodesDependOn []string // Not exposed to the user
DisableSelfHostedKubelet bool `hcl:"disable_self_hosted_kubelet,optional"`

WorkerPools []workerPool `hcl:"worker_pool,block"`
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/platform/packet/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ module "packet-{{.Config.ClusterName}}" {
{{- end }}
]
{{- end }}
disable_self_hosted_kubelet = {{ .Config.DisableSelfHostedKubelet }}
}
{{ range $index, $pool := .Config.WorkerPools }}
Expand Down

0 comments on commit be81412

Please sign in to comment.