Skip to content

Commit 3881414

Browse files
committed
Merge branch 'main' into feature/cluster-resources
2 parents eacbd36 + bdb4e8b commit 3881414

File tree

22 files changed

+424
-150
lines changed

22 files changed

+424
-150
lines changed

.github/workflows/pr_pre-commit.yaml

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ env:
88
CARGO_TERM_COLOR: always
99
RUST_TOOLCHAIN_VERSION: "1.80.1"
1010
HADOLINT_VERSION: "v2.12.0"
11+
PYTHON_VERSION: "3.12"
1112

1213
jobs:
1314
pre-commit:
@@ -22,29 +23,8 @@ jobs:
2223
with:
2324
fetch-depth: 0
2425
submodules: recursive
25-
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
26+
- uses: stackabletech/actions/run-pre-commit@e8781161bc1eb037198098334cec6061fe24b6c3 # v0.0.2
2627
with:
27-
python-version: '3.12'
28-
- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a
29-
with:
30-
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
31-
components: rustfmt,clippy
32-
- name: Setup Hadolint
33-
shell: bash
34-
run: |
35-
set -euo pipefail
36-
37-
LOCATION_DIR="$HOME/.local/bin"
38-
LOCATION_BIN="$LOCATION_DIR/hadolint"
39-
40-
SYSTEM=$(uname -s)
41-
ARCH=$(uname -m)
42-
43-
mkdir -p "$LOCATION_DIR"
44-
curl -sL -o "${LOCATION_BIN}" "https://github.com/hadolint/hadolint/releases/download/${{ env.HADOLINT_VERSION }}/hadolint-$SYSTEM-$ARCH"
45-
chmod 700 "${LOCATION_BIN}"
46-
47-
echo "$LOCATION_DIR" >> "$GITHUB_PATH"
48-
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
49-
with:
50-
extra_args: "--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}"
28+
python-version: ${{ env.PYTHON_VERSION }}
29+
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}
30+
hadolint: ${{ env.HADOLINT_VERSION }}

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ repos:
6767
name: regenerate-charts
6868
language: system
6969
entry: make regenerate-charts
70-
stages: [commit, merge-commit, manual]
70+
stages: [pre-commit, pre-merge-commit, manual]
7171
pass_filenames: false
7272

7373
- id: cargo-test
7474
name: cargo-test
7575
language: system
7676
entry: cargo test
77-
stages: [commit, merge-commit, manual]
77+
stages: [pre-commit, pre-merge-commit, manual]
7878
pass_filenames: false

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,27 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Added
8+
9+
- `Listener.status.addresses` can now be configured to prefer either IP addresses or DNS hostnames ([#233]).
10+
711
### Changed
812

9-
- Listener.status.addresses for NodePort listeners now includes replicas that are currently unavailable ([#231]).
13+
- `Listener.status.addresses` for NodePort listeners now includes replicas that are currently unavailable ([#231]).
14+
- `Listener.status.addresses` now defaults to DNS hostnames for all service types (previously NodePort and ClusterIP would prefer IP addresses, [#233]).
1015
- Stale Listener subobjects will now be deleted ([#232]).
1116
- Tagged Listener Services with the SDP labels ([#232]).
1217

1318
### Fixed
1419

1520
- Listener.status.addresses is now de-duplicated ([#231]).
1621
- Listener controller now listens for ListenerClass updates ([#231]).
22+
- Propagate `ListenerClass.spec.serviceAnnotations` to the created Services ([#234]).
1723

1824
[#231]: https://github.com/stackabletech/listener-operator/pull/231
1925
[#232]: https://github.com/stackabletech/listener-operator/pull/232
26+
[#233]: https://github.com/stackabletech/listener-operator/pull/233
27+
[#234]: https://github.com/stackabletech/listener-operator/pull/234
2028

2129
## [24.7.0] - 2024-07-24
2230

Cargo.lock

Lines changed: 17 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.nix

Lines changed: 56 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ prost = "0.13"
2121
prost-types = "0.13"
2222
serde = "1.0"
2323
snafu = "0.8"
24-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.76.0" }
24+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.78.0" }
2525
strum = { version = "0.26", features = ["derive"] }
2626
socket2 = { version = "0.5", features = ["all"] }
2727
tokio = { version = "1.40", features = ["full"] }
@@ -31,5 +31,6 @@ tonic-build = "0.12"
3131
tonic-reflection = "0.12"
3232
tracing = "0.1.40"
3333

34-
# [patch."https://github.com/stackabletech/operator-rs.git"]
35-
# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" }
34+
[patch."https://github.com/stackabletech/operator-rs.git"]
35+
# stackable-operator = { path = "../operator-rs/crates/stackable-operator" }
36+
stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" }

crate-hashes.json

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy/helm/listener-operator/crds/crds.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ spec:
2424
spec:
2525
description: Defines a policy for how [Listeners](https://docs.stackable.tech/home/nightly/listener-operator/listener) should be exposed. Read the [ListenerClass documentation](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass) for more information.
2626
properties:
27+
preferredAddressType:
28+
default: Hostname
29+
description: |-
30+
Whether addresses should prefer using the IP address (`IP`) or the hostname (`Hostname`).
31+
32+
The other type will be used if the preferred type is not available. By default `Hostname` is used.
33+
enum:
34+
- Hostname
35+
- IP
36+
type: string
2737
serviceAnnotations:
2838
additionalProperties:
2939
type: string

docs/modules/listener-operator/pages/listenerclass.adoc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ How exactly this is accomplished depends on the cloud provider in question, but
3030
include::example$listenerclass-internal-gke.yaml[]
3131
----
3232

33+
[#servicetype]
3334
== Service types
3435

3536
The service type is defined by `ListenerClass.spec.serviceType`.
@@ -62,6 +63,24 @@ Compared to xref:#servicetype-nodeport[], this service type allows Pods to be mo
6263
However, it requires https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer[a cloud controller manager that supports load balancers].
6364
Additionally, many cloud providers charge for load-balanced traffic.
6465

66+
[#addresstype]
67+
== Address types
68+
69+
The Stackable Listener Operator supports both IP addresses and DNS hostnames. The preferred address type for a given ListenerClass can be configured using the `ListenerClass.spec.preferredAddressType` field. If no `preferredAddressType` is specified then it defaults to xref:#addresstype-hostname[].
70+
71+
NOTE: If the preferred address type is not supported for a given environment then another type will be used.
72+
73+
[#addresstype-ip]
74+
=== IP
75+
76+
The IP address of a resource. The addresses will be less predictable (especially for xref:#servicetype-clusterip[] services),
77+
but does not require any special client configuration (beyond what the xref:#servicetype[] requires).
78+
79+
[#addresstype-hostname]
80+
=== Hostname
81+
82+
The DNS hostname of a resource. Clients must be able to resolve these addresses in order to connect, which may require special DNS configuration.
83+
6584
== Default ListenerClasses
6685

6786
The Stackable Data Platform assumes the existence of a few predefined ListenerClasses, and will use them by default as appropriate:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use stackable_operator::{
88
};
99
use tonic::{Request, Response, Status};
1010

11-
use crate::utils::error_full_message;
11+
use crate::utils::error::error_full_message;
1212

1313
use super::{tonic_unimplemented, ListenerSelector, ListenerVolumeContext};
1414

0 commit comments

Comments
 (0)