Skip to content

Commit

Permalink
Merge pull request #567 from rook/master
Browse files Browse the repository at this point in the history
Sync latest master from upstream rook
  • Loading branch information
travisn authored Feb 6, 2024
2 parents 1ae8670 + 4e0c4f6 commit f70ca3e
Show file tree
Hide file tree
Showing 814 changed files with 73,987 additions and 26,435 deletions.
15 changes: 12 additions & 3 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,36 @@
"block",
"bot",
"build",
"cephfs-mirror",
"cephfsmirror",
"ci",
"core",
"cosi",
"csi",
"doc",
"docs",
"exporter",
"external",
"file",
"helm",
"k8sutil",
"manifest",
"mds",
"mgr",
"mon",
"monitoring",
"multus",
"nfs",
"object",
"operator",
"osd",
"pool",
"rbd-mirror",
"rbdmirror",
"rgw",
"security",
"subvolumegroup",
"namespace",
"test",
"webhook"
"tests"
]
],
"body-leading-blank": [
Expand All @@ -44,6 +49,10 @@
"footer-leading-blank": [
2,
"always"
],
"body-max-line-length": [
0,
"always"
]
}
}
3 changes: 1 addition & 2 deletions .docs/macros/includes/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3

from pygit2 import Repository
import re
Expand All @@ -12,7 +12,6 @@


def define_env(env):

repo = Repository(".")
if repo is not None:
target = repo.head.shorthand
Expand Down
2 changes: 1 addition & 1 deletion .docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "base.html" %}

{% block outdated %}
This document is for a development version of Rook.
This documentation is not for the latest stable version of Rook.
<a href="{{ '../' ~ base_url }}/latest-release/">
<strong>Click here for the latest release documentation.</strong>
</a>
Expand Down
19 changes: 15 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,23 @@ labels: bug
**File(s) to submit**:

* Cluster CR (custom resource), typically called `cluster.yaml`, if necessary

**Logs to submit**:

* Operator's logs, if necessary
* Crashing pod(s) logs, if necessary

To get logs, use `kubectl -n <namespace> logs <pod name>`
When pasting logs, always surround them with backticks or use the `insert code` button from the Github UI.
Read [GitHub documentation if you need help](https://help.github.com/en/articles/creating-and-highlighting-code-blocks).
To get logs, use `kubectl -n <namespace> logs <pod name>`
When pasting logs, always surround them with backticks or use the `insert code` button from the Github UI.
Read [GitHub documentation if you need help](https://help.github.com/en/articles/creating-and-highlighting-code-blocks).

**Cluster Status to submit**:

* Output of kubectl commands, if necessary

To get the health of the cluster, use `kubectl rook-ceph health`
To get the status of the cluster, use `kubectl rook-ceph ceph status`
For more details, see the [Rook kubectl Plugin](https://rook.io/docs/rook/latest-release/Troubleshooting/kubectl-plugin)

**Environment**:
* OS (e.g. from /etc/os-release):
Expand All @@ -36,4 +47,4 @@ Read [GitHub documentation if you need help](https://help.github.com/en/articles
* Storage backend version (e.g. for ceph do `ceph -v`):
* Kubernetes version (use `kubectl version`):
* Kubernetes cluster type (e.g. Tectonic, GKE, OpenShift):
* Storage backend status (e.g. for Ceph use `ceph health` in the [Rook Ceph toolbox](https://rook.io/docs/rook/latest/Troubleshooting/ceph-toolbox/#interactive-toolbox)):
* Storage backend status (e.g. for Ceph use `ceph health` in the [Rook Ceph toolbox](https://rook.io/docs/rook/latest-release/Troubleshooting/ceph-toolbox/#interactive-toolbox)):
18 changes: 11 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<!-- Please take a look at our [Contributing](https://rook.io/docs/rook/latest/Contributing/development-flow/)
documentation before submitting a Pull Request!
Thank you for contributing to Rook! -->
<!-- Thank you for contributing to Rook! -->

**Description of your changes:**
<!-- STEPS TO FOLLOW:
1. Add a description of the changes (frequently the same as the commit description)
2. Enter the issue number next to "Resolves #" below (if there is no tracking issue resolved, **remove that section**)
3. Review our Contributing documentation at https://rook.io/docs/rook/latest/Contributing/development-flow/
4. Follow the steps in the checklist below, starting with the **Commit Message Formatting**.
-->

**Which issue is resolved by this Pull Request:**
<!-- Uncomment this section with the issue number if an issue is being resolved
**Issue resolved by this Pull Request:**
Resolves #
--->

**Checklist:**

- [ ] **Commit Message Formatting**: Commit titles and messages follow guidelines in the [developer guide](https://rook.io/docs/rook/latest/Contributing/development-flow/#commit-structure)).
- [ ] **Skip Tests for Docs**: If this is only a documentation change, add the label `skip-ci` on the PR.
- [ ] **Commit Message Formatting**: Commit titles and messages follow guidelines in the [developer guide](https://rook.io/docs/rook/latest/Contributing/development-flow/#commit-structure).
- [ ] Reviewed the developer guide on [Submitting a Pull Request](https://rook.io/docs/rook/latest/Contributing/development-flow/#submitting-a-pull-request)
- [ ] [Pending release notes](https://github.com/rook/rook/blob/master/PendingReleaseNotes.md) updated with breaking and/or notable changes for the next minor release.
- [ ] Documentation has been updated, if necessary.
Expand Down
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2
enable-beta-ecosystems: true
updates:
# Dependencies listed in go.mod
- package-ecosystem: "gomod"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
groups:
golang-dependencies:
patterns:
- "github.com/golang*"
k8s-dependencies:
patterns:
- "k8s.io*"
- "sigs.k8s.io*"
github-dependencies:
patterns:
- "github.com*"

# Dependencies listed in .github/workflows/*.yml
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
16 changes: 16 additions & 0 deletions .github/workflows/auto-assign.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Assign issue to contributor
on:
issue_comment:
types: [created, edited]

jobs:
assign:
name: Run self assign job
runs-on: ubuntu-latest
steps:
- name: take the issue
uses: bdougie/take-action@main
with:
message: Thanks for taking this issue! Let us know if you have any questions!
trigger: /assign
token: ${{ secrets.GITHUB_TOKEN }}
171 changes: 74 additions & 97 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,111 +12,88 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

permissions:
contents: read

jobs:
macos-build:
runs-on: macos-10.15
runs-on: macos-12
if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')"
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-go@v2
with:
go-version: 1.17

- name: copy working directory to GOPATH
run: sudo mkdir -p /Users/runner/go/src/github.com && sudo cp -a /Users/runner/work/rook /Users/runner/go/src/github.com/

- name: build rook
working-directory: /Users/runner/go/src/github.com/rook/rook
run: |
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' BUILD_CONTAINER_IMAGE=false build
- name: validate build
working-directory: /Users/runner/go/src/github.com/rook/rook
run: tests/scripts/validate_modified_files.sh build

- name: run codegen
working-directory: /Users/runner/go/src/github.com/rook/rook
run: GOPATH=$(go env GOPATH) make codegen

- name: validate codegen
working-directory: /Users/runner/go/src/github.com/rook/rook
run: tests/scripts/validate_modified_files.sh codegen

- name: run mod check
run: GOPATH=$(go env GOPATH) make -j $(nproc) mod.check

- name: validate modcheck
run: tests/scripts/validate_modified_files.sh modcheck

- name: run crds-gen
working-directory: /Users/runner/go/src/github.com/rook/rook
run: make csv-clean && GOPATH=$(go env GOPATH) make crds

- name: validate crds-gen
working-directory: /Users/runner/go/src/github.com/rook/rook
run: tests/scripts/validate_modified_files.sh crd

- name: run gen-rbac
working-directory: /Users/runner/go/src/github.com/rook/rook
run: GOPATH=$(go env GOPATH) make gen-rbac

- name: validate gen-rbac
working-directory: /Users/runner/go/src/github.com/rook/rook
run: tests/scripts/validate_modified_files.sh gen-rbac

- name: consider debugging
if: failure()
run: |
# Enable tmate only in the Rook fork, where the USE_TMATE secret is set in the repo, or if the action is re-run
if [ "$GITHUB_REPOSITORY_OWNER" = "rook" ] || [ -n "${{ secrets.USE_TMATE }}" ] || [ "$GITHUB_RUN_ATTEMPT" -gt 1 ]; then
echo USE_TMATE=1 >> $GITHUB_ENV
fi
- name: set up tmate session for debugging
if: failure() && env.USE_TMATE
uses: mxschmitt/action-tmate@v3
timeout-minutes: 60
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-go@v5
with:
go-version: "1.21"

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.6.2

- name: build rook
run: |
# Install kubectl binary as required for generating csv
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
sudo chown root: /usr/local/bin/kubectl
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' BUILD_CONTAINER_IMAGE=false build
- name: validate build
run: tests/scripts/validate_modified_files.sh build

- name: run codegen
run: GOPATH=$(go env GOPATH) make codegen

- name: validate codegen
run: tests/scripts/validate_modified_files.sh codegen

- name: run mod check
run: GOPATH=$(go env GOPATH) make -j $(nproc) mod.check

- name: validate modcheck
run: tests/scripts/validate_modified_files.sh modcheck

- name: run crds-gen
run: make csv-clean && GOPATH=$(go env GOPATH) make crds

- name: validate crds-gen
run: tests/scripts/validate_modified_files.sh crd

- name: run gen-rbac
run: GOPATH=$(go env GOPATH) make gen-rbac

- name: validate gen-rbac
run: tests/scripts/validate_modified_files.sh gen-rbac

linux-build-all:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')"
strategy:
fail-fast: false
matrix:
go-version: ["1.17", "1.18"]
go-version: ["1.21"]
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: setup golang ${{ matrix.go-version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all

- name: build.all rook with go ${{ matrix.go-version }}
run: |
tests/scripts/github-action-helper.sh build_rook_all
- name: consider debugging
if: failure()
run: |
# Enable tmate only in the Rook fork, where the USE_TMATE secret is set in the repo, or if the action is re-run
if [ "$GITHUB_REPOSITORY_OWNER" = "rook" ] || [ -n "${{ secrets.USE_TMATE }}" ] || [ "$GITHUB_RUN_ATTEMPT" -gt 1 ]; then
echo USE_TMATE=1 >> $GITHUB_ENV
fi
- name: set up tmate session for debugging
if: failure() && env.USE_TMATE
uses: mxschmitt/action-tmate@v3
timeout-minutes: 60
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: setup golang ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all

- name: build.all rook with go ${{ matrix.go-version }}
run: |
tests/scripts/github-action-helper.sh build_rook_all
Loading

0 comments on commit f70ca3e

Please sign in to comment.