Skip to content

Commit 1160ef5

Browse files
chore: Update templated files (08477de) (#313)
* chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@08477de Reference-to: stackabletech/operator-templating@08477de (nightly rust, clippy fix, various updates, linter) * rustfmt update --------- Co-authored-by: Lars Francke <[email protected]>
1 parent 5d97d9e commit 1160ef5

File tree

18 files changed

+120
-65
lines changed

18 files changed

+120
-65
lines changed

.github/pull_request_template.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
- [ ] Helm chart can be installed and deployed operator works
1616
- [ ] Integration tests passed (for non trivial changes)
1717
- [ ] Changes need to be "offline" compatible
18+
- [ ] Links to generated (nightly) docs added
19+
- [ ] Release note snippet added
1820

1921
### Reviewer
2022

@@ -29,4 +31,7 @@
2931

3032
- [ ] Feature Tracker has been updated
3133
- [ ] Proper release label has been added
32-
- [ ] [Roadmap](https://github.com/orgs/stackabletech/projects/25/views/1) has been updated
34+
- [ ] Links to generated (nightly) docs added
35+
- [ ] Release note snippet added
36+
- [ ] Add `type/deprecation` label & add to the [deprecation schedule](https://github.com/orgs/stackabletech/projects/44/views/1)
37+
- [ ] Add `type/experimental` label & add to the [experimental features tracker](https://github.com/orgs/stackabletech/projects/47)

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ env:
2727
CARGO_INCREMENTAL: '0'
2828
CARGO_PROFILE_DEV_DEBUG: '0'
2929
RUST_TOOLCHAIN_VERSION: "1.85.0"
30-
RUST_NIGHTLY_TOOLCHAIN_VERSION: "nightly-2025-01-15"
30+
RUST_NIGHTLY_TOOLCHAIN_VERSION: "nightly-2025-05-26"
3131
PYTHON_VERSION: "3.12"
3232
RUSTFLAGS: "-D warnings"
3333
RUSTDOCFLAGS: "-D warnings"
@@ -340,7 +340,7 @@ jobs:
340340
with:
341341
persist-credentials: false
342342
submodules: recursive
343-
- uses: cachix/install-nix-action@754537aaedb35f72ab11a60cc162c49ef3016495 # v31.2.0
343+
- uses: cachix/install-nix-action@17fe5fb4a23ad6cbbe47d6b3f359611ad276644c # v31.4.0
344344
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0
345345
with:
346346
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
@@ -378,7 +378,7 @@ jobs:
378378
- name: Install cosign
379379
uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2
380380
- name: Install syft
381-
uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 # v0.18.0
381+
uses: anchore/sbom-action/download-syft@e11c554f704a0b820cbf8c51673f6945e0731532 # v0.20.0
382382
- name: Build Docker image and Helm chart
383383
run: |
384384
# Installing helm and yq on ubicloud-standard-8-arm only

.github/workflows/integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
if: ${{ failure() }}
9898
env:
9999
SLACK_BOT_TOKEN: ${{ secrets.SLACK_INTEGRATION_TEST_TOKEN }}
100-
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
100+
uses: slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3 # v1.27.1
101101
with:
102102
channel-id: "C07UYJYSMSN" # notifications-integration-tests
103103
payload: |

.github/workflows/pr_pre-commit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
env:
99
CARGO_TERM_COLOR: always
1010
NIX_PKG_MANAGER_VERSION: "2.28.3"
11-
RUST_TOOLCHAIN_VERSION: "nightly-2025-01-15"
11+
RUST_TOOLCHAIN_VERSION: "nightly-2025-05-26"
1212
HADOLINT_VERSION: "v2.12.0"
1313
PYTHON_VERSION: "3.12"
1414

@@ -26,7 +26,7 @@ jobs:
2626
persist-credentials: false
2727
submodules: recursive
2828
fetch-depth: 0
29-
- uses: stackabletech/actions/run-pre-commit@4bfd3b65f22af597fe784599c077dc34bf5894a7 # v0.8.0
29+
- uses: stackabletech/actions/run-pre-commit@9aae2d1c14239021bfa33c041010f6fb7adec815 # v0.8.2
3030
with:
3131
python-version: ${{ env.PYTHON_VERSION }}
3232
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}

.hadolint.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
ignored:
3+
# Warning: Use the -y switch to avoid manual input dnf install -y <package>
4+
# https://github.com/hadolint/hadolint/wiki/DL3038
5+
# Reason: We set `assumeyes=True` in dnf.conf in our base image
6+
- DL3038
7+
8+
# Warning: Specify version with dnf install -y <package>-<version>
9+
# https://github.com/hadolint/hadolint/wiki/DL3041
10+
# Reason: It's good advice, but we're not set up to pin versions just yet
11+
- DL3041

.markdownlint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ MD033:
2222
MD024:
2323
# Only check sibling headings
2424
siblings_only: true
25+
26+
# MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading
27+
MD041: false # Github issues and PRs already have titles, and H1 is enormous in the description box.

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ repos:
1515
- id: detect-private-key
1616

1717
- repo: https://github.com/adrienverge/yamllint
18-
rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # 1.35.1
18+
rev: 79a6b2b1392eaf49cdd32ac4f14be1a809bbd8f7 # 1.37.0
1919
hooks:
2020
- id: yamllint
2121

2222
- repo: https://github.com/igorshubovych/markdownlint-cli
23-
rev: 586c3ea3f51230da42bab657c6a32e9e66c364f0 # 0.44.0
23+
rev: 192ad822316c3a22fb3d3cc8aa6eafa0b8488360 # 0.45.0
2424
hooks:
2525
- id: markdownlint
2626
types: [text]
@@ -36,7 +36,7 @@ repos:
3636
# If you do not, you will need to delete the cached ruff binary shown in the
3737
# error message
3838
- repo: https://github.com/astral-sh/ruff-pre-commit
39-
rev: 2c8dce6094fa2b4b668e74f694ca63ceffd38614 # 0.9.9
39+
rev: d19233b89771be2d89273f163f5edc5a39bbc34a # 0.11.12
4040
hooks:
4141
# Run the linter.
4242
- id: ruff
@@ -82,7 +82,7 @@ repos:
8282
- id: cargo-rustfmt
8383
name: cargo-rustfmt
8484
language: system
85-
entry: cargo +nightly-2025-01-15 fmt --all -- --check
85+
entry: cargo +nightly-2025-05-26 fmt --all -- --check
8686
stages: [pre-commit, pre-merge-commit]
8787
pass_filenames: false
8888
files: \.rs$
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!-- markdownlint-disable MD041 -->
22
## Documentation
33

4-
The stable documentation for this operator can be found [here](https://docs.stackable.tech/home/stable/{{operator_docs_slug}}).
4+
The stable documentation for this operator can be found in our [Stackable Data Platform documentation](https://docs.stackable.tech/home/stable/{{operator_docs_slug}}).
55
If you are interested in the most recent state of this repository, check out the [nightly docs](https://docs.stackable.tech/home/nightly/{{operator_docs_slug}}) instead.
66

77
The documentation for all Stackable products can be found at [docs.stackable.tech](https://docs.stackable.tech).
88

9-
If you have a question about the Stackable Data Platform contact us via our [homepage](https://stackable.tech/) or ask a public questions in our [Discussions forum](https://github.com/orgs/stackabletech/discussions).
9+
If you have a question about the Stackable Data Platform, contact us via our [homepage](https://stackable.tech/) or ask a public question in our [Discussions forum](https://github.com/orgs/stackabletech/discussions).

.readme/partials/borrowed/footer.md.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@ This is enforced automatically when you submit a Pull Request where a bot will g
6262
## Support
6363

6464
Get started with the community edition! If you want professional support, [we offer subscription plans and custom licensing](https://stackable.tech/en/plans/).
65+
66+
## Sponsor
67+
68+
If you want to support our work but don't need professional support please consider [sponsoring](https://github.com/sponsors/stackabletech) our work.

.readme/partials/borrowed/links.md.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<!-- markdownlint-disable MD041 -->
2-
{% if no_jenkins_job_badge %}{% else %}![Build Actions Status](https://ci.stackable.tech/buildStatus/icon?job={{operator_name}}%2doperator%2dit%2dnightly&subject=Integration%20Tests){% endif %}
32
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/stackabletech/{{operator_name}}-operator/graphs/commit-activity)
43
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](https://docs.stackable.tech/home/stable/contributor/index.html)
54
[![License OSL3.0](https://img.shields.io/badge/license-OSL3.0-green)](./LICENSE)

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"rust-analyzer.rustfmt.overrideCommand": [
33
"rustfmt",
4-
"+nightly-2025-01-15",
4+
"+nightly-2025-05-26",
55
"--edition",
66
"2024",
77
"--"

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<h1 align="center">Stackable Listener Operator</h1>
77

88
<!-- markdownlint-disable MD041 -->
9-
109
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/stackabletech/listener-operator/graphs/commit-activity)
1110
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](https://docs.stackable.tech/home/stable/contributor/index.html)
1211
[![License OSL3.0](https://img.shields.io/badge/license-OSL3.0-green)](./LICENSE)
@@ -29,12 +28,12 @@ As a user you do not need to build the operator yourself, but for development pu
2928
<!-- markdownlint-disable MD041 -->
3029
## Documentation
3130

32-
The stable documentation for this operator can be found [here](https://docs.stackable.tech/home/stable/listener-operator).
31+
The stable documentation for this operator can be found in our [Stackable Data Platform documentation](https://docs.stackable.tech/home/stable/listener-operator).
3332
If you are interested in the most recent state of this repository, check out the [nightly docs](https://docs.stackable.tech/home/nightly/listener-operator) instead.
3433

3534
The documentation for all Stackable products can be found at [docs.stackable.tech](https://docs.stackable.tech).
3635

37-
If you have a question about the Stackable Data Platform contact us via our [homepage](https://stackable.tech/) or ask a public questions in our [Discussions forum](https://github.com/orgs/stackabletech/discussions).
36+
If you have a question about the Stackable Data Platform, contact us via our [homepage](https://stackable.tech/) or ask a public question in our [Discussions forum](https://github.com/orgs/stackabletech/discussions).
3837

3938
<!-- markdownlint-disable MD041 -->
4039
## About The Stackable Data Platform
@@ -101,4 +100,8 @@ This is enforced automatically when you submit a Pull Request where a bot will g
101100

102101
Get started with the community edition! If you want professional support, [we offer subscription plans and custom licensing](https://stackable.tech/en/plans/).
103102

103+
## Sponsor
104+
105+
If you want to support our work but don't need professional support please consider [sponsoring](https://github.com/sponsors/stackabletech) our work.
106+
104107
<!-- markdownlint-disable MD041 MD022 MD032 -->

bors.toml

Lines changed: 0 additions & 9 deletions
This file was deleted.

default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ rec {
114114
# (see https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#trailing-whitespace).
115115
# So, remove the trailing newline already here to avoid that an
116116
# unnecessary change is shown in Git.
117-
sed -i '$d' Cargo.nix
117+
if [[ "$(uname)" == "Darwin" ]]; then
118+
sed -i \"\" '$d' Cargo.nix
119+
else
120+
sed -i '$d' Cargo.nix
121+
fi
118122
'';
119123
}

docker/Dockerfile

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# syntax=docker/dockerfile:1.10.0@sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5
1+
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
22
# NOTE: The syntax directive needs to be the first line in a Dockerfile
3+
# Find the latest versions here: https://hub.docker.com/r/docker/dockerfile/tags
4+
# And the changelogs: https://docs.docker.com/build/buildkit/dockerfile-release-notes/ or https://github.com/moby/buildkit/releases
35

46
# =============
57
# This file is automatically generated from the templates in stackabletech/operator-templating
@@ -25,6 +27,13 @@ ARG RELEASE="1"
2527
ARG STACKABLE_USER_GID="574654813"
2628
ARG STACKABLE_USER_UID="782252253"
2729

30+
# Sets the default shell to Bash with strict error handling and robust pipeline processing.
31+
# "-e": Exits immediately if a command exits with a non-zero status
32+
# "-u": Treats unset variables as an error, preventing unexpected behavior from undefined variables.
33+
# "-o pipefail": Causes a pipeline to return the exit status of the last command in the pipe that failed, ensuring errors in any part of a pipeline are not ignored.
34+
# "-c": Allows the execution of commands passed as a string
35+
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
36+
2837
# These labels have mostly been superceded by the OpenContainer spec annotations below but it doesn't hurt to include them
2938
# http://label-schema.org/rc1/
3039
LABEL name="Stackable Operator for Stackable Listener Operator"
@@ -49,7 +58,7 @@ LABEL com.redhat.license_terms=""
4958
LABEL io.buildah.version=""
5059
LABEL io.openshift.expose-services=""
5160

52-
# https://github.com/opencontainers/image-spec/blob/036563a4a268d7c08b51a08f05a02a0fe74c7268/annotations.md#annotations
61+
# https://github.com/opencontainers/image-spec/blob/64294bd7a2bf2537e1a6a34d687caae70300b0c4/annotations.md#annotations
5362
LABEL org.opencontainers.image.authors="[email protected]"
5463
LABEL org.opencontainers.image.url="https://stackable.tech"
5564
LABEL org.opencontainers.image.vendor="Stackable GmbH"
@@ -73,6 +82,15 @@ assumeyes=True
7382
tsflags=nodocs
7483
EOF
7584

85+
# SC2028
86+
# echo won't expand escape sequences. Consider printf.
87+
# https://github.com/koalaman/shellcheck/wiki/SC2028
88+
# Reason: This is complaining about the complicated PS1 statement.
89+
# It seems to work as intended so I'm not going to touch it!
90+
#
91+
# SC3037
92+
# It complains about echo flags not being available in POSIX sh but we set the shell to bash
93+
# hadolint ignore=SC2028,SC3037
7694
RUN <<EOF
7795
# Update image and install kerberos client libraries as well as some other utilities
7896
microdnf update

rust-toolchain.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# DO NOT EDIT, this file is generated by operator-templating
22
[toolchain]
33
channel = "1.85.0"
4+
profile = "default"

rust/operator-binary/src/csi_server/node.rs

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -303,17 +303,21 @@ impl csi::v1::node_server::Node for ListenerOperatorNode {
303303
// Add listener label to PV, allowing traffic to be directed based on reservations, rather than which replicas are *currently* active.
304304
// See https://github.com/stackabletech/listener-operator/issues/220
305305
self.client
306-
.apply_patch(FIELD_MANAGER_SCOPE, &pv, &PersistentVolume {
307-
metadata: ObjectMeta {
308-
labels: Some(listener_persistent_volume_label(&listener).context(
309-
ListenerPvReferenceSnafu {
310-
listener: ObjectRef::from_obj(&listener),
311-
},
312-
)?),
306+
.apply_patch(
307+
FIELD_MANAGER_SCOPE,
308+
&pv,
309+
&PersistentVolume {
310+
metadata: ObjectMeta {
311+
labels: Some(listener_persistent_volume_label(&listener).context(
312+
ListenerPvReferenceSnafu {
313+
listener: ObjectRef::from_obj(&listener),
314+
},
315+
)?),
316+
..Default::default()
317+
},
313318
..Default::default()
314319
},
315-
..Default::default()
316-
})
320+
)
317321
.await
318322
.with_context(|_| AddListenerLabelToPvSnafu {
319323
pv: ObjectRef::from_obj(&pv),
@@ -324,20 +328,23 @@ impl csi::v1::node_server::Node for ListenerOperatorNode {
324328
// IMPORTANT
325329
// Use a merge patch rather than an apply so that we don't delete labels added by other listener volumes.
326330
// Volumes aren't hot-swappable anyway, and all labels will be removed when the pod is deleted.
327-
.merge_patch(&pod, &Pod {
328-
metadata: ObjectMeta {
329-
labels: Some(
330-
[listener_mounted_pod_label(&listener).context(
331-
ListenerPodSelectorSnafu {
332-
listener: ObjectRef::from_obj(&listener),
333-
},
334-
)?]
335-
.into(),
336-
),
331+
.merge_patch(
332+
&pod,
333+
&Pod {
334+
metadata: ObjectMeta {
335+
labels: Some(
336+
[listener_mounted_pod_label(&listener).context(
337+
ListenerPodSelectorSnafu {
338+
listener: ObjectRef::from_obj(&listener),
339+
},
340+
)?]
341+
.into(),
342+
),
343+
..Default::default()
344+
},
337345
..Default::default()
338346
},
339-
..Default::default()
340-
})
347+
)
341348
.await
342349
.with_context(|_| AddListenerLabelToPodSnafu {
343350
pod: ObjectRef::from_obj(&pod),

rust/operator-binary/src/listener_controller.rs

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,13 @@ pub async fn run(client: stackable_operator::client::Client) {
5353
watcher::Config::default(),
5454
);
5555
let listener_store = controller.store();
56-
let event_recorder = Arc::new(Recorder::new(client.as_kube_client(), Reporter {
57-
controller: FULL_CONTROLLER_NAME.to_string(),
58-
instance: None,
59-
}));
56+
let event_recorder = Arc::new(Recorder::new(
57+
client.as_kube_client(),
58+
Reporter {
59+
controller: FULL_CONTROLLER_NAME.to_string(),
60+
instance: None,
61+
},
62+
));
6063
controller
6164
.owns(
6265
client.get_all_api::<DeserializeGuard<Service>>(),
@@ -299,12 +302,15 @@ pub async fn reconcile(
299302
port,
300303
protocol,
301304
}| {
302-
((protocol, name), ServicePort {
303-
name: Some(name.clone()),
304-
protocol: protocol.clone(),
305-
port: *port,
306-
..Default::default()
307-
})
305+
(
306+
(protocol, name),
307+
ServicePort {
308+
name: Some(name.clone()),
309+
protocol: protocol.clone(),
310+
port: *port,
311+
..Default::default()
312+
},
313+
)
308314
},
309315
)
310316
// Deduplicate ports by (protocol, name)
@@ -547,10 +553,13 @@ async fn node_names_for_nodeport_listener(
547553
let (pvs, endpoints) = try_join(
548554
async {
549555
client
550-
.list_with_label_selector::<PersistentVolume>(&(), &LabelSelector {
551-
match_labels: Some(listener_persistent_volume_label(listener).unwrap()),
552-
..Default::default()
553-
})
556+
.list_with_label_selector::<PersistentVolume>(
557+
&(),
558+
&LabelSelector {
559+
match_labels: Some(listener_persistent_volume_label(listener).unwrap()),
560+
..Default::default()
561+
},
562+
)
554563
.await
555564
.context(GetListenerPvsSnafu)
556565
},

0 commit comments

Comments
 (0)