Remove unnecessary occurrences of whitelist and master. (#2799)

This commit is contained in:
Markus Thömmes 2020-09-10 11:09:51 +02:00 committed by GitHub
parent 62e7010832
commit b1d394b4f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 12 deletions

View File

@ -340,7 +340,7 @@ spec:
## High availability
By default, Knative Serving runs a single instance of each controller. The `spec.high-availability` field allows you to configure the number of replicas for the following master-elected controllers: `controller`, `autoscaler-hpa`, `networking-istio`. This field also configures the `HorizontalPodAutoscaler` resources for the data plane (`activator`):
By default, Knative Serving runs a single instance of each controller. The `spec.high-availability` field allows you to configure the number of replicas for the following leader-elected controllers: `controller`, `autoscaler-hpa`, `networking-istio`. This field also configures the `HorizontalPodAutoscaler` resources for the data plane (`activator`):
The following configuration specifies a replica count of 3 for the controllers and a minimum of 3 activators (which may scale higher if needed):

View File

@ -89,7 +89,7 @@ enough, or that the Kubernetes cluster is out of requested resources.
A large gap between the requested pod count and the desired pod count indicates
that the Knative Serving autoscaler is unable to communicate with the Kubernetes
master to make the request.
API to make the request.
In the preceding example, the autoscaler requested 18 pods to optimally serve
the traffic but was only granted 8 pods because the cluster is out of resources.

View File

@ -37,9 +37,9 @@ func TestSampleApp(t *testing.T) {
t.Fatalf("Failed reading config file %s: '%v'", configFile, err)
}
whitelist := test.GetWhitelistedLanguages()
allowed := test.GetAllowedLanguages()
for _, lc := range lcs.Languages {
if _, ok := whitelist[lc.Language]; len(whitelist) > 0 && !ok {
if _, ok := allowed[lc.Language]; len(allowed) > 0 && !ok {
continue
}
lc.UseDefaultIfNotProvided()

View File

@ -34,7 +34,7 @@ type EnvironmentFlags struct {
DockerRepo string // Docker repo (defaults to $KO_DOCKER_REPO)
EmitMetrics bool // Emit metrics
Tag string // Docker image tag
Languages string // Whitelisted languages to run
Languages string // Allowed languages to run
}
func initializeFlags() *EnvironmentFlags {
@ -63,13 +63,13 @@ func ImagePath(name string) string {
return fmt.Sprintf("%s/%s:%s", Flags.DockerRepo, name, Flags.Tag)
}
// GetWhitelistedLanguages is a helper function to return a map of whitelisted languages based on Languages filter
func GetWhitelistedLanguages() map[string]bool {
whitelist := make(map[string]bool)
// GetAllowedLanguages is a helper function to return a map of allowed languages based on Languages filter
func GetAllowedLanguages() map[string]bool {
allowed := make(map[string]bool)
if "" != Flags.Languages {
for _, l := range strings.Split(Flags.Languages, ",") {
whitelist[l] = true
allowed[l] = true
}
}
return whitelist
return allowed
}

View File

@ -115,9 +115,9 @@ func TestDocSrc(t *testing.T) {
t.Fatalf("Failed reading config file %s: '%v'", configFile, err)
}
whitelist := test.GetWhitelistedLanguages()
allowed := test.GetAllowedLanguages()
for _, lc := range lcs.Languages {
if _, ok := whitelist[lc.Language]; len(whitelist) > 0 && !ok {
if _, ok := allowed[lc.Language]; len(allowed) > 0 && !ok {
continue
}
lc.UseDefaultIfNotProvided()