Skip to content

Commit d60ebab

Browse files
committed
Merge branch 'master' into steve/unit-tests
2 parents e9f1f0c + b17a13e commit d60ebab

File tree

11 files changed

+46
-67
lines changed

11 files changed

+46
-67
lines changed

.github/workflows/apidiff.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,11 @@ on:
66
pull_request:
77

88
jobs:
9-
check_docs_only:
10-
name: check_docs_only
11-
runs-on: ubuntu-18.04
12-
outputs:
13-
skip: ${{ steps.check_docs_only.outputs.skip }}
14-
steps:
15-
- uses: actions/checkout@v3
16-
with:
17-
fetch-depth: 0
18-
- id: check_docs_only
19-
# Since PR's are squashed prior to merging to the branch checked out (default branch),
20-
# HEAD^ will resolve to the previous point in history.
21-
run: |
22-
REF="HEAD^"
23-
[[ -z "${{ github.base_ref }}" ]] || REF=$(git show-ref ${{ github.base_ref }} | head -1 | cut -d' ' -f2)
24-
echo "skip=$(test/check-docs-only.sh $REF)" >> $GITHUB_OUTPUT
25-
269
go-apidiff:
2710
name: Verify API differences
2811
runs-on: ubuntu-latest
29-
needs: check_docs_only
3012
# Pull requests from different repository only trigger this checks
31-
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) && needs.check_docs_only.outputs.skip != 'true'
13+
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
3214
steps:
3315
- name: Clone the code
3416
uses: actions/checkout@v3

.github/workflows/lint.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,11 @@ on:
66
pull_request:
77

88
jobs:
9-
check_docs_only:
10-
name: check_docs_only
11-
runs-on: ubuntu-18.04
12-
outputs:
13-
skip: ${{ steps.check_docs_only.outputs.skip }}
14-
steps:
15-
- uses: actions/checkout@v3
16-
with:
17-
fetch-depth: 0
18-
- id: check_docs_only
19-
# Since PR's are squashed prior to merging to the branch checked out (default branch),
20-
# HEAD^ will resolve to the previous point in history.
21-
run: |
22-
REF="HEAD^"
23-
[[ -z "${{ github.base_ref }}" ]] || REF=$(git show-ref ${{ github.base_ref }} | head -1 | cut -d' ' -f2)
24-
echo "skip=$(test/check-docs-only.sh $REF)" >> $GITHUB_OUTPUT
25-
269
lint:
2710
name: golangci-lint
2811
runs-on: ubuntu-latest
29-
needs: check_docs_only
3012
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
31-
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && needs.check_docs_only.outputs.skip != 'true'
13+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
3214
steps:
3315
- name: Setup Go
3416
uses: actions/setup-go@v4

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,6 @@ on:
66
pull_request:
77

88
jobs:
9-
check_docs_only:
10-
name: check_docs_only
11-
runs-on: ubuntu-18.04
12-
outputs:
13-
skip: ${{ steps.check_docs_only.outputs.skip }}
14-
steps:
15-
- uses: actions/checkout@v3
16-
with:
17-
fetch-depth: 0
18-
- id: check_docs_only
19-
# Since PR's are squashed prior to merging to the branch checked out (default branch),
20-
# HEAD^ will resolve to the previous point in history.
21-
run: |
22-
REF="HEAD^"
23-
[[ -z "${{ github.base_ref }}" ]] || REF=$(git show-ref ${{ github.base_ref }} | head -1 | cut -d' ' -f2)
24-
echo "skip=$(test/check-docs-only.sh $REF)" >> $GITHUB_OUTPUT
25-
269
test:
2710
name: ${{ matrix.os }}
2811
runs-on: ${{ matrix.os }}
@@ -31,9 +14,8 @@ jobs:
3114
os:
3215
- ubuntu-latest
3316
- macos-latest
34-
needs: check_docs_only
3517
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
36-
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && needs.check_docs_only.outputs.skip != 'true'
18+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
3719
steps:
3820
- name: Clone the code
3921
uses: actions/checkout@v3
@@ -61,10 +43,9 @@ jobs:
6143
name: Code coverage
6244
needs:
6345
- test
64-
- check_docs_only
6546
runs-on: ubuntu-latest
6647
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
67-
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && needs.check_docs_only.outputs.skip != 'true'
48+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
6849
steps:
6950
- name: Clone the code
7051
uses: actions/checkout@v3

docs/book/book.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title = "The Kubebuilder Book"
77
[output.html]
88
google-analytics = "UA-119864590-1"
99
curly-quotes = true
10-
additional-css = ["theme/css/markers.css", "theme/css/custom.css"]
10+
additional-css = ["theme/css/markers.css", "theme/css/custom.css", "theme/css/version-dropdown.css"]
1111
git-repository-url = "https://github.com/kubernetes-sigs/kubebuilder"
1212
edit-url-template = "https://github.com/kubernetes-sigs/kubebuilder/edit/master/docs/book/{path}"
1313

docs/book/src/component-config-tutorial/config-type.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Then, run `make build` to implement the interface for your API type, which would
1313
<h1>Use --controller=false</h1>
1414

1515
You may notice this command from the `CronJob` tutorial although here we
16-
explicity setting `--controller=false` because `ProjectConfig` is not
16+
explicitly setting `--controller=false` because `ProjectConfig` is not
1717
intended to be an API extension and cannot be reconciled.
1818

1919
</aside>

docs/book/src/component-config-tutorial/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ community has been migrating the core components away from this and toward
1010
using versioned config files, referred to as "component configs".
1111

1212
The rest of this tutorial will show you how to configure your kubebuilder
13-
project with the a component config type then moves on to implementing a custom
13+
project with the component config type then moves on to implementing a custom
1414
type so that you can extend this capability.
1515

1616

docs/book/src/migration/v3vsv4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Projects scaffolded with Kubebuilder v3 release still using the `go.kubebuilder.
4343
<aside class="note warning">
4444
<h1>Project customizations</h1>
4545

46-
After using the CLI to create your project, you are free to customise how you see fit. Bear in mind, that it is not recommended to deviate from the proposed layout unless you know what you are doing.
46+
After using the CLI to create your project, you are free to customize how you see fit. Bear in mind, that it is not recommended to deviate from the proposed layout unless you know what you are doing.
4747

4848
For example, you should refrain from moving the scaffolded files, doing so will make it difficult in upgrading your project in the future. You may also lose the ability to use some of the CLI features and helpers. For further information on the project layout, see the doc [What's in a basic project?][basic-project-doc]
4949

docs/book/src/plugins/kustomize-v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ If you are looking to scaffold the kustomize configuration manifests for your ow
5353

5454
If you are looking to define that your language plugin should use kustomize use the [Bundle Plugin][bundle]
5555
to specify that your language plugin is a composition with your plugin responsible for scaffold
56-
all that is laguage specific and kustomize for its configuration, see:
56+
all that is language specific and kustomize for its configuration, see:
5757

5858
```go
5959
// Bundle plugin which built the golang projects scaffold by Kubebuilder go/v3

docs/book/src/plugins/testing-plugins.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Test Your Plugins
22

3-
You can test your plugin in two dimenstion:
3+
You can test your plugin in two dimension:
44

55
1. Validate your plugin behavior through E2E tests
66
2. Generate sample projects based on your plugin that can be placed in `./testdata/`
@@ -18,7 +18,7 @@ You can check [Kubebuilder/v3/test/e2e/utils](https://pkg.go.dev/sigs.k8s.io/kub
1818
Once defined, you can use `TestContext` to:
1919

2020
1. Setup testing environment, e.g:
21-
- Cleanup environment, create temp dir. See [Prepare](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/test/e2e/utils/test_context.go#L97)
21+
- Clean up the environment, create temp dir. See [Prepare](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/test/e2e/utils/test_context.go#L97)
2222
- Install prerequisites CRDs: See [InstallCertManager](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/test/e2e/utils/test_context.go#L138), [InstallPrometheusManager](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.6.0/test/e2e/utils/test_context.go#L171)
2323
2. Validate the plugin behavior, e.g:
2424
- Trigger the plugin's bound subcommands. See [Init](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/test/e2e/utils/test_context.go#L213), [CreateAPI](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.6.0/test/e2e/utils/test_context.go#L222)
@@ -39,7 +39,7 @@ It can be straightforward to view content of sample projects generated by your p
3939

4040
For example, Kubebuilder generate [sample projects](https://github.com/kubernetes-sigs/kubebuilder/tree/v3.7.0/testdata) based on different plugins to validate the layouts.
4141

42-
Simiply, you can also use `TextContext` to generate folders of scaffolded projects from your plugin.
42+
Simply, you can also use `TextContext` to generate folders of scaffolded projects from your plugin.
4343
The commands are very similar as mentioned in [creating-plugins](creating-plugins.md#write-e2e-tests).
4444

4545
Following is a general workflow to create a sample by the plugin `go/v3`: (`kbc` is an instance of `TextContext`)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.version-dropdown-content {
2+
display: none;
3+
position: absolute;
4+
background-color: #f9f9f9;
5+
min-width: 90px;
6+
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
7+
z-index: 1;
8+
}
9+
10+
.version-dropdown-content a {
11+
color: black;
12+
padding: 12px 16px;
13+
text-decoration: none;
14+
display: block;
15+
}
16+
17+
.version-dropdown-content a:hover {
18+
background-color: #f1f1f1;
19+
}
20+
21+
.version-dropdown:hover .version-dropdown-content {
22+
display: block;
23+
}

0 commit comments

Comments
 (0)