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

operator: remove deprecated options #16374

Merged
merged 2 commits into from
Jun 2, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions install/kubernetes/cilium/templates/cilium-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,6 @@ data:
auto-create-cilium-node-resource: "true"
{{- if .Values.eni.updateEC2AdapterLimitViaAPI }}
update-ec2-adapter-limit-via-api: "true"
# The below value is deprecated and will be removed in a future release, see https://github.com/cilium/cilium/issues/12396
update-ec2-apdater-limit-via-api: "true"
{{- end }}
{{- if .Values.eni.awsReleaseExcessIPs }}
aws-release-excess-ips: "true"
Expand Down
4 changes: 1 addition & 3 deletions operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ var (
},
}

// Deprecated: remove in 1.9
apiServerPort uint16
shutdownSignal = make(chan struct{})

ciliumK8sClient clientset.Interface
Expand Down Expand Up @@ -205,7 +203,7 @@ func kvstoreEnabled() bool {

func getAPIServerAddr() []string {
if operatorOption.Config.OperatorAPIServeAddr == "" {
return []string{fmt.Sprintf("127.0.0.1:%d", apiServerPort), fmt.Sprintf("[::1]:%d", apiServerPort)}
return []string{"127.0.0.1:0", "[::1]:0"}
}
return []string{operatorOption.Config.OperatorAPIServeAddr}
}
Expand Down
7 changes: 1 addition & 6 deletions operator/option/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ const (
// ParallelAllocWorkers specifies the number of parallel workers to be used for IPAM allocation
ParallelAllocWorkers = "parallel-alloc-workers"

// UpdateEC2AdapterLimitViaAPIDeprecated configures the operator to use the EC2
// API to fill out the instancetype to adapter limit mapping.
UpdateEC2AdapterLimitViaAPIDeprecated = "update-ec2-apdater-limit-via-api"

// UpdateEC2AdapterLimitViaAPI configures the operator to use the EC2
// API to fill out the instancetype to adapter limit mapping.
UpdateEC2AdapterLimitViaAPI = "update-ec2-adapter-limit-via-api"
Expand Down Expand Up @@ -404,8 +400,7 @@ func (c *OperatorConfig) Populate() {
// AWS options

c.AWSReleaseExcessIPs = viper.GetBool(AWSReleaseExcessIPs)
c.UpdateEC2AdapterLimitViaAPI = viper.GetBool(UpdateEC2AdapterLimitViaAPIDeprecated) ||
viper.GetBool(UpdateEC2AdapterLimitViaAPI)
c.UpdateEC2AdapterLimitViaAPI = viper.GetBool(UpdateEC2AdapterLimitViaAPI)
c.EC2APIEndpoint = viper.GetString(EC2APIEndpoint)

// Azure options
Expand Down
5 changes: 0 additions & 5 deletions operator/provider_aws_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
package main

import (
"fmt"

operatorOption "github.com/cilium/cilium/operator/option"
"github.com/spf13/viper"

Expand All @@ -45,9 +43,6 @@ func init() {
operatorOption.ENITags, "ENI tags in the form of k1=v1 (multiple k/v pairs can be passed by repeating the CLI flag)")
option.BindEnv(operatorOption.ENITags)

flags.Bool(operatorOption.UpdateEC2AdapterLimitViaAPIDeprecated, false, fmt.Sprintf("Use the EC2 API to update the instance type to adapter limits. Deprecated in favor of %s", operatorOption.UpdateEC2AdapterLimitViaAPI))
option.BindEnv(operatorOption.UpdateEC2AdapterLimitViaAPIDeprecated)
flags.MarkDeprecated(operatorOption.UpdateEC2AdapterLimitViaAPIDeprecated, "This option will be removed in v1.10")
flags.Bool(operatorOption.UpdateEC2AdapterLimitViaAPI, false, "Use the EC2 API to update the instance type to adapter limits")
option.BindEnv(operatorOption.UpdateEC2AdapterLimitViaAPI)

Expand Down