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

Remove freezer code #13830

Merged
merged 1 commit into from
Mar 31, 2023
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
25 changes: 1 addition & 24 deletions config/core/configmaps/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ metadata:
app.kubernetes.io/component: controller
app.kubernetes.io/version: devel
annotations:
knative.dev/example-checksum: "ac007ed2"
knative.dev/example-checksum: "410041a0"
data:
# This is the Go import path for the binary that is containerized
# and substituted here.
Expand Down Expand Up @@ -88,26 +88,3 @@ data:
# Sets rootCA for the queue proxy - used by QPOptions
# If omitted, or empty, no rootCA is added to the golang rootCAs
queue-sidecar-rootca: ""

# The freezer service endpoint that queue-proxy calls when its traffic drops to zero or
# scales up from zero.
#
# Freezer service is available at: https://github.com/knative-sandbox/container-freezer
# or users may write their own service.
#
# The value will need to include both the host and the port that will be accessed.
# For the host, $HOST_IP can be passed, and the appropriate host IP value will be swapped
# in at runtime, which will enable the freezer daemonset to be reachable via the node IP.
#
# As an example:
# concurrency-state-endpoint: "http://$HOST_IP:9696"
#
# If not set, queue proxy takes no action (this is the default behavior).
#
# When enabled, a serviceAccountToken will be mounted to queue-proxy using
# a projected volume. This requires the Service Account Token Volume Projection feature
# to be enabled. For details, see this link:
# https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#service-account-token-volume-projection
#
# NOTE THAT THIS IS AN EXPERIMENTAL / ALPHA FEATURE
concurrency-state-endpoint: ""
10 changes: 0 additions & 10 deletions pkg/deployment/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ const (
// qpoptions
queueSidecarTokenAudiencesKey = "queue-sidecar-token-audiences"
queueSidecarRooCAKey = "queue-sidecar-rootca"

// concurrencyStateEndpointKey is the key to configure the endpoint Queue Proxy will call when traffic drops to / increases from zero.
concurrencyStateEndpointKey = "concurrency-state-endpoint"
)

var (
Expand All @@ -86,7 +83,6 @@ func defaultConfig() *Config {
DigestResolutionTimeout: digestResolutionTimeoutDefault,
RegistriesSkippingTagResolving: sets.NewString("kind.local", "ko.local", "dev.local"),
QueueSidecarCPURequest: &QueueSidecarCPURequestDefault,
ConcurrencyStateEndpoint: "",
}
// The following code is needed for ConfigMap testing.
// defaultConfig must match the example in deployment.yaml which includes: `queue-sidecar-token-audiences: ""`
Expand All @@ -113,7 +109,6 @@ func NewConfigFromMap(configMap map[string]string) (*Config, error) {
cm.AsQuantity("queueSidecarCPULimit", &nc.QueueSidecarCPULimit),
cm.AsQuantity("queueSidecarMemoryLimit", &nc.QueueSidecarMemoryLimit),
cm.AsQuantity("queueSidecarEphemeralStorageLimit", &nc.QueueSidecarEphemeralStorageLimit),
cm.AsString("concurrencyStateEndpoint", &nc.ConcurrencyStateEndpoint),

cm.AsString(QueueSidecarImageKey, &nc.QueueSidecarImage),
cm.AsDuration(ProgressDeadlineKey, &nc.ProgressDeadline),
Expand All @@ -129,8 +124,6 @@ func NewConfigFromMap(configMap map[string]string) (*Config, error) {

cm.AsStringSet(queueSidecarTokenAudiencesKey, &nc.QueueSidecarTokenAudiences),
cm.AsString(queueSidecarRooCAKey, &nc.QueueSidecarRootCA),

cm.AsString(concurrencyStateEndpointKey, &nc.ConcurrencyStateEndpoint),
); err != nil {
return nil, err
}
Expand Down Expand Up @@ -201,7 +194,4 @@ type Config struct {

// QueueSidecarRootCA is a root certificate to be trusted by the queue proxy sidecar qpoptions.
QueueSidecarRootCA string

// ConcurrencyStateEndpoint is the endpoint Queue Proxy will call when traffic drops to / increases from zero.
ConcurrencyStateEndpoint string
}
20 changes: 0 additions & 20 deletions pkg/deployment/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,21 +200,6 @@ func TestControllerConfiguration(t *testing.T) {
QueueSidecarImageKey: defaultSidecarImage,
ProgressDeadlineKey: "1982ms",
},
}, {
name: "controller configuration with concurrency state endpoint",
wantConfig: &Config{
RegistriesSkippingTagResolving: sets.NewString("kind.local", "ko.local", "dev.local"),
DigestResolutionTimeout: digestResolutionTimeoutDefault,
QueueSidecarImage: defaultSidecarImage,
QueueSidecarCPURequest: &QueueSidecarCPURequestDefault,
ProgressDeadline: ProgressDeadlineDefault,
QueueSidecarTokenAudiences: sets.NewString(""),
ConcurrencyStateEndpoint: "freeze-proxy",
},
data: map[string]string{
QueueSidecarImageKey: defaultSidecarImage,
concurrencyStateEndpointKey: "freeze-proxy",
},
}, {
name: "legacy keys supported",
data: map[string]string{
Expand All @@ -229,7 +214,6 @@ func TestControllerConfiguration(t *testing.T) {
"queueSidecarMemoryLimit": "8M",
"queueSidecarEphemeralStorageRequest": "9M",
"queueSidecarEphemeralStorageLimit": "10M",
"concurrencyStateEndpoint": "11",
},
wantConfig: &Config{
QueueSidecarImage: "1",
Expand All @@ -242,7 +226,6 @@ func TestControllerConfiguration(t *testing.T) {
QueueSidecarMemoryLimit: quantity("8M"),
QueueSidecarEphemeralStorageRequest: quantity("9M"),
QueueSidecarEphemeralStorageLimit: quantity("10M"),
ConcurrencyStateEndpoint: "11",
QueueSidecarTokenAudiences: sets.NewString(""),
},
}, {
Expand All @@ -260,7 +243,6 @@ func TestControllerConfiguration(t *testing.T) {
"queueSidecarEphemeralStorageRequest": "9M",
"queueSidecarEphemeralStorageLimit": "10M",
"queueSidecarTokens": "bar",
"concurrencyStateEndpoint": "11",

QueueSidecarImageKey: "12",
ProgressDeadlineKey: "13s",
Expand All @@ -273,7 +255,6 @@ func TestControllerConfiguration(t *testing.T) {
queueSidecarEphemeralStorageRequestKey: "20M",
queueSidecarEphemeralStorageLimitKey: "21M",
queueSidecarTokenAudiencesKey: "foo",
concurrencyStateEndpointKey: "22",
},
wantConfig: &Config{
QueueSidecarImage: "12",
Expand All @@ -287,7 +268,6 @@ func TestControllerConfiguration(t *testing.T) {
QueueSidecarEphemeralStorageRequest: quantity("20M"),
QueueSidecarEphemeralStorageLimit: quantity("21M"),
QueueSidecarTokenAudiences: sets.NewString("foo"),
ConcurrencyStateEndpoint: "22",
},
}}

Expand Down
172 changes: 0 additions & 172 deletions pkg/queue/concurrency_state.go

This file was deleted.

Loading