Skip to content

Commit 58c776e

Browse files
feat: Rollout crate/typos for operators (#841)
* chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@0f53eec Reference-to: stackabletech/operator-templating@0f53eec (feat: Rollout crate/typos for operators) * chore: Add typos.toml and fix spelling findings --------- Co-authored-by: Maxi Wittich <maximilian.wittich@stackable.tech>
1 parent e30b0ae commit 58c776e

7 files changed

Lines changed: 60 additions & 5 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ default_language_version:
77
node: system
88

99
repos:
10+
# The word lists live in a per-repo `typos.toml`, which is not templated.
11+
# typos has no layered configuration (https://github.com/crate-ci/typos/issues/193).
12+
# A templated config can currently not be extended locally.
13+
- repo: https://github.com/crate-ci/typos
14+
rev: 00f422f3b19c57bc6338715ebfe3316d38768461 # v1.50.3
15+
hooks:
16+
- id: typos
17+
# Drop the upstream default `--write-changes` so the hook only
18+
# reports failures instead of writing changes.
19+
# Keep `--force-exclude` so the excludes in typos.toml still
20+
# apply to the paths prek passes in.
21+
args: ["--force-exclude"]
22+
1023
- repo: https://github.com/pre-commit/pre-commit-hooks
1124
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # 6.0.0
1225
hooks:

‎docs/modules/hdfs/pages/getting_started/index.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You need:
1212
* kubectl
1313
* optional: Helm
1414

15-
Resource sizing depends on cluster type(s), usage and scope, but as a starting point the following resources are recommended as a minium requirement for this operator:
15+
Resource sizing depends on cluster type(s), usage and scope, but as a starting point the following resources are recommended as a minimum requirement for this operator:
1616

1717
* 0.2 cores (e.g. i5 or similar)
1818
* 256MB RAM

‎docs/modules/hdfs/pages/usage-guide/operations/rack-awareness.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This creates an internal topology label by combining the values of the `topology
3535
In order to enable gathering this information the Hadoop images contain the {hdfs-topology-provider}[hdfs-topology-provider] on the classpath, which can be configured to read labels from Kubernetes objects.
3636

3737
The operator deploys ClusterRoles and ServicesAccounts with the relevant RBAC rules to allow the Hadoop Pod to access the necessary Kubernetes objects.
38-
Topologies and other metadata such as Node- and Pod-IPs and endpoints are held in separate caches so that they can be refeshed independently of one another.
38+
Topologies and other metadata such as Node- and Pod-IPs and endpoints are held in separate caches so that they can be refreshed independently of one another.
3939
The {hdfs-topology-provider}[hdfs-topology-provider] is namespace-scoped and pods in the active namespace are watched so that changes can be propagated to the internal cache to minimise cache misses.
4040

4141
NOTE: Rack awareness may not work as expected on clusters such as `kind` or `k3s` that configure IP-masquerading differently to production-ready distributions.

‎tests/templates/kuttl/kerberos/02-create-kerberos-secretclass.txt.j2‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ metadata:
3939
name: secret-operator-keytab
4040
data:
4141
{% if test_scenario['values']['kerberos-backend'] == 'mit' %}
42-
# To create keytab. When promted enter password asdf
42+
# To create keytab. When prompted enter password asdf
4343
# cat | ktutil << 'EOF'
4444
# list
4545
# add_entry -password -p stackable-secret-operator@CLUSTER.LOCAL -k 1 -e aes256-cts-hmac-sha384-192

‎tests/templates/kuttl/smoke/30-install-hdfs.yaml.j2‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ spec:
8181
hdfsStorageType: Disk
8282
ssd:
8383
capacity: 1Gi
84-
# storageClass: premium # We can't set the storage class in itegration tests, as we don't know which ones are available
84+
# storageClass: premium # We can't set the storage class in integration tests, as we don't know which ones are available
8585
count: 1
8686
hdfsStorageType: SSD
8787
{% endif %}

‎tests/templates/kuttl/topology-provider/02-create-kerberos-secretclass.yaml.j2‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ metadata:
3333
name: secret-operator-keytab
3434
data:
3535
{% if test_scenario['values']['kerberos-backend'] == 'mit' %}
36-
# To create keytab. When promted enter password asdf
36+
# To create keytab. When prompted enter password asdf
3737
# cat | ktutil << 'EOF'
3838
# list
3939
# add_entry -password -p stackable-secret-operator@CLUSTER.LOCAL -k 1 -e aes256-cts-hmac-sha384-192

‎typos.toml‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Configuration for typos (https://github.com/crate-ci/typos), run via the prek
2+
# hook in .pre-commit-config.yaml.
3+
4+
[files]
5+
# Bare `typos` skips hidden dirs by default, but prek passes explicit paths and
6+
# so does check them. Turn it off so both agree.
7+
ignore-hidden = false
8+
9+
extend-exclude = [
10+
# Ignore `.git`, which the above `ignore-hidden = false` would otherwise pull in.
11+
".git/",
12+
# Generated by crate2nix (`make regenerate-nix`). Already skipped by the prek
13+
# top-level `exclude`; listed here so a bare `typos` run agrees.
14+
"Cargo.nix",
15+
# Generated by `make regenerate-charts` from the Rust doc comments, which are
16+
# checked at their source. The rest is Kubernetes' own schema documentation.
17+
"extra/crds.yaml",
18+
]
19+
20+
[default]
21+
# typos has no native suppression directive
22+
# (https://github.com/crate-ci/typos/issues/316), so these regexes provide one.
23+
# A marker must sit in a comment: after `#`, `//` or `;` (free text may follow),
24+
# or inside a closed `<!-- -->`, `/* */` or `{# #}` (free text may precede the
25+
# closer). An unterminated `typos:ignore-block-start` suppresses nothing.
26+
#
27+
# Use one of the following when the word is correct at one place but would still be a typo elsewhere:
28+
#
29+
# # typos:ignore-line at the end of the line it applies to
30+
# # typos:ignore-next-line on its own line, above the offending line
31+
# # typos:ignore-block-start / typos:ignore-block-end around a block
32+
extend-ignore-re = [
33+
'(?Rm)^.*?(?:(?:^|[^{])(?:#|//|;)[ \t]*typos:ignore-line\b.*|(?:<!--[ \t]*typos:ignore-line\b.*?-->|/\*[ \t]*typos:ignore-line\b.*?\*/|\{#[ \t]*typos:ignore-line\b.*?#\})[ \t]*)$',
34+
'(?Rm)^[ \t]*(?:(?:#|//|;)[ \t]*typos:ignore-next-line\b.*|(?:<!--[ \t]*typos:ignore-next-line\b.*?-->|/\*[ \t]*typos:ignore-next-line\b.*?\*/|\{#[ \t]*typos:ignore-next-line\b.*?#\})[ \t]*)\r?\n.*$',
35+
'(?ms)(?:(?:^|[^{])(?:#|//|;)[ \t]*typos:ignore-block-start\b|<!--[ \t]*typos:ignore-block-start\b[^\n]*?-->|/\*[ \t]*typos:ignore-block-start\b[^\n]*?\*/|\{#[ \t]*typos:ignore-block-start\b[^\n]*?#\}).*?(?:(?:^|[^{])(?:#|//|;)[ \t]*typos:ignore-block-end\b|<!--[ \t]*typos:ignore-block-end\b[^\n]*?-->|/\*[ \t]*typos:ignore-block-end\b[^\n]*?\*/|\{#[ \t]*typos:ignore-block-end\b[^\n]*?#\})',
36+
]
37+
38+
# Before adding an entry in here, consider an in-place marker instead.
39+
# Every entry below gets a one-line comment saying what the word is.
40+
[default.extend-words]
41+
# Azure Kubernetes Service
42+
aks = "aks"

0 commit comments

Comments
 (0)