Skip to content

Commit

Permalink
fix: kube-proxy enabled field (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddycharly authored Sep 16, 2021
1 parent feaf19e commit c05e02d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/resources/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ The following arguments are supported:
- `bind_address` - (Optional) - String - BindAddress is IP address for the proxy server to serve on.
- `master` - (Optional) - String - Master is the address of the Kubernetes API server (overrides any value in kubeconfig).
- `metrics_bind_address` - (Optional) - String - MetricsBindAddress is the IP address for the metrics server to serve on.
- `enabled` - (Optional) - Bool - Enabled allows enabling or disabling kube-proxy.
- `enabled` - (Required) - Bool - Enabled allows enabling or disabling kube-proxy.
- `proxy_mode` - (Optional) - String - Which proxy mode to use: (userspace, iptables(default), ipvs).
- `ip_vs_exclude_cidr_s` - (Optional) - List(String) - IPVSExcludeCIDRS is comma-separated list of CIDR's which the ipvs proxier should not touch when cleaning up IPVS rules.
- `ip_vs_min_sync_period` - (Optional) - Duration - IPVSMinSyncPeriod is the minimum interval of how often the ipvs rules can be refreshed as endpoints and services change (e.g. '5s', '1m', '2h22m').
Expand Down
4 changes: 3 additions & 1 deletion hack/gen-tf-code/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ func main() {
generate(kops.KubeControllerManagerConfig{}),
generate(kops.CloudControllerManagerConfig{}),
generate(kops.KubeSchedulerConfig{}),
generate(kops.KubeProxyConfig{}),
generate(kops.KubeProxyConfig{},
required("Enabled"),
),
generate(kops.KubeletConfigSpec{},
nullable("AnonymousAuth"),
),
Expand Down
8 changes: 1 addition & 7 deletions pkg/schemas/kops/Resource_KubeProxyConfig.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func ResourceKubeProxyConfig() *schema.Resource {
"bind_address": OptionalString(),
"master": OptionalString(),
"metrics_bind_address": OptionalString(),
"enabled": OptionalBool(),
"enabled": RequiredBool(),
"proxy_mode": OptionalString(),
"ip_vs_exclude_cidr_s": OptionalList(String()),
"ip_vs_min_sync_period": OptionalDuration(),
Expand Down Expand Up @@ -95,12 +95,6 @@ func ExpandResourceKubeProxyConfig(in map[string]interface{}) kops.KubeProxyConf
}(in)
}(in["metrics_bind_address"]),
Enabled: func(in interface{}) *bool {
if in == nil {
return nil
}
if reflect.DeepEqual(in, reflect.Zero(reflect.TypeOf(in)).Interface()) {
return nil
}
return func(in interface{}) *bool {
if in == nil {
return nil
Expand Down

0 comments on commit c05e02d

Please sign in to comment.