Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
refactor: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
paralta committed Jan 15, 2024
1 parent 39190c9 commit 9d326ed
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The VMClarity control plane includes several microservices:

- **Orchestrator**: Orchestrates and manages the life cycle of VMClarity
scan configs, scans and asset scans. Within the Orchestrator there is a
pluggable "provider" which connects the orchstrator to the environment to be
pluggable "provider" which connects the orchestrator to the environment to be
scanned and abstracts asset discovery, VM snapshotting as well as creation of
the scanner VMs. (**Note** The only supported provider today is AWS, other
hyperscalers are on the roadmap)
Expand All @@ -28,7 +28,7 @@ The VMClarity control plane includes several microservices:
CLI to offload work that would need to be done in every scanner, for example
downloading the latest vulnerability or malware signatures from the various DB
sources. The components included today are:
- grype-server: A rest API wrapper around the grype vulnerbility scanner
- grype-server: A rest API wrapper around the grype vulnerability scanner
- trivy-server: Trivy vulnerability scanner server
- exploitDB server: A test API which wraps the Exploit DB CVE to exploit mapping logic
- freshclam-mirror: A mirror of the ClamAV malware signatures
Expand Down
2 changes: 1 addition & 1 deletion TOUR.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Figure 3. VMClarity Scan Setup Step 1

<img src="img/vmclarity-scan-setup-1.png" alt="VMClarity Scan Setup - Step 1" width="40%" height="40%" title="VMClarity Scan Setup Step 1" />

- In the "New scan config" wizard shown in Figure 4, follow the wizard steps to name the scan, and identify the AWS scope (region, VPC, security groups, etc.). In the example shown in Figure 4, the AWS us-east-2 region, and a specific VPC were identied as well as a specific EC2 instance with the name "vmclarity-demo-vm".
- In the "New scan config" wizard shown in Figure 4, follow the wizard steps to name the scan, and identify the AWS scope (region, VPC, security groups, etc.). In the example shown in Figure 4, the AWS us-east-2 region, and a specific VPC were identified as well as a specific EC2 instance with the name "vmclarity-demo-vm".

Figure 4. VMClarity Scan Setup Step 2

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
| `VMCLARITY_ORCHESTRATOR_APISERVER_ADDRESS` | **yes** | | | The URL for the _API Server_ used by the _Orchestrator_ to interact with the API. Example: `https://apiserver.example.com:8888/api` |
| `VMCLARITY_ORCHESTRATOR_HEALTHCHECK_ADDRESS` | | `:8082` | | Bind address to used by the _Orchestrator_ for `healthz` endpoint. Example: `localhost:8082` which will make the health endpoints be available at `localhost:8082/healthz/live` and `localhost:8082/healthz/ready`. |
| `VMCLARITY_ORCHESTRATOR_DISCOVERY_INTERVAL` | | `2m` | | How frequently the _Discovery_ perform discovery of _Assets_. |
| `VMCLARITY_ORCHESTRATOR_CONTROLLER_STARTUP_DELAY` | | `7s` | | The time interval to wait between cotroller startups. **Do NOT change this parameter unless you know what you are doing.** |
| `VMCLARITY_ORCHESTRATOR_CONTROLLER_STARTUP_DELAY` | | `7s` | | The time interval to wait between controller startups. **Do NOT change this parameter unless you know what you are doing.** |
| `VMCLARITY_ORCHESTRATOR_ASSETSCAN_WATCHER_POLL_PERIOD` | | `15s` | | How frequently poll the API for events related _AssetScan_ objects. |
| `VMCLARITY_ORCHESTRATOR_ASSETSCAN_WATCHER_RECONCILE_TIMEOUT` | | `5m` | | Time period for reconciling a _AssetScan_ event is allowed to run. |
| `VMCLARITY_ORCHESTRATOR_ASSETSCAN_WATCHER_ABORT_TIMEOUT` | | `10m` | | Time period to wait for the _Scanner_ to gracefully stop on-going scan for _AssetScan_ before setting the state of the AssetScan to `Failed`. |
Expand Down
2 changes: 1 addition & 1 deletion installation/kubernetes/helm/vmclarity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ secrets.
| apiserver.image.digest | string | `""` | API Server image digest. If set will override the tag. |
| apiserver.image.pullPolicy | string | `"IfNotPresent"` | API Server image pull policy |
| apiserver.image.registry | string | `"ghcr.io"` | API Server image registry |
| apiserver.image.repository | string | `"openclarity/vmclarity-apiserver"` | API Server image repositiory |
| apiserver.image.repository | string | `"openclarity/vmclarity-apiserver"` | API Server image repository |
| apiserver.image.tag | string | `"latest"` | API Server image tag (immutable tags are recommended) |
| apiserver.logLevel | string | `"info"` | API Server log level |
| apiserver.podSecurityContext.enabled | bool | `true` | Pod security context enabled |
Expand Down
2 changes: 1 addition & 1 deletion installation/kubernetes/helm/vmclarity/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ apiserver:
image:
# -- API Server image registry
registry: ghcr.io
# -- API Server image repositiory
# -- API Server image repository
repository: openclarity/vmclarity-apiserver
# -- API Server image tag (immutable tags are recommended)
tag: latest
Expand Down
2 changes: 1 addition & 1 deletion pkg/orchestrator/assetscanprocessor/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (asp *AssetScanProcessor) newerExistingFindingTime(ctx context.Context, ass
// AssetScans can be processed out of chronological order:
//
// If multiple scans of the same asset complete, A first then B, we'll
// pick up the event for A, and then B. If while reconciling A, we hit a
// pick up the event for A, and then B. If while reconciling A we hit a
// failure (timeout or weird glitch), the reconciler will continue on
// and try to reconcile B. It will then pick up A on the next poll and
// re-reconcile it.
Expand Down
2 changes: 1 addition & 1 deletion pkg/orchestrator/provider/azure/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func handleAzureRequestError(err error, actionTmpl string, parts ...interface{})
sc := respError.StatusCode
switch {
case sc >= 400 && sc < 500:
// Client errors (BadRequest/Unauthorized etc.) are Fatal. We
// Client errors (BadRequest/Unauthorized/etc.) are Fatal. We
// also return true to indicate we have NotFound which is a
// special case in a lot of processing.
return sc == http.StatusNotFound, provider.FatalErrorf("error from azure while %s: %w", action, err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/orchestrator/provider/gcp/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func handleGcpRequestError(err error, actionTmpl string, parts ...interface{}) (
sc := gAPIError.Code
switch {
case sc >= http.StatusBadRequest && sc < http.StatusInternalServerError:
// Client errors (BadRequest/Unauthorized etc.) are Fatal. We
// Client errors (BadRequest/Unauthorized/etc.) are Fatal. We
// also return true to indicate we have NotFound which is a
// special case in a lot of processing.
return sc == http.StatusNotFound, provider.FatalErrorf("error from gcp while %s: %w", action, gAPIError)
Expand Down
2 changes: 1 addition & 1 deletion pkg/shared/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (
func InitLogger(level string, output io.Writer) {
logLevel, err := log.ParseLevel(level)
if err != nil {
log.Errorf("failed to prase log level, using default(%s): %v", DefaultLogLevel, err)
log.Errorf("failed to parse log level, using default(%s): %v", DefaultLogLevel, err)
logLevel = DefaultLogLevel
}
log.SetLevel(logLevel)
Expand Down
4 changes: 2 additions & 2 deletions rfc/end-to-end-type-safe-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ We are using OpenAPIs in the project to describe our APIs. It should be the sing

The API is changing frequently and we often face the issue that something is broken (especially on the UI) because of the changes made on the API.

UI developers always have to check the open api description because they don't have typing support during development. This process is manual and error-prone. It is also very hard to maintain because you might not know all the occurences that you have to change given a specific API change.
UI developers always have to check the open api description because they don't have typing support during development. This process is manual and error-prone. It is also very hard to maintain because you might not know all the occurrences that you have to change given a specific API change.

## Proposal

Expand All @@ -27,7 +27,7 @@ We could generate a client side SDK based on the OpenAPIs. The [OpenAPI generato

Besides generating the client side code to access the APIs we should also have a strategy for caching, request deduplication, keeping data up to date. Instead of solving all of this on our own we should use a proper data-fetching library. [`TanStack Query`](https://tanstack.com/query/v5/docs/react/overview) (formerly known as `react-query`) solves all of this (and even more) for us.

The above proposal is just the groundwork required for end to end type safety. Our client side code is written in JS at the moment. We should switch to TS in all the UI code and replace the API calls with the approppriate calls using the generated SDK to ensure end to end type safety.
The above proposal is just the groundwork required for end to end type safety. Our client side code is written in JS at the moment. We should switch to TS in all the UI code and replace the API calls with the appropriate calls using the generated SDK to ensure end to end type safety.

### Abandoned Ideas (Optional)

Expand Down

0 comments on commit 9d326ed

Please sign in to comment.