Skip to content

Commit 5b9e884

Browse files
authored
Merge branch 'version-4-0' into pause-4-0
2 parents fd8bbf1 + c3c02e3 commit 5b9e884

File tree

58 files changed

+11231
-2386
lines changed

Some content is hidden

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

58 files changed

+11231
-2386
lines changed

.github/workflows/api_format.yaml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: API Format
2+
3+
on:
4+
pull_request_target:
5+
types: ["labeled", "closed"]
6+
7+
env:
8+
GITHUB_BRANCH: ${{ github.ref_name }}
9+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
10+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
11+
FULLSTORY_ORGID: ${{ secrets.FULLSTORY_ORGID }}
12+
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
13+
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
14+
ALGOLIA_SEARCH_KEY: ${{ secrets.ALGOLIA_SEARCH_KEY }}
15+
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }}
16+
PALETTE_API_KEY: ${{ secrets.PALETTE_API_KEY }}
17+
18+
jobs:
19+
backport:
20+
name: Format API PR
21+
runs-on: ubuntu-latest
22+
if: |
23+
github.event.action == 'labeled'
24+
&& github.event.label.name == 'api-format'
25+
&& github.event.pull_request.draft == false
26+
27+
28+
steps:
29+
- name: Retrieve Credentials
30+
id: import-secrets
31+
uses: hashicorp/[email protected]
32+
with:
33+
url: https://vault.prism.spectrocloud.com
34+
method: approle
35+
roleId: ${{ secrets.VAULT_ROLE_ID }}
36+
secretId: ${{ secrets.VAULT_SECRET_ID }}
37+
secrets: /providers/github/organizations/spectrocloud/token?org_name=spectrocloud token | VAULT_GITHUB_TOKEN
38+
39+
40+
- name: Checkout Code
41+
uses: actions/checkout@v4
42+
with:
43+
token: ${{ steps.import-secrets.outputs.VAULT_GITHUB_TOKEN }}
44+
45+
- name: Setup Node.js environment
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version: "20"
49+
cache: "npm"
50+
51+
- name: Determine branch name
52+
id: extract_branch
53+
run: |
54+
if [ "${{ github.event_name }}" = "pull_request" ]; then
55+
echo "GITHUB_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
56+
else
57+
echo "GITHUB_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
58+
fi
59+
60+
- run: npm ci
61+
62+
- name: Format API
63+
run: make api
64+
65+
66+
- name: Commit Changes
67+
uses: stefanzweifel/git-auto-commit-action@v5
68+
with:
69+
commit_message: "ci: auto-formatting API changes"
70+
71+
72+
- name: Slack Notification
73+
if: ${{ failure() }}
74+
uses: rtCamp/action-slack-notify@v2
75+
env:
76+
SLACK_WEBHOOK: ${{ secrets.SLACK_PRIVATE_TEAM_WEBHOOK }}
77+
SLACK_USERNAME: "spectromate"
78+
SLACK_ICON_EMOJI: ":robot_panic:"
79+
SLACK_COLOR: ${{ job.status }}
80+
SLACK_MESSAGE: ' The PR for branch ${{env.GITHUB_BRANCH}} failed when attempting to format the API. Review the GitHub Actions logs for more details.'
81+
82+
- name: Post Netlify progress
83+
uses: mshick/add-pr-comment@v2
84+
with:
85+
message: |
86+
🤖 The API has been formated and is ready for merging.
87+
refresh-message-position: false

.github/workflows/url-checks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
- name: URL Checker
3232
run: make verify-url-links-ci
3333

34-
- name: URL Security Bulletins Checker
35-
run: make verify-security-bulletins-links-ci
34+
- name: URL Rate Limit Checker
35+
run: make verify-rate-limited-links-ci
3636

3737
- name: Post Comment
3838
run: |

.gitleaksignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,8 @@ e4040084011d4d7935a589959b96ebc5cfba7a94:docs/docs-content/integrations/kubernet
136136
969ac609f82bacb36093c429adfc096c5a97e10f:docs/docs-content/tutorials/cluster-deployment/pde/deploy-app.md:generic-api-key:1195
137137
969ac609f82bacb36093c429adfc096c5a97e10f:docs/docs-content/tutorials/cluster-deployment/pde/deploy-app.md:generic-api-key:1232
138138
969ac609f82bacb36093c429adfc096c5a97e10f:docs/docs-content/tutorials/edge/deploy-cluster.md:generic-api-key:240
139-
3596618091e5eea65c8d1d2ac21f2c6552d3705f:docs/docs-content/integrations/kubernetes.md:generic-api-key:1005
139+
8f515d46ce2bb80b7173bf9684ed8e87cb96fd83:docs/docs-content/tutorials/edge/deploy-cluster-virtualbox.md:generic-api-key:229
140+
732cee5bed26e19ab178d822352de641a924e3b6:docs/docs-content/tutorials/edge/deploy-cluster-virtualbox.md:generic-api-key:187
140141
740c00193f308cecd7daebc2e2424702a3fbb944:docs/docs-content/integrations/kubernetes.md:generic-api-key:1005
142+
a43d695980eb29b9d3201b6a4143d8090aeeb771:docs/docs-content/tutorials/edge/deploy-cluster-virtualbox.md:generic-api-key:187
143+
235e7bd94f5941e03f71cee7a7ab7296ffa3aafd:docs/docs-content/tutorials/edge/deploy-cluster-virtualbox.md:generic-api-key:187

Makefile

Lines changed: 25 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ CPUS := $(shell sysctl -n hw.ncpu | awk '{print int($$1 / 2)}')
1313
ALOGLIA_CONFIG=$(shell cat docsearch.dev.config.json | jq -r tostring)
1414

1515
# Find all *.md files in docs, cut the prefix ./
16-
# Remove all security-bulletins and cve-reports.md
17-
VERIFY_URL_PATHS=$(shell find ./docs -name "*.md" | cut -c 3- | sed '/security-bulletins/d' | sed '/cve-reports/d' )
16+
# Remove all security-bulletins and cve-reports.md because they are rate limited by nvd.nist.gov
17+
# Remove oss-licenses.md because they are rate limited by npmjs.com
18+
VERIFY_URL_PATHS=$(shell find ./docs -name "*.md" | cut -c 3- | sed '/security-bulletins/d' | sed '/cve-reports/d' | sed '/oss-licenses/d')
19+
20+
RATE_LIMITED_FILES_LIST:="docs/docs-content/security-bulletins/**/*.md" \
21+
"docs/docs-content/security-bulletins/*.md" \
22+
"docs/docs-content/unlisted/cve-reports.md"
1823

1924
help: ## Display this help
2025
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[0m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
@@ -175,78 +180,36 @@ pdf-local: ## Generate PDF from local docs
175180
verify-url-links:
176181
@echo "Checking for broken external URLs in markdown files..."
177182
rm link_report.csv || echo "No report exists. Proceeding to scan step"
178-
@npx linkinator $(VERIFY_URL_PATHS) --concurrency 50 --markdown --recurse --timeout 100000 --retry --retry-errors-jitter --retry-errors-count 5 \
179-
--skip "^https:\/\/docs\.spectrocloud\.com.*$$" \
180-
--skip "^https:\/\/docs\.spectrocloud\.com\/.*\/supplemental\-packs$$" \
181-
--skip "^http:\/\/docs\.spectrocloud\.com.*$$" \
182-
--skip "^https:\/\/software-private\.spectrocloud\.com.*$$" \
183-
--skip "^\/.*\.md$$" \
184-
--skip "!\[.*\]\(.*\)$$" \
185-
--skip "\.(jpg|jpeg|png|gif|webp)$$" \
186-
--skip "https:\/\/linux\.die\.net\/man\/.*$$" \
187-
--skip "https:\/\/mysql\.com\/.*\.*$$" \
188-
--skip "https:\/\/dev\.mysql\.com\/doc\/.*$$" \
189-
--format csv > temp_report.csv && sleep 2
183+
@npx linkinator $(VERIFY_URL_PATHS) --config ./linkinator/linkinator.config.json > temp_report.csv && sleep 2
190184
@grep -E 'https?://' temp_report.csv > filtered_report.csv
191185
@grep -E ',[[:space:]]*([4-9][0-9]{2}|[0-9]{4,}),' filtered_report.csv > link_report.csv && rm temp_report.csv filtered_report.csv
192186

193-
verify-security-bulletins-links:
194-
@echo "Checking for broken URLs in security-bulletins markdown files..."
195-
rm link_sec_bul_report.csv || echo "No security bulletins report exists. Proceeding to scan step"
196-
@npx linkinator "docs/docs-content/security-bulletins/**/*.md" "docs/docs-content/security-bulletins/*.md" "docs/docs-content/unlisted/cve-reports.md" --concurrency 1 --markdown --recurse --timeout 100000 --retry --retry-errors-jitter --retry-errors-count 5 \
197-
--skip "^https:\/\/docs\.spectrocloud\.com.*$$" \
198-
--skip "^https:\/\/docs\.spectrocloud\.com\/.*\/supplemental\-packs$$" \
199-
--skip "^http:\/\/docs\.spectrocloud\.com.*$$" \
200-
--skip "^https:\/\/software-private\.spectrocloud\.com.*$$" \
201-
--skip "^\/.*\.md$$" \
202-
--skip "!\[.*\]\(.*\)$$" \
203-
--skip "\.(jpg|jpeg|png|gif|webp)$$" \
204-
--skip "https:\/\/linux\.die\.net\/man\/.*$$" \
205-
--skip "https:\/\/mysql\.com\/.*\.*$$" \
206-
--skip "https:\/\/dev\.mysql\.com\/doc\/.*$$" \
207-
--format csv > temp_sec_bul_report.csv && sleep 2
208-
@grep -E 'https?://' temp_sec_bul_report.csv > filtered_sec_bul_report.csv
209-
@grep -E ',[[:space:]]*([4-9][0-9]{2}|[0-9]{4,}),' filtered_sec_bul_report.csv > link_sec_bul_report.csv && rm temp_sec_bul_report.csv filtered_sec_bul_report.csv
187+
verify-rate-limited-links:
188+
@echo "Checking for broken URLs in security-bulletins and oss-licenses markdown files..."
189+
@rm link_rate_limit_report.csv || echo "No rate limited report exists. Proceeding to scan step"
190+
@echo "Checking the following paths: $(RATE_LIMITED_FILES_LIST)"
191+
@npx linkinator $(RATE_LIMITED_FILES_LIST) --config ./linkinator/linkinator-rate-limit.config.json > temp_rate_limit_report.csv && sleep 2
192+
@grep -E 'https?://' temp_rate_limit_report.csv > filtered_rate_limit_report.csv
193+
@grep -E ',[[:space:]]*([4-9][0-9]{2}|[0-9]{4,}),' filtered_rate_limit_report.csv > link_rate_limit_report.csv && rm temp_rate_limit_report.csv filtered_rate_limit_report.csv
210194

211195
verify-url-links-ci: ## Check for broken URLs in production in a GitHub Actions CI environment
212196
@echo "Checking for broken external URLs in CI environment..."
213-
rm link_report.json || echo "No report exists. Proceeding to scan step"
214-
@npx linkinator $(VERIFY_URL_PATHS) --concurrency 50 --markdown --recurse --timeout 100000 --retry --retry-errors-jitter --retry-errors-count 5 \
215-
--skip "^https:\/\/docs\.spectrocloud\.com.*$$" \
216-
--skip "^https:\/\/docs\.spectrocloud\.com\/.*\/supplemental\-packs$$" \
217-
--skip "^http:\/\/docs\.spectrocloud\.com.*$$" \
218-
--skip "^https:\/\/software-private\.spectrocloud\.com.*$$" \
219-
--skip "^\/.*\.md$$" \
220-
--skip "!\[.*\]\(.*\)$$" \
221-
--skip "\.(jpg|jpeg|png|gif|webp)$$" \
222-
--skip "https:\/\/linux\.die\.net\/man\/.*$$" \
223-
--skip "https:\/\/mysql\.com\/.*\.*$$" \
224-
--skip "https:\/\/dev\.mysql\.com\/doc\/.*$$" \
225-
--format json > temp_report.json
197+
@rm link_report.json || echo "No report exists. Proceeding to scan step"
198+
@npx linkinator $(VERIFY_URL_PATHS) --config ./linkinator/linkinator-ci.config.json > temp_report.json
226199
@# Use jq to filter out links that do not start with http or https and keep only broken links
227200
@jq '[.links[] | select(.url | test("^https?://")) | select(.status >= 400)]' temp_report.json > filtered_report.json
228201
@rm temp_report.json
229202
@mv filtered_report.json scripts/link_report.json
230203

231-
verify-security-bulletins-links-ci: ## Check for broken URLs in production in a GitHub Actions CI environment
232-
@echo "Checking for broken URLs in security-bulletins markdown files in CI environment..."
233-
rm link_sec_bul_report.json || echo "No security bulletins report exists. Proceeding to scan step"
234-
@npx linkinator "docs/docs-content/security-bulletins/**/*.md" "docs/docs-content/security-bulletins/*.md" "docs/docs-content/unlisted/cve-reports.md" --concurrency 1 --markdown --recurse --timeout 100000 --retry --retry-errors-jitter --retry-errors-count 5 \
235-
--skip "^https:\/\/docs\.spectrocloud\.com.*$$" \
236-
--skip "^https:\/\/docs\.spectrocloud\.com\/.*\/supplemental\-packs$$" \
237-
--skip "^http:\/\/docs\.spectrocloud\.com.*$$" \
238-
--skip "^https:\/\/software-private\.spectrocloud\.com.*$$" \
239-
--skip "^\/.*\.md$$" \
240-
--skip "!\[.*\]\(.*\)$$" \
241-
--skip "\.(jpg|jpeg|png|gif|webp)$$" \
242-
--skip "https:\/\/linux\.die\.net\/man\/.*$$" \
243-
--skip "https:\/\/mysql\.com\/.*\.*$$" \
244-
--skip "https:\/\/dev\.mysql\.com\/doc\/.*$$" \
245-
--format json > temp_sec_bul_report.json
204+
verify-rate-limited-links-ci: ## Check for broken URLs in production in a GitHub Actions CI environment
205+
@echo "Checking for broken URLs in security-bulletins and oss-licenses markdown files in CI environment..."
206+
@rm link_rate_limit_report.json || echo "No rate limited report exists. Proceeding to scan step"
207+
@echo "Checking the following paths: $(RATE_LIMITED_FILES_LIST)"
208+
@npx linkinator $(RATE_LIMITED_FILES_LIST) --config ./linkinator/linkinator-rate-limit-ci.config.json > temp_rate_limit_report.json
246209
@# Use jq to filter out links that do not start with http or https and keep only broken links
247-
@jq '[.links[] | select(.url | test("^https?://")) | select(.status >= 400)]' temp_sec_bul_report.json > filtered_sec_bul_report.json
248-
@rm temp_sec_bul_report.json
249-
@mv filtered_sec_bul_report.json scripts/link_sec_bul_report.json
210+
@jq '[.links[] | select(.url | test("^https?://")) | select(.status >= 400)]' temp_rate_limit_report.json > filtered_rate_limit_report.json
211+
@rm temp_rate_limit_report.json
212+
@mv filtered_rate_limit_report.json scripts/link_rate_limit_report.json
250213

251214
###@ Image Formatting
252215

docs/docs-content/automation/automation.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ This section contains documentation and guides for tools essential in automating
1616
[self-hosted Palette](../enterprise-version/enterprise-version.md) instance and deploying a
1717
[Private Cloud Gateway](../clusters/pcg/pcg.md).
1818

19+
- Palette Go SDK - Enables developers to interact with Palette APIs for automated resource management using Go.
20+
1921
- Palette Terraform Provider - Allows users to use [Terraform](https://www.terraform.io) for automating the deployment
2022
and management of Palette resources such as cluster profiles, cloud accounts, clusters, and more.
2123

22-
- Palette Crossplane Provider - It allows users to use [Crossplane](https://docs.crossplane.io/v1.15/) to provision and
24+
- Palette Crossplane Provider - Allows users to use [Crossplane](https://docs.crossplane.io/v1.15/) to provision and
2325
manage Palette resources through standard Kubernetes APIs.
2426

2527
## Resources
2628

2729
- [Palette CLI](./palette-cli/palette-cli.md)
30+
- [Palette Go SDK](./palette-sdk/palette-sdk.md)
2831
- [Palette Terraform Provider](./terraform/terraform.md)
2932
- [Palette Crossplane Provider](./crossplane/crossplane.md)

0 commit comments

Comments
 (0)