Skip to content

Commit efb8f38

Browse files
committed
Merge branch 'main' into raft_default_v3
2 parents 6343fa6 + de85e58 commit efb8f38

File tree

7 files changed

+73
-6
lines changed

7 files changed

+73
-6
lines changed

client/config/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ type Config struct {
8787
// LogOutput is the destination for logs
8888
LogOutput io.Writer
8989

90-
// Logger provides a logger to thhe client
90+
// Logger provides a logger to the client
9191
Logger log.InterceptLogger
9292

9393
// Region is the clients region

command/agent/http_test.go

+7-5
Original file line numberDiff line numberDiff line change
@@ -944,11 +944,6 @@ func TestHTTPServer_Limits_Error(t *testing.T) {
944944
t.Run(name, func(t *testing.T) {
945945
t.Parallel()
946946

947-
// Use a fake agent since the HTTP server should never start
948-
agent := &Agent{
949-
logger: testlog.HCLogger(t),
950-
}
951-
952947
conf := &Config{
953948
normalizedAddrs: &Addresses{
954949
HTTP: "localhost:0", // port is never used
@@ -962,6 +957,13 @@ func TestHTTPServer_Limits_Error(t *testing.T) {
962957
},
963958
}
964959

960+
// Use a fake agent since the HTTP server should never start
961+
agent := &Agent{
962+
logger: testlog.HCLogger(t),
963+
httpLogger: testlog.HCLogger(t),
964+
config: conf,
965+
}
966+
965967
srv, err := NewHTTPServer(agent, conf)
966968
require.Error(t, err)
967969
require.Nil(t, srv)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: docs
3+
page_title: source Stanza - Nomad Autoscaler Agent Configuration
4+
description: >-
5+
The "source" block is used to configure scaling target sources.
6+
---
7+
8+
# `source` Block
9+
10+
<Placement groups={['policy', 'source']} />
11+
12+
The `source` block is used to configure scaling target sources.
13+
14+
```hcl
15+
policy {
16+
source "nomad" {
17+
enabled = false
18+
}
19+
}
20+
```
21+
22+
Supported sources are `file` and `nomad`.
23+
24+
### `source` Parameters
25+
26+
- `enabled` `(bool: true)` - Defines if the scaling policy source should be
27+
enabled or disabled.

website/content/docs/autoscaling/cli.mdx

+5
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ passed in via CLI arguments. The `agent` command accepts the following arguments
9191
`cluster` and `horizontal` queues. Nomad Autoscaler Enterprise supports additional
9292
`vertical_mem` and `vertical_cpu` queues.
9393

94+
- `-policy-source-disable-file`: Disable the sourcing of policies from disk.
95+
96+
- `-policy-source-disable-nomad`: Disable the sourcing of policies from the
97+
Nomad API.
98+
9499
- `-telemetry-disable-hostname`: Specifies whether gauge values should be prefixed
95100
with the local hostname.
96101

website/content/docs/autoscaling/plugins/apm/datadog.mdx

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ apm "datadog" {
1818
config = {
1919
dd_api_key = "<api key>"
2020
dd_app_key = "<app key>"
21+
22+
site = "app.datadoghq.eu"
2123
}
2224
}
2325
```
@@ -28,6 +30,8 @@ apm "datadog" {
2830
- `dd_app_key` `(string: <required>)` - The Datadog application key to use for
2931
authentication.
3032

33+
- `site` `(string: "")` - The [Datadog site][datadog_sites] to connect to.
34+
3135
The Datadog plugin can also read its configuration options via environment
3236
variables. The accepted keys are `DD_API_KEY` and `DD_APP_KEY`. The agent
3337
configuration parameters take precedence over the environment variables.
@@ -43,4 +47,5 @@ check {
4347
```
4448

4549
[datadog_homepage]: https://www.datadoghq.com/
50+
[datadog_sites]: https://docs.datadoghq.com/getting_started/site/
4651
[datadog_timeseries]: https://docs.datadoghq.com/api/v1/metrics/#query-timeseries-points

website/content/docs/autoscaling/plugins/apm/prometheus.mdx

+24
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,37 @@ apm "prometheus" {
1717
1818
config = {
1919
address = "http://prometheus.my.endpoint.io:9090"
20+
21+
ca_cert = "/path/to/ca.crt"
22+
23+
basic_auth_user = "user"
24+
basic_auth_password = "secret"
25+
26+
header_X-Scope-OrgID = "my-org"
27+
header_X-Custom-Header = "custom-header"
2028
}
2129
}
2230
```
2331

2432
- `address` `(string: "http://127.0.0.1:9090")` - The address of the Prometheus
2533
endpoint used to perform queries.
2634

35+
- `basic_auth_user` `(string: "")` - The HTTP basic auth user to use when
36+
making requests to Prometheus.
37+
38+
- `basic_auth_password` `(string: "")` - The HTTP basic auth password to use
39+
when making requests to Prometheus.
40+
41+
- `ca_cert` `(string: "")` - Path to a PEM encoded CA cert file to use to
42+
connect to the Prometheus server.
43+
44+
- `header_*` `(string: "")` - Additional HTTP headers to set when making
45+
requests to Prometheus. Several headers may be specified and the final header
46+
name will be set as the key with the `header_` prefix removed.
47+
48+
- `skip_verify` `(bool: false)` - Do not verify TLS certificates when
49+
connecting to the Prometheus server. This is strongly discouraged.
50+
2751
## Policy Configuration Options
2852

2953
```hcl

website/data/docs-nav-data.json

+4
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,10 @@
15311531
"title": "policy_eval",
15321532
"path": "autoscaling/agent/policy_eval"
15331533
},
1534+
{
1535+
"title": "source",
1536+
"path": "autoscaling/agent/source"
1537+
},
15341538
{
15351539
"title": "strategy",
15361540
"path": "autoscaling/agent/strategy"

0 commit comments

Comments
 (0)