Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 1 addition & 178 deletions __tests__/crawler.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { test, expect } = require('@playwright/test');
const { CheerioCrawler, downloadListOfUrls, extractUrls, EnqueueStrategy, Configuration, sleep } = require('crawlee');
import { decode } from 'html-entities';
const linkChecker = require('../src/utils/linkChecker');
const { crawlerSkipList: skipList, skipOriginsForLC } = require('../src/utils/link-check-config');
import YAML from 'yaml';
import needle from 'needle';

Expand Down Expand Up @@ -31,184 +32,6 @@ test('Crawl the docs and execute tests', async () => {
{ regex: /\/calico-cloud\/get-help\/support$/i, processContent: true },
{ regex: /\/calico-cloud\/get-started\/connect\/connect-cluster$/i, processContent: true },
];
const skipOriginsForLC = [
// All origins to skip link checking (literal or regex)
// Examples:
// /\/reference\/legal\/felix$/,
// 'http://localhost:4242/calico/3.24/reference/legal/felix',

// Skip this license attribution file, since we need to include the text of licenses unmodified,
// and some have dead links
'http://localhost:4242/calico/3.24/reference/legal/projectcalico',
'http://localhost:4242/calico/3.25/reference/legal/projectcalico',
'http://localhost:4242/calico/3.26/reference/legal/projectcalico',
'http://localhost:4242/calico/latest/reference/legal/projectcalico',
'http://localhost:4242/calico/next/reference/legal/projectcalico',
'http://localhost:4242/calico/3.25/reference/legal/node',
];
const skipList = [
/^https?:\/\/([\w-]+\.)?example\.com/,
/^https:\/\/kubernetes\.io\/docs\/reference\/generated\/kubernetes-api\/v1\.18/i,
/^https:\/\/v1-(15|16|17|18)\.docs\.kubernetes\.io\/docs\/reference\/generated\/kubernetes-api\/v1\.(15|16|17|18)/i,
/^https:\/\/github\.com\/projectcalico\/calico\/tree\/master\/[\w/.-]+\.md$/i,
/^https:\/\/www\.linkedin\.com\/company\/tigera\/?$/,
/^https:\/\/installer\.calicocloud\.io\/manifests\/.+\/manifests/,
'http://etcd.co',
'https://www.tigera.io/project-calico/community',
'https://openid.net/connect/',
'https://fedoraproject.org/wiki/EPEL',
'http://kubernetes.io/docs/user-guide/identifiers#names',
'http://kubernetes.io/docs/user-guide/volumes#emptydir',
'http://kubernetes.io/docs/user-guide/labels',
'https://nvd.nist.gov/vuln/detail/CVE-2017-5638',
'http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod',
'http://kubernetes.io/docs/user-guide/annotations',
'https://git.io/getLatestIstio',
'https://sns.us-east-2.amazonaws.com',
'https://success.docker.com/article/docker-ee-best-practices',
`https://installer.calicocloud.io/`,
`https://installer.calicocloud.io/charts`,
`https://docs.tigera.io/calico/charts`,
'https://downloads.tigera.io/ee/charts',
'https://Q4GSZWRKBA-dsn.algolia.net',
'http://backend.stars:6379/status',
'http://client.client:9000/status',
'http://frontend.stars:80/status',
`https://github.com/projectcalico/calico/releases/download/master/ocp.tgz`,
`https://downloads.tigera.io/ee/master/download/binaries/master/calicoctl`,
`https://github.com/projectcalico/calico/releases/download/master/install-calico-windows.ps1`,
`https://downloads.tigera.io/ee/master/download/binaries/master/calicoq`,
`https://en.wikipedia.org/wiki/Autonomous_System_(Internet)%3E`,
//`https://installer.calicocloud.io/manifests/v3.15.1-8/manifests`,
//`https://installer.calicocloud.io/manifests/v3.16.1-0/manifests`,
//`https://installer.calicocloud.io/manifests/v3.16.1-5/manifests`,
//`https://installer.calicocloud.io/manifests/v3.16.1-11/manifests`,
//`https://installer.calicocloud.io/manifests/v3.17.1-0/manifests`,
//`https://installer.calicocloud.io/manifests/v3.17.1-3/manifests`,
//`https://installer.calicocloud.io/manifests/v3.17.1-4/manifests`,
`https://d881b853ae312e00302a84f1e346a77.gr7.us-west-2.eks.amazonaws.com`,
/^https:\/\/fonts\.googleapis\.com\/css2/, // Google Fonts URLs with semicolons confuse the link checker
`https://www.googletagmanager.com`,
'https://www.googletagmanager.com/gtm.js?id=',
'https://twitter.com/tigeraio',
'https://twitter.com/projectcalico',
'https://csrc.nist.gov/publications/detail/fips/140/2/final',
/^https?:\/\/csrc\.nist\.gov\/projects\/cryptographic-module-validation-program\/certificate\/\d+$/,
/^https:\/\/installer\.calicocloud\.io:[0-9]{3,4}$/,
'https://help.ubuntu.com/community/NetworkManager', //==>Origin: http://localhost:4242/calico-enterprise/3.14/operations/troubleshoot/troubleshooting
'http://dpdk.org/git/dpdk', //==>Origin: https://raw.githubusercontent.com/projectcalico/vpp-dataplane/master/scripts/init_eks.sh
'http://dpdk.org/git/dpdk-kmods', //==>Origin: https://raw.githubusercontent.com/projectcalico/vpp-dataplane/master/scripts/init_eks.sh
//For frustrating 503 errors:
'https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator',
/^https:\/\/amd64\.ocp\.releases\.ci\.openshift\.org\/?$/, //==>Origin: http://localhost:4242/calico-enterprise/latest/getting-started/install-on-clusters/openshift/hostedcontrolplanes
//temp
/^https:\/\/v1-21\.docs\.kubernetes\.io\/docs\/reference\/generated\/kubernetes-api\/v1\.21\//,
'https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm',
'https://www.iana.org/assignments/service-names', //==>Origin: https://downloads.tigera.io/ee/v3.15.2/manifests/tigera-operator.yaml'
'https://stedolan.github.io/jq/',
`http://kubernetes.io/docs/user-guide/secrets/`,
`https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel-rbac.yml`,
`https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/`,
`https://raw.githubusercontent.com/projectcalico/calico//node/windows-packaging/CalicoWindows/kubernetes/kube-proxy-service.ps1`,
`https://projectcalico.docs.tigera.io/master/reference/installation/api#operator.tigera.io/v1.APIServer`,
`https://projectcalico.docs.tigera.io/master/reference/installation/api#operator.tigera.io/v1.Installation`,
'https://downloads.tigera.io/ee/master/download/binaries/master/calicoctl-darwin-amd64', //==>Origin: http://localhost:4242/calico-enterprise/next/operations/clis/calicoctl/install
'https://downloads.tigera.io/ee/master/download/binaries/master/calicoctl-windows-amd64.exe', //==>Origin: http://localhost:4242/calico-enterprise/next/operations/clis/calicoctl/install
'http://www.iana.org/assignments/service-names', //==>Origin: https://downloads.tigera.io/ee/v3.14.4/manifests/tigera-operator.yaml
'http://docs.openstack.org/',
'http://docs.openstack.org', //This seems to be temporarily down.
'https://docs.openstack.org/install-guide/environment-etcd.html', // 403 from OpenStack docs WAF in Netlify build environment
'https://tools.ietf.org/html/rfc5925',
'https://datatracker.ietf.org/doc/html/rfc1149',
'https://datatracker.ietf.org/doc/html/rfc7938',
'https://tools.ietf.org/html/rfc5890',
'https://tools.ietf.org/html/rfc1123',
'http://cr.yp.to/libtai/tai64.html#tai64n',
'https://thenewstack.io/faster-troubleshooting-with-dynamic-packet-capture/', //==>Origin: http://localhost:4242/calico-cloud/visibility/packetcapture
'https://golang.org/pkg/crypto/tls/#ClientAuthType', //==>Origin: https://downloads.tigera.io/ee/v3.17.0/manifests/tigera-prometheus-operator.yaml. The dead link is automatically redirected to a working page, so no fix needed in the origin.
'https://downloads.tigera.io/ee/archives/release-master-master.tgz', //==> This started after redesigning the archive procedure.
'http://nginx-svc.curl-ns.svc.cluster.local:80',
'http://nginx-svc.service-ns.svc.cluster.local:80',
'https://calicousers.slack.com/',
'https://calicousers.slack.com/archives/C017220EXU1',
'https://tigera-manager.mycompany.com',
'https://kb.isc.org/article/AA-01141/31/How-to-workaround-IPv6-prefix-length-issues-with-ISC-DHCP-clients.html',
'https://www.snort.org/documents',
'https://www.snort.org/downloads/#rule-downloads',
'https://www.projectcalico.org/everything-you-need-to-know-about-kubernetes-networking-on-azure/',
'https://www.tigera.io/calico-support/',
'https://www.tigera.io/legal/calico-cloud-support-policy',
'https://www.tigera.io/tutorials/?_sf_s=Deploy%20Service%20Mesh',
'https://www.projectcalico.org/comparing-kube-proxy-modes-iptables-or-ipvs/',
'https://www.projectcalico.org/hands-on-with-calicos-ebpf-service-handling/',
'https://www.tigera.io/blog/?_sft_post_tag=project-calico',
'https://www.tigera.io/tutorials/?_sf_s=%27calico%20ebpf%20and%20xdp%27,',
'https://www.tigera.io/tutorials/?_sf_s=Calico%20Basics',
'https://www.tigera.io/tutorials/?_sf_s=WireGuard',
'https://www.elastic.co/guide/en/apm/server/current/configuring-howto-apm-server.html',
'https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html',
/^https:\/\/www\.wireguard\.com\/.+/,
'https://godoc.org/time#Duration',
'https://www.tigera.io/contact',
'https://www.projectcalico.org/contact',
'https://hub.docker.com/_/microsoft-windows-servercore',
'https://github.com/tigera/operator/blob/master/pkg/render/applicationlayer/modsec-core-ruleset/modsecdefault.conf',
'https://github.com/tigera/operator/blob/master/pkg/render/applicationlayer/modsec-core-ruleset/crs-setup.conf',
'https://github.com/tigera/operator/tree/master/pkg/render/applicationlayer/modsec-core-ruleset',
'https://kubernetes.io/docs/setup/production-environment/tools/kops/#2-5-create-a-route53-domain-for-your-cluster',
'https://pkgs.k8s.io/',
'https://apt.kubernetes.io/',
'https://docs.tigera.io/calico-enterprise/3.15/about-calico-enterprise',
'https://your-jira-instance-name.atlassian.net/rest/api/2/issue/',
'https://bugzilla.netfilter.org/show_bug.cgi?id=1119',
'https://webexapis.com/v1/messages',
'https://www.projectcalico.org/everything-you-need-to-know-about-kubernetes-ingress-networking/',
'https://www.projectcalico.org/everything-you-need-to-know-about-kubernetes-networking-on-google-cloud/',
'https://www.projectcalico.org/everything-you-need-to-know-about-kubernetes-pod-networking-on-aws/',
'https://www.projectcalico.org/everything-you-need-to-know-about-kubernetes-services-networking/',
'https://www.projectcalico.org/introducing-the-calico-ebpf-dataplane/',
'https://www.projectcalico.org/kubernetes-service-ip-route-advertisement/',
'https://www.projectcalico.org/live-migration-from-flannel-to-calico/',
'https://www.projectcalico.org/why-bgp/',
'https://www.tigera.io/blog/calico-ipam-explained-and-enhanced/',
'https://www.tigera.io/blog/faster-troubleshooting-of-microservices-containers-and-kubernetes-with-dynamic-packet-capture/',
'https://www.tigera.io/blog/hands-on-guide-how-to-scan-and-block-container-images-to-mitigate-sbom-attacks/',
'https://www.tigera.io/blog/kubernetes-security-policy-10-critical-best-practices/',
'https://www.tigera.io/blog/when-linux-conntrack-is-no-longer-your-friend/',
'https://www.tigera.io/blog/why-bgp/',
'https://docs.nginx.com/nginx-ingress-controller/configuration/',
'https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/configmap-resource',
'https://prometheus.io/docs/prometheus/latest/disabled_features/', // ==>Origin: https://downloads.tigera.io/ee/v3.17.4/manifests/tigera-prometheus-operator.yaml
'https://prometheus.io/docs/prometheus/latest/feature_flags/', // ==>Origin: https://downloads.tigera.io/ee/v3.20.0-1.0/manifests/tigera-prometheus-operator.yaml
'https://docs.fluentd.org/filter/grep',
'https://techcommunity.microsoft.com/t5/networking-blog/direct-server-return-dsr-in-a-nutshell/ba-p/693710',
'https://www.f5.com/glossary/cookie-poisoning', //TEMPORARY
'https://www.f5.com/glossary/cross-site-scripting', //TEMPORARY
'https://www.f5.com/glossary/sql-injection', //TEMPORARY
'https://www.f5.com/labs/articles/threat-intelligence/application-protection-report-2019--episode-2--2018-breach-trend', //TEMPORARY
'https://installer.calicocloud.io/manifests/cc-operator/latest/deploy-with-container-security.yaml', //TEMPORARY
'https://stackoverflow.com/questions/tagged/calico',
/^https?:\/\/github\.com\//,
/^https?:\/\/(git|examples)\.k8s\.io\//,
'https://console.developers.google.com/apis/library/admin.googleapis.com/',
'https://docs.splunk.com/Documentation/Splunk/8.0.0/Data/UsetheHTTPEventCollector',
'https://guardian.calico-system.svc',
'https://developer.hashicorp.com/terraform',
'https://www.terraform.io/',
'http://developer.openstack.org/api-ref-networking-v2.html',
'https://docs.openstack.org/kolla-ansible/rocky/user/multi-regions.html',
'https://archive.istio.io/v1.15/docs/setup/additional-setup/sidecar-injection/#automatic-sidecar-injection',
'https://istio.io/v1.15/docs/reference/config/security/peer_authentication/',
'https://istio.io/v1.15/docs/setup/install/',
'https://sysctl-explorer.net/net/ipv4/fib_multipath_hash_policy/',
'https://calico-docs.mcp.kapa.ai',
'https://docs.tigera.io/img/calico-logo-2026-badge.png',
'http://www.w3.org/2000/svg', // Appears in SVG file 'xmlns', doesn't need checking
'https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html', // TEMP
'https://review.openstack.org/#/c/344008/',
'http://www.faqs.org/rfcs/rfc1966.html',
'http://www.faqs.org/rfcs/rfc4893.html'
];

const lc = linkChecker();
if (isLocalHost) lc.setLocalhost(DOCS);
Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default async function createAsyncConfig() {
tagline: 'Unified network security and observability for Kubernetes',
url: 'https://docs.tigera.io',
baseUrl: '/',
onBrokenAnchors: 'ignore',
onBrokenAnchors: 'warn',
onBrokenLinks: 'throw',
favicon: 'img/calico-logo-2026-badge.png',
markdown: {
Expand Down
Loading