Website: Update build script to exclude folders with an underscore prefix & rename docs/Deploy/kubernetes/ (#17817)

Closes: #17582

Changes:
- Updated the `build-static-content` script to not generate HTML pages
for files in subfolders that are prefixed with an underscore
- Renamed the `docs/Deploy/kubernetes` folder »
`docs/Deploy/_kubernetes`
- Documented this new behavior on the communications page of the
handbook.
- Updated commands on the Deploy Fleet on Kubernetes page.

---------

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
This commit is contained in:
Eric 2024-03-22 18:15:01 -05:00 committed by GitHub
parent 80335d88d1
commit 6ae3880704
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 13 additions and 7 deletions

View File

@ -68,7 +68,7 @@ go.mod @fleetdm/go
/docs/Using-Fleet/REST-API.md @rachaelshaw # « REST API reference documentation /docs/Using-Fleet/REST-API.md @rachaelshaw # « REST API reference documentation
/docs/Contributing/API-for-contributors.md @rachaelshaw # « Advanced / contributors-only API reference documentation /docs/Contributing/API-for-contributors.md @rachaelshaw # « Advanced / contributors-only API reference documentation
/schema @eashaw # « Data tables (osquery/fleetd schema) documentation /schema @eashaw # « Data tables (osquery/fleetd schema) documentation
/docs/Deploy/kubernetes/ @dherder # « Kubernetes best practice /docs/Deploy/_kubernetes/ @dherder # « Kubernetes best practice
############################################################################################## ##############################################################################################
# 🫧 Pricing and features # 🫧 Pricing and features
# #

View File

@ -8,7 +8,7 @@ There are 2 primary ways to deploy the Fleet server to a Kubernetes cluster. The
We will assume you have `kubectl` and MySQL and Redis are all set up and running. Optionally you have minikube to test your deployment locally on your machine. We will assume you have `kubectl` and MySQL and Redis are all set up and running. Optionally you have minikube to test your deployment locally on your machine.
To deploy the Fleet server and connect to its dependencies (MySQL and Redis), we will use [Fleet's best practice `fleet-deployment.yml` file](https://github.com/fleetdm/fleet/blob/main/docs/Deploy/kubernetes/fleet-deployment.yml). To deploy the Fleet server and connect to its dependencies (MySQL and Redis), we will use [Fleet's best practice `fleet-deployment.yml` file](https://github.com/fleetdm/fleet/blob/main/docs/Deploy/_kubernetes/fleet-deployment.yml).
Let's tell Kubernetes to create the cluster by running the below command. Let's tell Kubernetes to create the cluster by running the below command.
@ -83,14 +83,14 @@ Note: this step is not neccessary when using the Fleet Helm Chart as it handles
The last step is to run the Fleet database migrations on your new MySQL server. To do this, run the following: The last step is to run the Fleet database migrations on your new MySQL server. To do this, run the following:
```sh ```sh
kubectl create -f ./docs/Deploy/kubernetes/fleet-migrations.yml kubectl create -f ./docs/Deploy/_kubernetes/fleet-migrations.yml
``` ```
In Kubernetes, you can only run a job once. If you'd like to run it again (i.e.: you'd like to run the migrations again using the same file), you must delete the job before re-creating it. To delete the job and re-run it, you can run the following commands: In Kubernetes, you can only run a job once. If you'd like to run it again (i.e.: you'd like to run the migrations again using the same file), you must delete the job before re-creating it. To delete the job and re-run it, you can run the following commands:
```sh ```sh
kubectl delete -f ./docs/Deploy/kubernetes/fleet-migrations.yml kubectl delete -f ./docs/Deploy/_kubernetes/fleet-migrations.yml
kubectl create -f ./docs/Deploy/kubernetes/fleet-migrations.yml kubectl create -f ./docs/Deploy/_kubernetes/fleet-migrations.yml
``` ```
#### Redis #### Redis
@ -158,7 +158,7 @@ kubectl create secret tls fleet-tls --key=./tls.key --cert=./tls.crt
First we must deploy the instances of the Fleet webserver. The Fleet webserver is described using a Kubernetes deployment object. To create this deployment, run the following: First we must deploy the instances of the Fleet webserver. The Fleet webserver is described using a Kubernetes deployment object. To create this deployment, run the following:
```sh ```sh
kubectl apply -f ./docs/Deploy/fleet-deployment.yml kubectl apply -f ./docs/Deploy/_kubernetes/fleet-deployment.yml
``` ```
You should be able to get an instance of the webserver running via `kubectl get pods` and you should see the following logs: You should be able to get an instance of the webserver running via `kubectl get pods` and you should see the following logs:
@ -174,7 +174,7 @@ ts=2017-11-16T02:48:38.441148166Z transport=https address=0.0.0.0:443 msg=listen
Now that the Fleet server is running on our cluster, we have to expose the Fleet webservers to the internet via a load balancer. To create a Kubernetes `Service` of type `LoadBalancer`, run the following: Now that the Fleet server is running on our cluster, we have to expose the Fleet webservers to the internet via a load balancer. To create a Kubernetes `Service` of type `LoadBalancer`, run the following:
```sh ```sh
kubectl apply -f ./docs/Deploy/fleet-service.yml kubectl apply -f ./docs/Deploy/_kubernetes/fleet-service.yml
``` ```
#### Configure DNS #### Configure DNS

View File

@ -296,6 +296,8 @@ Our handbook and docs pages are written in Markdown and are editable from our we
6. GitHub will run a series of automated checks and notify the reviewer. At this point, you are done and can safely close the browser page at any time. 6. GitHub will run a series of automated checks and notify the reviewer. At this point, you are done and can safely close the browser page at any time.
8. Check the “Files changed” section on the Open a pull request page to double-check your proposed changes. 8. Check the “Files changed” section on the Open a pull request page to double-check your proposed changes.
> Note: Pages in the `./docs/Contributing/` folder and folders with a underscore prefix (e.g., `./docs/Deploy/_kubernetes/`) are not included in the documentation on the Fleet website.
### Merging changes ### Merging changes
When merging a PR to the master branch of the [Fleet repo](https://github.com/fleetdm/fleet), remember that whatever you merge gets deployed live immediately. Ensure that the appropriate quality checks have been completed before merging. [Learn about the website QA process](#quality). When merging a PR to the master branch of the [Fleet repo](https://github.com/fleetdm/fleet), remember that whatever you merge gets deployed live immediately. Ensure that the appropriate quality checks have been completed before merging. [Learn about the website QA process](#quality).

View File

@ -207,6 +207,10 @@ module.exports = {
if(sectionRepoPath === 'docs/' && _.startsWith(pageUnextensionedUnwhitespacedLowercasedRelPath, 'contributing/')){ if(sectionRepoPath === 'docs/' && _.startsWith(pageUnextensionedUnwhitespacedLowercasedRelPath, 'contributing/')){
continue; continue;
} }
// Skip pages in folders starting with an underscore character.
if(sectionRepoPath === 'docs/' && _.startsWith(pageRelSourcePath.split(/\//).slice(-2)[0], '_')){
continue;
}
let RX_README_FILENAME = /\/?readme\.?m?d?$/i;// « for matching `readme` or `readme.md` (case-insensitive) at the end of a file path let RX_README_FILENAME = /\/?readme\.?m?d?$/i;// « for matching `readme` or `readme.md` (case-insensitive) at the end of a file path
// Determine this page's default (fallback) display title. // Determine this page's default (fallback) display title.