From ff34fea2d6ab4e002836d1427bb851d9bc1206b4 Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Thu, 24 Oct 2024 10:00:58 -0700 Subject: [PATCH 1/9] fix: added airgap term --- .../config/vocabularies/spectrocloud-vocab/accept.txt | 6 ++---- .../config/vocabularies/spectrocloud-vocab/accept.txt | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/spectrocloud-docs-internal/styles/config/vocabularies/spectrocloud-vocab/accept.txt b/packages/spectrocloud-docs-internal/styles/config/vocabularies/spectrocloud-vocab/accept.txt index 237f18d..88d00f4 100644 --- a/packages/spectrocloud-docs-internal/styles/config/vocabularies/spectrocloud-vocab/accept.txt +++ b/packages/spectrocloud-docs-internal/styles/config/vocabularies/spectrocloud-vocab/accept.txt @@ -130,14 +130,12 @@ Kubernetes NFS Subdir External Provisioner Splunk Kubevious Citrix -Disable +[Dd]isable Hotfixes Hotfix Layer 2 L2 HashiCorp -airgap -Airgap jq Caddy jumpbox @@ -195,7 +193,7 @@ rhel Ubuntu RHEL repave -airgap +[Aa]irgap Crossplane traceroute Local UI diff --git a/packages/spectrocloud/styles/config/vocabularies/spectrocloud-vocab/accept.txt b/packages/spectrocloud/styles/config/vocabularies/spectrocloud-vocab/accept.txt index 237f18d..88d00f4 100644 --- a/packages/spectrocloud/styles/config/vocabularies/spectrocloud-vocab/accept.txt +++ b/packages/spectrocloud/styles/config/vocabularies/spectrocloud-vocab/accept.txt @@ -130,14 +130,12 @@ Kubernetes NFS Subdir External Provisioner Splunk Kubevious Citrix -Disable +[Dd]isable Hotfixes Hotfix Layer 2 L2 HashiCorp -airgap -Airgap jq Caddy jumpbox @@ -195,7 +193,7 @@ rhel Ubuntu RHEL repave -airgap +[Aa]irgap Crossplane traceroute Local UI From 5ba24f03b2709a7179eef3f2f95eb469ac53e619 Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Thu, 24 Oct 2024 10:04:33 -0700 Subject: [PATCH 2/9] docs: fixed headings title rule --- .../styles/spectrocloud-docs-internal/headings-title.yml | 1 + .../spectrocloud-docs-internal/tests/headings-title/pass.md | 2 ++ packages/spectrocloud/styles/spectrocloud/headings-title.yml | 1 + packages/spectrocloud/tests/headings-title/pass.md | 2 ++ 4 files changed, 6 insertions(+) diff --git a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/headings-title.yml b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/headings-title.yml index 81579ad..933c63a 100644 --- a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/headings-title.yml +++ b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/headings-title.yml @@ -5,5 +5,6 @@ extends: existence message: "Avoid using a noun that starts with an -ing in headings. Your heading starts with a word ending in '%s'." level: error scope: heading +tokens: first_token raw: - "ing\\b" diff --git a/packages/spectrocloud-docs-internal/tests/headings-title/pass.md b/packages/spectrocloud-docs-internal/tests/headings-title/pass.md index 1737a53..50502b7 100644 --- a/packages/spectrocloud-docs-internal/tests/headings-title/pass.md +++ b/packages/spectrocloud-docs-internal/tests/headings-title/pass.md @@ -9,3 +9,5 @@ Palette eXtended Kubernetes (PXK) is a Kubernetes distribution that is optimized ##### Security ###### Exceptions + +## Registry Mapping Rules diff --git a/packages/spectrocloud/styles/spectrocloud/headings-title.yml b/packages/spectrocloud/styles/spectrocloud/headings-title.yml index 81579ad..933c63a 100644 --- a/packages/spectrocloud/styles/spectrocloud/headings-title.yml +++ b/packages/spectrocloud/styles/spectrocloud/headings-title.yml @@ -5,5 +5,6 @@ extends: existence message: "Avoid using a noun that starts with an -ing in headings. Your heading starts with a word ending in '%s'." level: error scope: heading +tokens: first_token raw: - "ing\\b" diff --git a/packages/spectrocloud/tests/headings-title/pass.md b/packages/spectrocloud/tests/headings-title/pass.md index 1737a53..50502b7 100644 --- a/packages/spectrocloud/tests/headings-title/pass.md +++ b/packages/spectrocloud/tests/headings-title/pass.md @@ -9,3 +9,5 @@ Palette eXtended Kubernetes (PXK) is a Kubernetes distribution that is optimized ##### Security ###### Exceptions + +## Registry Mapping Rules From 23995cfc546452eda11c7f45505b80328a172ca6 Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Thu, 24 Oct 2024 10:12:36 -0700 Subject: [PATCH 3/9] fix: fix title rule --- .../styles/spectrocloud-docs-internal/headings-title.yml | 6 ++++-- .../spectrocloud-docs-internal/tests/headings-title/pass.md | 2 ++ .../spectrocloud/styles/spectrocloud/headings-title.yml | 6 ++++-- packages/spectrocloud/tests/headings-title/pass.md | 2 ++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/headings-title.yml b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/headings-title.yml index 933c63a..2d45bd3 100644 --- a/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/headings-title.yml +++ b/packages/spectrocloud-docs-internal/styles/spectrocloud-docs-internal/headings-title.yml @@ -5,6 +5,8 @@ extends: existence message: "Avoid using a noun that starts with an -ing in headings. Your heading starts with a word ending in '%s'." level: error scope: heading -tokens: first_token raw: - - "ing\\b" + - "^\\b\\w+ing\\b" +exceptions: + - "Breaking" + - "Breaking Changes" diff --git a/packages/spectrocloud-docs-internal/tests/headings-title/pass.md b/packages/spectrocloud-docs-internal/tests/headings-title/pass.md index 50502b7..257ee4b 100644 --- a/packages/spectrocloud-docs-internal/tests/headings-title/pass.md +++ b/packages/spectrocloud-docs-internal/tests/headings-title/pass.md @@ -11,3 +11,5 @@ Palette eXtended Kubernetes (PXK) is a Kubernetes distribution that is optimized ###### Exceptions ## Registry Mapping Rules + +# Breaking Changes diff --git a/packages/spectrocloud/styles/spectrocloud/headings-title.yml b/packages/spectrocloud/styles/spectrocloud/headings-title.yml index 933c63a..2d45bd3 100644 --- a/packages/spectrocloud/styles/spectrocloud/headings-title.yml +++ b/packages/spectrocloud/styles/spectrocloud/headings-title.yml @@ -5,6 +5,8 @@ extends: existence message: "Avoid using a noun that starts with an -ing in headings. Your heading starts with a word ending in '%s'." level: error scope: heading -tokens: first_token raw: - - "ing\\b" + - "^\\b\\w+ing\\b" +exceptions: + - "Breaking" + - "Breaking Changes" diff --git a/packages/spectrocloud/tests/headings-title/pass.md b/packages/spectrocloud/tests/headings-title/pass.md index 50502b7..257ee4b 100644 --- a/packages/spectrocloud/tests/headings-title/pass.md +++ b/packages/spectrocloud/tests/headings-title/pass.md @@ -11,3 +11,5 @@ Palette eXtended Kubernetes (PXK) is a Kubernetes distribution that is optimized ###### Exceptions ## Registry Mapping Rules + +# Breaking Changes From a5736ce159d580edc2a2ea5afc621df01cdb6fa0 Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Thu, 24 Oct 2024 10:40:57 -0700 Subject: [PATCH 4/9] ci: fix test script --- scripts/check_rule.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/check_rule.sh b/scripts/check_rule.sh index da1eb6c..11bb13f 100755 --- a/scripts/check_rule.sh +++ b/scripts/check_rule.sh @@ -79,7 +79,7 @@ check_fail_conditions() { # Check if the directory contains a file named fail.md if [ ! -f "$fail_md_file" ]; then - echo "Error: $base_directory does not contain a file named pass.md" + echo "Error: $base_directory does not contain a file named fail.md" exit 1 fi @@ -92,12 +92,12 @@ check_fail_conditions() { RESULT=$(vale --config="$config_file" --no-exit --output=line "$fail_md_file" | wc -l) - if [ -z $RESULT ]; then - echo "$package_name/$rule_name fail condition test - ❌" - log=$(vale --config="$config_file" --output=line "$fail_md_file") - echo "Debug: $log" - failed_tests=$((failed_tests + 1)) - return 1 + if [ "$RESULT" -eq 0 ]; then + echo "$package_name/$rule_name fail condition test - ❌" + log=$(vale --config="$config_file" --output=line "$fail_md_file") + echo "Debug: $log" + failed_tests=$((failed_tests + 1)) + return 1 fi echo "$package_name/$rule_name fail condition test - ✅" } From 02769fc98671c41b03f1c8c4e552fb620102989d Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Thu, 24 Oct 2024 10:43:03 -0700 Subject: [PATCH 5/9] chore: added missing rule --- .../styles/spectrocloud/longform.yml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 packages/spectrocloud/styles/spectrocloud/longform.yml diff --git a/packages/spectrocloud/styles/spectrocloud/longform.yml b/packages/spectrocloud/styles/spectrocloud/longform.yml new file mode 100644 index 0000000..3476ca7 --- /dev/null +++ b/packages/spectrocloud/styles/spectrocloud/longform.yml @@ -0,0 +1,29 @@ +# Copyright (c) Spectro Cloud +# SPDX-License-Identifier: Apache-2.0 + +--- +extends: existence +message: "Avoid using the short form of commands. Replace the short form flag in '%s' with the corresponding long form flag." +link: https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Commands-%26-Parameters +level: error +ignorecase: false +scope: raw +tokens: +# Match a word followed by one or more spaces, followed by the short form of a flag (one to three letters). The short flag can appear one or more times consecutively. For example: palette -h. + - (\b([\w]+))([\s ]{1,}[-][a-zA-Z]{1,3})+ +exceptions: + - ls([\s ]{1,}[-][a-zA-Z]{1,3})+ + - cd([\s ]{1,}[-][a-zA-Z]{1,3})+ + - cp([\s ]{1,}[-][a-zA-Z]{1,3})+ + - mv([\s ]{1,}[-][a-zA-Z]{1,3})+ + - rm([\s ]{1,}[-][a-zA-Z]{1,3})+ + - mkdir([\s ]{1,}[-][a-zA-Z]{1,3})+ + - rmdir([\s ]{1,}[-][a-zA-Z]{1,3})+ + - cat([\s ]{1,}[-][a-zA-Z]{1,3})+ + - pwd([\s ]{1,}[-][a-zA-Z]{1,3})+ + - echo([\s ]{1,}[-][a-zA-Z]{1,3})+ + - chmod([\s ]{1,}[-][a-zA-Z]{1,3})+ + - chown([\s ]{1,}[-][a-zA-Z]{1,3})+ + - sed([\s ]{1,}[-][a-zA-Z]{1,3})+ + - wc([\s ]{1,}[-][a-zA-Z]{1,3})+ + - tar([\s ]{1,}[-][a-zA-Z]{1,3})+ \ No newline at end of file From d9732ff9078a74f0a5a0f137e03ad089955e9c82 Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Thu, 24 Oct 2024 10:49:19 -0700 Subject: [PATCH 6/9] chore: removed colon --- packages/spectrocloud/tests/colon/.vale.ini | 4 ---- packages/spectrocloud/tests/colon/fail.md | 21 --------------------- packages/spectrocloud/tests/colon/pass.md | 21 --------------------- 3 files changed, 46 deletions(-) delete mode 100644 packages/spectrocloud/tests/colon/.vale.ini delete mode 100644 packages/spectrocloud/tests/colon/fail.md delete mode 100644 packages/spectrocloud/tests/colon/pass.md diff --git a/packages/spectrocloud/tests/colon/.vale.ini b/packages/spectrocloud/tests/colon/.vale.ini deleted file mode 100644 index a3dff66..0000000 --- a/packages/spectrocloud/tests/colon/.vale.ini +++ /dev/null @@ -1,4 +0,0 @@ -StylesPath = ../../styles/ -MinAlertLevel = suggestion -[*.md] -spectrocloud.colon = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/colon/fail.md b/packages/spectrocloud/tests/colon/fail.md deleted file mode 100644 index 7f00a04..0000000 --- a/packages/spectrocloud/tests/colon/fail.md +++ /dev/null @@ -1,21 +0,0 @@ -### Deploying Cluster Profile - -Use the following command to remove all previous configurations: - - ```bash - kubectl delete -f cluster-profile.yaml - ``` - - :::info - - This callout is allowed. - - ::: - -A few things to keep in mind before removing the cluster profile: - -- The cluster profile is removed Palette - -- Active clusters are not affected. - -- Names starting with `project:scope` are reserved for internal use. diff --git a/packages/spectrocloud/tests/colon/pass.md b/packages/spectrocloud/tests/colon/pass.md deleted file mode 100644 index c0d07eb..0000000 --- a/packages/spectrocloud/tests/colon/pass.md +++ /dev/null @@ -1,21 +0,0 @@ -### Deploying Cluster Profile - -Use the following command to remove all previous configurations. - - ```bash - kubectl delete -f cluster-profile.yaml - ``` - - :::info - - This callout is allowed. - - ::: - -A few things to keep in mind before removing the cluster profile: - -- The cluster profile is removed Palette - -- Active clusters are not affected. - -- Names starting with `project:scope` are reserved for internal use. From 6672424755ad0ac9fd0bddd4f74632ea15d96c33 Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Thu, 24 Oct 2024 10:54:17 -0700 Subject: [PATCH 7/9] chore: fix file path --- .../tests/heading-all-caps/.vale.ini | 2 +- .../tests/heading-title-case/.vale.ini | 3 +-- .../spectrocloud/styles/spectrocloud/heading-title-case.yml | 1 - packages/spectrocloud/tests/heading-title-case/.vale.ini | 3 +-- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/spectrocloud-docs-internal/tests/heading-all-caps/.vale.ini b/packages/spectrocloud-docs-internal/tests/heading-all-caps/.vale.ini index abad4c0..04d60ee 100644 --- a/packages/spectrocloud-docs-internal/tests/heading-all-caps/.vale.ini +++ b/packages/spectrocloud-docs-internal/tests/heading-all-caps/.vale.ini @@ -1,4 +1,4 @@ StylesPath = ../../styles/ MinAlertLevel = suggestion [*.md] -spectrocloud.heading-all-caps = YES \ No newline at end of file +spectrocloud-docs-internal.heading-all-caps = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/heading-title-case/.vale.ini b/packages/spectrocloud-docs-internal/tests/heading-title-case/.vale.ini index 72dc18c..2b49b9f 100644 --- a/packages/spectrocloud-docs-internal/tests/heading-title-case/.vale.ini +++ b/packages/spectrocloud-docs-internal/tests/heading-title-case/.vale.ini @@ -1,5 +1,4 @@ StylesPath = ../../styles/ MinAlertLevel = suggestion [*.md] -spectrocloud.heading-title-case = YES -spectrocloud.heading-all-caps = YES \ No newline at end of file +spectrocloud-docs-internal.heading-title-case = YES \ No newline at end of file diff --git a/packages/spectrocloud/styles/spectrocloud/heading-title-case.yml b/packages/spectrocloud/styles/spectrocloud/heading-title-case.yml index e5060fb..13cd788 100644 --- a/packages/spectrocloud/styles/spectrocloud/heading-title-case.yml +++ b/packages/spectrocloud/styles/spectrocloud/heading-title-case.yml @@ -8,4 +8,3 @@ scope: heading # $title, $sentence, $lower, $upper, or a pattern. match: $title style: Chicago # AP or Chicago; only applies when match is set to $title. - diff --git a/packages/spectrocloud/tests/heading-title-case/.vale.ini b/packages/spectrocloud/tests/heading-title-case/.vale.ini index 72dc18c..d96c77d 100644 --- a/packages/spectrocloud/tests/heading-title-case/.vale.ini +++ b/packages/spectrocloud/tests/heading-title-case/.vale.ini @@ -1,5 +1,4 @@ StylesPath = ../../styles/ MinAlertLevel = suggestion [*.md] -spectrocloud.heading-title-case = YES -spectrocloud.heading-all-caps = YES \ No newline at end of file +spectrocloud.heading-title-case = YES \ No newline at end of file From 509be89e3b4d69214889d587950c38acd417b44a Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Thu, 24 Oct 2024 10:59:33 -0700 Subject: [PATCH 8/9] chore: updated test rules --- packages/spectrocloud-docs-internal/tests/colon/pass.md | 9 +++++++++ .../tests/heading-all-caps/fail.md | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/packages/spectrocloud-docs-internal/tests/colon/pass.md b/packages/spectrocloud-docs-internal/tests/colon/pass.md index c0d07eb..2c3253f 100644 --- a/packages/spectrocloud-docs-internal/tests/colon/pass.md +++ b/packages/spectrocloud-docs-internal/tests/colon/pass.md @@ -19,3 +19,12 @@ A few things to keep in mind before removing the cluster profile: - Active clusters are not affected. - Names starting with `project:scope` are reserved for internal use. + +#### External Registry Parameters + +:::warning + +This parameter is deprecated. Use the parameter [`stylus.externalRegistries`](#external-registries) to configure +external registries. + +::: diff --git a/packages/spectrocloud-docs-internal/tests/heading-all-caps/fail.md b/packages/spectrocloud-docs-internal/tests/heading-all-caps/fail.md index bfc369c..93ffadc 100644 --- a/packages/spectrocloud-docs-internal/tests/heading-all-caps/fail.md +++ b/packages/spectrocloud-docs-internal/tests/heading-all-caps/fail.md @@ -23,6 +23,11 @@ Select the workflow that best fits your needs. - [Create an Edge Native Host Cluster](#create-an-edge-native-host-cluster) - [Add an Edge Host to a Host Cluster](#add-an-edge-host-to-a-host-cluster) +### Improvements + + +- pack version 2.0.0 is now available with support for [agent mode deployment](../deployment-modes/agent-mode/agent-mode.md). + ## THIS IS NOT TITLE CASE ## Create an Edge Native Host Cluster From 977abfbcdb92aeecd7b609fd5a360ef2f40aa068 Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Thu, 24 Oct 2024 11:00:57 -0700 Subject: [PATCH 9/9] ci: updated vale rule --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 773f250..c95c048 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -9,7 +9,7 @@ concurrency: cancel-in-progress: true env: - VALE_VERSION: "3.6.0" + VALE_VERSION: "3.7.1" jobs: run-ci: