Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed trailing references to kubernetes_dashboard #4328

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ def has_resource_labels?
true
end

def has_kubernetes_dashboard_disabled?
return false if !defined?(@addons_config.kubernetes_dashboard)
return false if @addons_config.kubernetes_dashboard.to_h.empty?
return true if @addons_config.kubernetes_dashboard.to_h=={ 'disabled': true }
false
end

def has_basic_authorization?
return false if @master_auth.username.nil? and @master_auth.password.nil?
true
Expand Down
30 changes: 0 additions & 30 deletions third_party/validator/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -835,13 +835,6 @@ func expandContainerClusterAddonsConfig(v interface{}, d TerraformResourceData,
transformed["horizontalPodAutoscaling"] = transformedHorizontalPodAutoscaling
}

transformedKubernetesDashboard, err := expandContainerClusterAddonsConfigKubernetesDashboard(original["kubernetes_dashboard"], d, config)
if err != nil {
return nil, err
} else if val := reflect.ValueOf(transformedKubernetesDashboard); val.IsValid() && !isEmptyValue(val) {
transformed["kubernetesDashboard"] = transformedKubernetesDashboard
}

transformedNetworkPolicyConfig, err := expandContainerClusterAddonsConfigNetworkPolicyConfig(original["network_policy_config"], d, config)
if err != nil {
return nil, err
Expand Down Expand Up @@ -898,29 +891,6 @@ func expandContainerClusterAddonsConfigHorizontalPodAutoscalingDisabled(v interf
return v, nil
}

func expandContainerClusterAddonsConfigKubernetesDashboard(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
l := v.([]interface{})
if len(l) == 0 || l[0] == nil {
return nil, nil
}
raw := l[0]
original := raw.(map[string]interface{})
transformed := make(map[string]interface{})

transformedDisabled, err := expandContainerClusterAddonsConfigKubernetesDashboardDisabled(original["disabled"], d, config)
if err != nil {
return nil, err
} else if val := reflect.ValueOf(transformedDisabled); val.IsValid() && !isEmptyValue(val) {
transformed["disabled"] = transformedDisabled
}

return transformed, nil
}

func expandContainerClusterAddonsConfigKubernetesDashboardDisabled(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
return v, nil
}

func expandContainerClusterAddonsConfigNetworkPolicyConfig(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
l := v.([]interface{})
if len(l) == 0 || l[0] == nil {
Expand Down