Skip to content

Commit 2be3dac

Browse files
committed
Add 'main/' from commit 'a548bc5c214f195aa22c97a00212949511f95d0c'
git-subtree-dir: main git-subtree-mainline: f8105ef git-subtree-split: a548bc5
2 parents f8105ef + a548bc5 commit 2be3dac

File tree

294 files changed

+53427
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

294 files changed

+53427
-0
lines changed

main/.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[alias]
2+
xtask = "run --package xtask --"

main/.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
crates/stackable-operator/crds/*.yaml linguist-generated
2+
*.stderr linguist-generated
3+
*.snap linguist-generated
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: "🐛 Bug Report"
3+
description: "If something isn't working as expected 🤔."
4+
labels: ["type/bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: Thanks for taking the time to file a bug report! Please fill out this form as completely as possible.
9+
10+
- type: input
11+
attributes:
12+
label: Affected version
13+
description: Which version do you see this bug in?
14+
15+
- type: textarea
16+
attributes:
17+
label: Current and expected behavior
18+
description: A clear and concise description of what operator-rs is doing and what you would expect.
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
attributes:
24+
label: Possible solution
25+
description: "If you have suggestions on a fix for the bug."
26+
27+
- type: textarea
28+
attributes:
29+
label: Additional context
30+
description: "Add any other context about the problem here. Or a screenshot if applicable."
31+
32+
- type: textarea
33+
attributes:
34+
label: Environment
35+
description: |
36+
What type of kubernetes cluster you are running aginst (k3s/eks/aks/gke/other) and any other information about your environment?
37+
placeholder: |
38+
Examples:
39+
Output of `kubectl version --short`
40+
41+
- type: dropdown
42+
attributes:
43+
label: Would you like to work on fixing this bug?
44+
description: |
45+
**NOTE**: Let us know if you would like to submit a PR for this. We are more than happy to help you through the process.
46+
options:
47+
- "yes"
48+
- "no"
49+
- "maybe"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
blank_issues_enabled: true
3+
contact_links:
4+
- name: 🙋🏾 Question
5+
about: Use this to ask a question about this project
6+
url: https://github.com/orgs/stackabletech/discussions/new?category=q-a
7+
- name: 🚀 Feature Requests and other things
8+
about: Open an issue with your feature request or any other issue not covered elsewhere
9+
url: https://github.com/stackabletech/operator-rs/issues/new
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
name: Pre-Release Workspace Member Updates and Releases
3+
about: This template can be used to track the updates and releases of all workspace members leading up to the next Stackable release
4+
title: "chore: Update and release workspace members for Stackable Release YY.M.X"
5+
labels: ['epic']
6+
assignees: ''
7+
---
8+
9+
<!--
10+
DO NOT REMOVE THIS COMMENT. It is intended for people who might copy/paste from the previous release issue.
11+
This was created by an issue template: https://github.com/stackabletech/operator-rs/issues/new/choose.
12+
-->
13+
14+
Part of stackabletech/issues#xxx.
15+
16+
> [!NOTE]
17+
> During a Stackable release we update all dependencies in the `operator-rs`
18+
> repository. After these bumps, each workspace member is released using an
19+
> appropriate SemVer version. Later, each product operator repository can then
20+
> use the updates crates.
21+
22+
Replace the items in the task lists below with the applicable Pull Requests
23+
24+
- [ ] Update Rust version and workflow actions, see below for more details.
25+
- [ ] Update Rust dependencies, see below for more details.
26+
- [ ] Adjust and then verify crate versions using `.scripts/verify_crate_versions.sh`.
27+
- [ ] Push the release tags using `.scripts/tag_and_push_release.sh`.
28+
29+
## Update Rust Version and Workflow Actions
30+
31+
> [!NOTE]
32+
> The PR is usually titled: `chore: Bump Rust version and workflow actions`
33+
34+
1. Adjust the version of the channel in the `rust-toolchain.toml` file. See
35+
<https://releases.rs>.
36+
2. Adjust the version `RUST_TOOLCHAIN_VERSION` in the workflows:
37+
- `.github/workflows/build.yml`
38+
- `.github/workflows/pre_commit.yaml`
39+
- `.github/workflows/publish-docs.yaml`
40+
3. Add a changelog entry.
41+
4. Update any actions (using the Git commit hash) in the workflows. Hint: Also
42+
make sure that the `cargo-udeps` action is up-to-date, otherwise the CI might
43+
report errors.
44+
45+
## Update Rust Dependencies
46+
47+
> [!NOTE]
48+
> This PR is usually titled: `chore: Bump Rust dependencies`
49+
50+
1. Bump minor versions of dependencies in the `Cargo.toml` manifest.
51+
2. Then run the `cargo update` command.
52+
3. Fix any code which needs updating due to the dependency bumps.
53+
4. Locally update any product operator to identify any breaking changes
54+
downstream.
55+
- Hint: Use the `[patch."https://github.com/..."]` mechanism to temporarily
56+
override the dependency.
57+
5. Add a changelog entry if required.
58+
59+
## Adjust and Verify Crate Versions
60+
61+
> [!WARNING]
62+
> Currently, all workspace members use `0.X.Y` versions. This means we can
63+
> introduce breaking changes in any version without needing to bump the major
64+
> level. But we still have the following rules:
65+
>
66+
> - Breaking changes (internally and externally) will bump the minor level of
67+
> the version, so `0.X.Y` becomes `0.X+1.Y`.
68+
> - All other non-breaking changes will bump the patch level of the version, so
69+
> `0.X.Y` becomes `0.X.Y+1`.
70+
71+
<!-- markdownlint-disable-next-line MD028 -->
72+
> [!NOTE]
73+
> The PR is usually titled: `chore: Release workspace members`
74+
75+
1. Bump the crate versions in their appropriate `Cargo.toml` manifests.
76+
2. Verify the previous step using `.scripts/verify_crate_versions.sh`.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Description
2+
3+
*Please add a description here. This will become the commit message of the merge request later.*
4+
5+
## Definition of Done Checklist
6+
7+
- Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
8+
- Please make sure all these things are done and tick the boxes
9+
10+
### Author
11+
12+
- [ ] Changes are OpenShift compatible
13+
- [ ] CRD changes approved
14+
- [ ] CRD documentation for all fields, following the [style guide](https://docs.stackable.tech/home/nightly/contributor/docs/style-guide).
15+
- [ ] Integration tests passed (for non trivial changes)
16+
- [ ] Changes need to be "offline" compatible
17+
18+
### Reviewer
19+
20+
- [ ] Code contains useful comments
21+
- [ ] Code contains useful logging statements
22+
- [ ] (Integration-)Test cases added
23+
- [ ] Documentation added or updated. Follows the [style guide](https://docs.stackable.tech/home/nightly/contributor/docs/style-guide).
24+
- [ ] Changelog updated
25+
- [ ] Cargo.toml only contains references to git tags (not specific commits or branches)
26+
27+
### Acceptance
28+
29+
- [ ] Feature Tracker has been updated
30+
- [ ] Proper release label has been added

main/.github/workflows/build.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
name: Stackable Build Pipeline
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- staging
9+
- trying
10+
- "renovate/**"
11+
tags:
12+
- "*"
13+
pull_request:
14+
merge_group:
15+
16+
env:
17+
CARGO_TERM_COLOR: always
18+
CARGO_INCREMENTAL: '0'
19+
CARGO_PROFILE_DEV_DEBUG: '0'
20+
RUST_TOOLCHAIN_VERSION: "1.87.0"
21+
RUSTFLAGS: "-D warnings"
22+
RUSTDOCFLAGS: "-D warnings"
23+
RUST_LOG: "info"
24+
25+
permissions: {}
26+
27+
jobs:
28+
# Identify unused dependencies
29+
run_udeps:
30+
name: Run Cargo Udeps
31+
runs-on: ubuntu-latest
32+
env:
33+
RUSTC_BOOTSTRAP: 1
34+
steps:
35+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36+
with:
37+
persist-credentials: false
38+
- uses: dtolnay/rust-toolchain@master
39+
with:
40+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
41+
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
42+
with:
43+
key: udeps
44+
- run: cargo install --locked [email protected]
45+
- run: cargo udeps --all-targets --all-features
46+
47+
run_cargodeny:
48+
name: Run Cargo Deny
49+
runs-on: ubuntu-latest
50+
strategy:
51+
matrix:
52+
checks:
53+
- advisories
54+
- bans licenses sources
55+
56+
# Prevent sudden announcement of a new advisory from failing ci:
57+
continue-on-error: ${{ matrix.checks == 'advisories' }}
58+
59+
steps:
60+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61+
with:
62+
persist-credentials: false
63+
- uses: EmbarkStudios/cargo-deny-action@30f817c6f72275c6d54dc744fbca09ebc958599f # v2.0.12
64+
with:
65+
command: check ${{ matrix.checks }}
66+
67+
run_rustdoc:
68+
name: Run RustDoc
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
72+
with:
73+
persist-credentials: false
74+
- uses: dtolnay/rust-toolchain@master
75+
with:
76+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
77+
components: rustfmt
78+
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
79+
with:
80+
key: doc
81+
- run: cargo doc --document-private-items
82+
83+
run_tests:
84+
name: Run Cargo Tests
85+
needs:
86+
- run_rustdoc
87+
runs-on: ubuntu-latest
88+
steps:
89+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
90+
with:
91+
persist-credentials: false
92+
- uses: dtolnay/rust-toolchain@master
93+
with:
94+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
95+
# rust-src is required for trybuild stderr output comparison to work
96+
# for our cases.
97+
# See: https://github.com/dtolnay/trybuild/issues/236#issuecomment-1620950759
98+
components: rust-src
99+
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
100+
with:
101+
key: test
102+
- run: cargo test --no-default-features --workspace
103+
- run: cargo test --all-features --workspace
104+
105+
tests_passed:
106+
name: All tests passed
107+
needs:
108+
- run_udeps
109+
- run_tests
110+
runs-on: ubuntu-latest
111+
steps:
112+
- name: log
113+
run: echo All tests have passed!
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Security audit
3+
4+
on:
5+
schedule:
6+
- cron: '15 4 * * *'
7+
workflow_dispatch:
8+
9+
permissions: {}
10+
11+
jobs:
12+
audit:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
with:
17+
persist-credentials: false
18+
- uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: pre-commit
3+
4+
on:
5+
pull_request:
6+
merge_group:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
RUST_TOOLCHAIN_VERSION: "nightly-2025-05-26"
11+
12+
permissions: {}
13+
14+
jobs:
15+
pre-commit:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+
with:
20+
persist-credentials: false
21+
fetch-depth: 0
22+
- uses: stackabletech/actions/run-pre-commit@4483641a7e24057bd2ba51cb4c3f2f0010ad21b7 # v0.8.4
23+
with:
24+
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}
25+
# rust-src is required for trybuild stderr output comparison to work
26+
# for our cases.
27+
# See: https://github.com/dtolnay/trybuild/issues/236#issuecomment-1620950759
28+
rust-components: rustfmt,clippy,rust-src
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: Publish Crate Docs
3+
4+
# Once the `preview` input is available, this can also run on PR when docs are
5+
# changed.
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
paths:
12+
- .github/workflows/publish-docs.yml
13+
- crates/**
14+
15+
env:
16+
RUST_TOOLCHAIN_VERSION: "1.87.0"
17+
18+
permissions: {}
19+
20+
jobs:
21+
build-docs:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout Repository
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
persist-credentials: false
28+
29+
- uses: dtolnay/rust-toolchain@master
30+
with:
31+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
32+
33+
- name: Build Crate Docs
34+
run: cargo doc --no-deps --all-features
35+
36+
- name: Add Redirect
37+
run: echo '<meta http-equiv="refresh" content="0;url=stackable_operator/index.html">' > target/doc/index.html
38+
39+
- name: Upload Documentation Artifacts
40+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
41+
with:
42+
path: target/doc
43+
44+
publish-docs:
45+
runs-on: ubuntu-latest
46+
needs: build-docs
47+
permissions:
48+
pages: write
49+
id-token: write
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deploy.outputs.page_url }}
53+
steps:
54+
- name: Deploy to Github Pages
55+
id: deploy
56+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

0 commit comments

Comments
 (0)