Skip to content

Commit 7479852

Browse files
authored
Merge branch 'hashicorp:main' into vault/run-vault-as-zcx-cluster
2 parents cfff29d + 8fb5b8a commit 7479852

File tree

152 files changed

+1394
-854
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+1394
-854
lines changed

.github/workflows/algolia-prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
cache: 'npm'
2323
node-version-file: 'package.json'
2424

25-
- run: npm i
25+
- run: npm ci
2626
- run: npm run prebuild -- --get-real-file-changed-metadata --build-algolia-index
2727
- run: npm run algolia
2828
env:

.github/workflows/build-pr-preview.yml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Build Preview
22
run-name: 'Build Preview for "${{ github.event.pull_request.title }}" (#${{ github.event.pull_request.number }})'
33

44
on:
5+
# 1: Change this to `pull_request` to see changes while testing this file in a PR.
6+
# 2: This is because `pull_request_target` only works from the context of the base branch
7+
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target
8+
# 3: Change this back to `pull_request_target` before merge for security reasons
59
pull_request_target:
610
types: [opened, synchronize]
711
# Hello Security 👋, we are checking to make sure forked repo PR changed paths are only in content/** inside the job security-check.
@@ -105,20 +109,11 @@ jobs:
105109
cache: 'npm'
106110
node-version-file: 'package.json'
107111

108-
- name: Generate cache manifest
109-
run: git ls-files -z -- '*.js' '*.mjs' '*.ts' '*.tsx' '*.mdx' '*.json' | xargs -0 git hash-object > cache-key.txt
110-
111-
- name: Use cache
112+
- name: Cache Next.js build
112113
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
113114
with:
114-
path: |
115-
~/.npm
116-
${{ github.workspace }}/.next/cache
117-
# Generate a new cache whenever packages or source files change.
118-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('cache-key.txt') }}
119-
# If source files changed but packages didn't, rebuild from a prior cache.
120-
restore-keys: |
121-
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
115+
path: ${{ github.workspace }}/.next/cache
116+
key: ${{ runner.os }}-nextjs-build-${{ hashFiles('package-lock.json', 'next.config.js') }}
122117

123118
- name: Install Vercel CLI
124119
run: npm i --global vercel@latest
@@ -187,17 +182,6 @@ jobs:
187182
with:
188183
repository: hashicorp/dev-portal
189184
path: ./unified-docs-frontend-preview
190-
- name: Use cache
191-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
192-
with:
193-
path: |
194-
~/.npm
195-
${{ github.workspace }}/unified-docs-frontend-preview/.next/cache
196-
# Generate a new cache whenever packages or source files change.
197-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx', '**/*.mdx') }}
198-
# If source files changed but packages didn't, rebuild from a prior cache.
199-
restore-keys: |
200-
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
201185

202186
- name: Setup Node.js
203187
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
@@ -206,6 +190,12 @@ jobs:
206190
cache-dependency-path: 'unified-docs-frontend-preview/package-lock.json'
207191
node-version-file: 'unified-docs-frontend-preview/package.json'
208192

193+
- name: Cache Next.js build
194+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
195+
with:
196+
path: ${{ github.workspace }}/unified-docs-frontend-preview/.next/cache
197+
key: ${{ runner.os }}-nextjs-build-devportal-${{ hashFiles('unified-docs-frontend-preview/package-lock.json', 'unified-docs-frontend-preview/next.config.js') }}
198+
209199
- name: Setup Vercel CLI
210200
run: npm i --global vercel@latest
211201

.github/workflows/copy-cloud-docs-for-tfe.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: Generate version-metadata for workflow
5353
working-directory: '${{github.workspace}}/new-docs-pr'
5454
run: |
55-
npm i
55+
npm ci
5656
npm run prebuild -- --only-build-version-metadata
5757
5858
- name: Create the new TFE version folder for RELEASE PR

.github/workflows/deploy-udr.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,11 @@ jobs:
2727
cache: 'npm'
2828
node-version-file: 'package.json'
2929

30-
- name: Use cache
30+
- name: Cache Next.js build
3131
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
3232
with:
33-
path: |
34-
~/.npm
35-
${{ github.workspace }}/.next/cache
36-
# Generate a new cache whenever packages or source files change.
37-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.mjs', '**/*.ts', '**/*.tsx', '**/*.mdx') }}
38-
# If source files changed but packages didn't, rebuild from a prior cache.
39-
restore-keys: |
40-
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
33+
path: ${{ github.workspace }}/.next/cache
34+
key: ${{ runner.os }}-nextjs-build-${{ hashFiles('package-lock.json', 'next.config.js') }}
4135

4236
- name: Install Vercel CLI
4337
run: npm install --global vercel@latest

.github/workflows/sync-docs-for-tfe.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
- name: Generate version-metadata for workflow
8484
working-directory: '${{github.workspace}}/new-docs'
8585
run: |
86-
npm i
86+
npm ci
8787
npm run prebuild -- --only-build-version-metadata
8888
8989
- name: Checkout HCPTF-diff for new docs version DIFF PR

.github/workflows/test-and-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
cache: 'npm'
2929
node-version-file: 'package.json'
3030

31-
- run: npm i
31+
- run: npm ci
3232
- run: npm run test
3333

3434
lint:
@@ -46,7 +46,7 @@ jobs:
4646
node-version-file: 'package.json'
4747

4848
- name: Install Dependencies
49-
run: npm i
49+
run: npm ci
5050

5151
- name: Run lint check
5252
run: npm run lint

content/consul/v1.22.x/content/api-docs/agent/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ The corresponding CLI command is [`consul join`](/consul/commands/join).
660660

661661
### Path Parameters
662662

663-
- `address` `(string: <required>)` - Specifies the address of the other agent to join.
663+
- `address` `(string: <required>)` - Specifies the address of the other agent to join. You can specifiy either an IPv4 or an IPv6 address.
664664

665665
### Query Parameters
666666

content/consul/v1.22.x/content/api-docs/agent/service.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,12 @@ The `/agent/service/register` endpoint supports camel case and _snake case_ for
628628
This field takes precedence over the `ns` query parameter,
629629
one of several [other methods to specify the namespace](#methods-to-specify-namespace).
630630

631-
- `Port` `(int: 0)` - Specifies the port of the service.
631+
- `Port` `(int: 0)` - Specifies the port of the service. This field is mutually exclusive with the `Ports` field. You can use this field in both service discovery and service mesh use cases.
632+
633+
- `Ports` `(array<Port>: nil)` - Specifies multiple ports for a service. This field is mutually exclusive with the `Port` field. Consul supports multi-port services for service discovery use cases only. For an example service definition, refer to [Multi-port service definition](#multi-port-service-definition). You can specify the following values:
634+
- `name` `(string: "")` - Specifies a name for the port. This value is addressable with Consul DNS.
635+
- `port` `(int: 0)` - Specifies a numeric port where the service is available.
636+
- `default` `(bool: false)` - Sets a port as the default service when a port is not included.
632637

633638
- `Kind` `(string: "")` - The kind of service. Defaults to `""`, which is a
634639
typical Consul service. You can specify the following values:
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
layout: api
3+
page_title: Audit - Operator - HTTP API
4+
description: |-
5+
The /operator/audit endpoints expose audit log information via Consul's HTTP API.
6+
---
7+
8+
# Audit logs - Operator HTTP API
9+
10+
<EnterpriseAlert />
11+
12+
The `/operator/audit` endpoints provide tools to interact with Consul's audit
13+
logging subsystem through Consul's HTTP API.
14+
15+
The audit logging functionality described here is available only in
16+
[Consul Enterprise](https://www.hashicorp.com/products/consul/) version 1.8.0 and
17+
later.
18+
19+
Refer to the [audit logging documentation](/consul/docs/monitor/log/audit) for workflow guidance and additional information.
20+
21+
## Calculate data hash
22+
23+
This endpoint calculates the hash of the data used by the audit log hash function and salt.
24+
25+
| Method | Path | Produces |
26+
| ------ | ------------------------------ | ------------------ |
27+
| `POST` | `/operator/audit-hash` | `application/json` |
28+
29+
The following table shows this endpoint's support for
30+
[blocking queries](/consul/api-docs/features/blocking),
31+
[consistency modes](/consul/api-docs/features/consistency),
32+
[agent caching](/consul/api-docs/features/caching), and
33+
[required ACLs](/consul/api-docs/api-structure#authentication).
34+
35+
| Blocking Queries | Consistency Modes | Agent Caching | ACL Required |
36+
| ---------------- | ----------------- | ------------- | --------------- |
37+
| `NO` | `none` | `none` | `operator:read` |
38+
39+
The corresponding CLI command is [`consul operator audit hash`](/consul/commands/operator/audit#hash).
40+
41+
### JSON request body schema
42+
43+
- `Input` `(string: <required>)` - Specifies the input string to hash.
44+
45+
### Sample payload
46+
47+
```json
48+
{
49+
"Input": "test"
50+
}
51+
```
52+
53+
### Sample request
54+
55+
```shell-session
56+
$ curl \
57+
--request POST \
58+
--data @payload.json \
59+
http://127.0.0.1:8500/v1/operator/audit-hash
60+
```
61+
62+
### Sample response
63+
64+
```json
65+
{
66+
"Hash": "hmac_sha256:794c39dbc00d4714740199fe79982d02bbc5d303ab73149dfabc1244e3df3d4c"
67+
}
68+
```
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
layout: api
3+
page_title: Utilization - Operator - HTTP API
4+
description: |-
5+
The /operator/utilization endpoints generate a Consul utilization bundle for license reporting.
6+
---
7+
8+
# Utilization - Operator HTTP API
9+
10+
<EnterpriseAlert />
11+
12+
The `/operator/utilization` endpoints provide tools to generate a Consul utilization bundle for license reporting.
13+
14+
Refer to the [Manual license utilization reporting documentation](/consul/docs/enterprise/license/reporting#manual-license-utilization-reporting) for more information.
15+
16+
## Generate utilization bundle
17+
18+
This endpoint generates a Consul utilization bundle for license reporting.
19+
20+
| Method | Path | Produces |
21+
| ------ | ------------------------------ | ------------------ |
22+
| `GET` | `/operator/utilization` | `application/json` |
23+
24+
The following table shows this endpoint's support for
25+
[blocking queries](/consul/api-docs/features/blocking),
26+
[consistency modes](/consul/api-docs/features/consistency),
27+
[agent caching](/consul/api-docs/features/caching), and
28+
[required ACLs](/consul/api-docs/api-structure#authentication).
29+
30+
| Blocking Queries | Consistency Modes | Agent Caching | ACL Required |
31+
| ---------------- | ----------------- | ------------- | --------------- |
32+
| `NO` | `none` | `none` | `operator:read` |
33+
34+
The corresponding CLI command is [`consul operator utilization`](/consul/commands/operator/utilization).
35+
36+
37+
### Query parameters
38+
39+
- `message` `(string: "")` - Optional context that is logged with the utilization export.
40+
41+
- `today_only` `(bool: false)` - Include only the most recent utilization snapshot.
42+
43+
- `send_report` `(bool: false)` - Automatically send the utilization report to HashiCorp.
44+
45+
### Sample request
46+
47+
```shell-session
48+
$ curl \
49+
http://127.0.0.1:8500/v1/operator/utilization
50+
```
51+
52+
### Sample response
53+
54+
```json
55+
{
56+
"version": "2",
57+
"mode": "manual",
58+
"timestamp": "2025-10-09T15:23:48.354524388Z",
59+
"signature": "9ea44420679b3776d1636acbe9ec1f636a58bd4a5b7f2b215cc2958084ded505",
60+
"checksum": 17512992959032736032,
61+
"snapshots": [
62+
{
63+
"snapshot_version": 2,
64+
"id": "0001MEFMW4B0G5JJHKQN4T9RCE",
65+
"timestamp": "2025-10-09T15:23:48.348542971Z",
66+
"schema_version": "2.0.0",
67+
"product": "consul",
68+
"process_id": "01K6FXJDTFBQQP5B3RAXRFRB1K",
69+
"metrics": {
70+
"consul.billable.nodes": {
71+
"key": "consul.billable.nodes",
72+
"value": 7,
73+
"mode": "write"
74+
},
75+
"consul.billable.service_instances": {
76+
"key": "consul.billable.service_instances",
77+
"value": 4,
78+
"mode": "write"
79+
}
80+
},
81+
"product_version": "1.22.0-rc1+ent",
82+
"license_id": "642088be-c801-c34a-bb5c-e70d4feb18fe",
83+
"checksum": 18094916709627403007,
84+
"metadata": {
85+
"billing_start": "2021-09-30T00:00:00Z",
86+
"cluster_id": "dc1"
87+
}
88+
}
89+
]
90+
}
91+
```
92+

0 commit comments

Comments
 (0)