Skip to content

Commit e0400a3

Browse files
committed
Update templated files to rev 9945de3 (#580)
Automatically created PR based on commit 9945de357af0bb49e599b10dd49897db9704efd6 in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: razvan with message [post release 23.4]
1 parent 790ac5e commit e0400a3

File tree

11 files changed

+62
-44
lines changed

11 files changed

+62
-44
lines changed

.github/workflows/build.yml

+20-20
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ jobs:
3131
env:
3232
RUSTC_BOOTSTRAP: 1
3333
steps:
34-
- name: Install protoc
34+
- name: Install host dependencies
3535
run: |
3636
sudo apt-get update
37-
sudo apt-get install protobuf-compiler
37+
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
3838
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
3939
with:
4040
submodules: recursive
41-
- uses: dtolnay/rust-toolchain@1.65.0
41+
- uses: dtolnay/rust-toolchain@1.68.2
4242
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
4343
with:
4444
key: udeps
4545
- run: cargo install cargo-udeps
46-
- run: cargo udeps
46+
- run: cargo udeps --workspace
4747

4848
# This job evaluates the github environment to determine why this action is running and selects the appropriate
4949
# target repository for published Helm charts based on this.
@@ -116,7 +116,7 @@ jobs:
116116
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
117117
with:
118118
submodules: recursive
119-
- uses: dtolnay/rust-toolchain@1.65.0
119+
- uses: dtolnay/rust-toolchain@1.68.2
120120
with:
121121
components: rustfmt
122122
- run: cargo fmt --all -- --check
@@ -125,14 +125,14 @@ jobs:
125125
name: Run Clippy
126126
runs-on: ubuntu-latest
127127
steps:
128-
- name: Install protoc
128+
- name: Install host dependencies
129129
run: |
130130
sudo apt-get update
131-
sudo apt-get install protobuf-compiler
131+
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
132132
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
133133
with:
134134
submodules: recursive
135-
- uses: dtolnay/rust-toolchain@1.65.0
135+
- uses: dtolnay/rust-toolchain@1.68.2
136136
with:
137137
components: clippy
138138
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
@@ -156,14 +156,14 @@ jobs:
156156
name: Run RustDoc
157157
runs-on: ubuntu-latest
158158
steps:
159-
- name: Install protoc
159+
- name: Install host dependencies
160160
run: |
161161
sudo apt-get update
162-
sudo apt-get install protobuf-compiler
162+
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
163163
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
164164
with:
165165
submodules: recursive
166-
- uses: dtolnay/rust-toolchain@1.65.0
166+
- uses: dtolnay/rust-toolchain@1.68.2
167167
with:
168168
components: rustfmt
169169
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
@@ -175,14 +175,14 @@ jobs:
175175
name: Run Cargo Tests
176176
runs-on: ubuntu-latest
177177
steps:
178-
- name: Install protoc
178+
- name: Install host dependencies
179179
run: |
180180
sudo apt-get update
181-
sudo apt-get install protobuf-compiler
181+
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
182182
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
183183
with:
184184
submodules: recursive
185-
- uses: dtolnay/rust-toolchain@1.65.0
185+
- uses: dtolnay/rust-toolchain@1.68.2
186186
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
187187
with:
188188
key: test
@@ -230,10 +230,10 @@ jobs:
230230
name: Check if committed Helm charts are up to date
231231
runs-on: ubuntu-latest
232232
steps:
233-
- name: Install protoc
233+
- name: Install host dependencies
234234
run: |
235235
sudo apt-get update
236-
sudo apt-get install protobuf-compiler
236+
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
237237
- name: Checkout
238238
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
239239
with:
@@ -243,7 +243,7 @@ jobs:
243243
with:
244244
version: v3.6.2
245245
- name: Set up cargo
246-
uses: dtolnay/rust-toolchain@1.65.0
246+
uses: dtolnay/rust-toolchain@1.68.2
247247
- name: Set up rust-cache
248248
uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
249249
with:
@@ -288,17 +288,17 @@ jobs:
288288
outputs:
289289
IMAGE_TAG: ${{ steps.printtag.outputs.IMAGE_TAG }}
290290
steps:
291-
- name: Install protoc
291+
- name: Install host dependencies
292292
run: |
293293
sudo apt-get update
294-
sudo apt-get install protobuf-compiler
294+
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
295295
- name: Checkout
296296
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
297297
with:
298298
submodules: recursive
299299
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
300300
if: ${{ github.event_name == 'pull_request' }}
301-
- uses: dtolnay/rust-toolchain@1.65.0
301+
- uses: dtolnay/rust-toolchain@1.68.2
302302
with:
303303
components: rustfmt
304304
- name: Install requirements for version tool

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ We develop and test our operators on the following cloud platforms:
2121
* GKE on Google Cloud Platform (GCP)
2222
* [IONOS Cloud Managed Kubernetes](https://cloud.ionos.com/managed/kubernetes)
2323
* K3s
24-
* Kubernetes 1.21-1.25
24+
* Kubernetes 1.23-1.26
2525

2626
We are currently working to support:
2727

Makefile

+4-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ chart-clean:
5252
rm -rf "deploy/helm/${OPERATOR_NAME}/crds"
5353

5454
version:
55-
yq eval -i ".version = \"${VERSION}\" | .appVersion = \"${VERSION}\"" /dev/stdin < "deploy/helm/${OPERATOR_NAME}/Chart.yaml"
55+
cat "deploy/helm/${OPERATOR_NAME}/Chart.yaml" | yq ".version = \"${VERSION}\" | .appVersion = \"${VERSION}\"" > "deploy/helm/${OPERATOR_NAME}/Chart.yaml.new"
56+
mv "deploy/helm/${OPERATOR_NAME}/Chart.yaml.new" "deploy/helm/${OPERATOR_NAME}/Chart.yaml"
5657

5758
config:
5859
if [ -d "deploy/config-spec/" ]; then\
@@ -78,4 +79,5 @@ build: regenerate-charts helm-package docker-build
7879
publish: build docker-publish helm-publish
7980

8081
run-dev:
81-
nix run -f. tilt -- up --port 5436
82+
kubectl apply -f deploy/stackable-operators-ns.yaml
83+
nix run -f. tilt -- up --port 5436 --namespace stackable-operators

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ We develop and test our operators on the following cloud platforms:
9191
* GKE on Google Cloud Platform (GCP)
9292
* [IONOS Cloud Managed Kubernetes](https://cloud.ionos.com/managed/kubernetes)
9393
* K3s
94-
* Kubernetes 1.21-1.25
94+
* Kubernetes 1.23-1.26
9595

9696
We are currently working to support:
9797

Tiltfile

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ custom_build(
1212
registry + '/' + operator_name,
1313
'nix shell -f . crate2nix -c crate2nix generate && nix-build . -A docker --argstr dockerName "${EXPECTED_REGISTRY}/' + operator_name + '" && ./result/load-image | docker load',
1414
deps=['rust', 'Cargo.toml', 'Cargo.lock', 'default.nix', "nix", 'build.rs', 'vendor'],
15+
ignore=['*.~undo-tree~'],
1516
# ignore=['result*', 'Cargo.nix', 'target', *.yaml],
1617
outputs_image_ref_to='result/ref',
1718
)
@@ -26,6 +27,7 @@ helm_crds, helm_non_crds = filter_yaml(
2627
helm(
2728
'deploy/helm/' + operator_name,
2829
name=operator_name,
30+
namespace="stackable-operators",
2931
set=[
3032
'image.repository=' + registry + '/' + operator_name,
3133
],

default.nix

+23-7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
tonic-reflection = attrs: {
1111
buildInputs = [ pkgs.rustfmt ];
1212
};
13+
stackable-secret-operator = attrs: {
14+
buildInputs = [ pkgs.protobuf pkgs.rustfmt ];
15+
};
16+
krb5-sys = attrs: {
17+
nativeBuildInputs = [ pkgs.pkg-config ];
18+
buildInputs = [ (pkgs.enableDebugging pkgs.krb5) ];
19+
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
20+
BINDGEN_EXTRA_CLANG_ARGS = "-I${pkgs.glibc.dev}/include -I${pkgs.clang.cc.lib}/lib/clang/${pkgs.lib.getVersion pkgs.clang.cc}/include";
21+
};
1322
};
1423
}
1524
, meta ? pkgs.lib.importJSON ./nix/meta.json
@@ -27,14 +36,21 @@ rec {
2736
dockerImage = pkgs.dockerTools.streamLayeredImage {
2837
name = dockerName;
2938
tag = dockerTag;
30-
contents = [ pkgs.bashInteractive pkgs.coreutils pkgs.util-linuxMinimal ];
39+
contents = [
40+
# Common debugging tools
41+
pkgs.bashInteractive pkgs.coreutils pkgs.util-linuxMinimal
42+
# Kerberos 5 must be installed globally to load plugins correctly
43+
pkgs.krb5
44+
# Make the whole cargo workspace available on $PATH
45+
build
46+
];
3147
config = {
32-
Env =
33-
let
34-
fileRefVars = {
35-
PRODUCT_CONFIG = deploy/config-spec/properties.yaml;
36-
};
37-
in pkgs.lib.concatLists (pkgs.lib.mapAttrsToList (env: path: pkgs.lib.optional (pkgs.lib.pathExists path) "${env}=${path}") fileRefVars);
48+
Env =
49+
let
50+
fileRefVars = {
51+
PRODUCT_CONFIG = deploy/config-spec/properties.yaml;
52+
};
53+
in pkgs.lib.concatLists (pkgs.lib.mapAttrsToList (env: path: pkgs.lib.optional (pkgs.lib.pathExists path) "${env}=${path}") fileRefVars);
3854
Entrypoint = [ entrypoint ];
3955
Cmd = [ "run" ];
4056
};

deploy/stackable-operators-ns.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: v1
3+
kind: Namespace
4+
metadata:
5+
name: stackable-operators

docker/Dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@ RUN microdnf install -y yum \
2323
&& yum clean all \
2424
&& microdnf clean all
2525

26+
# Install kerberos client libraries
27+
RUN microdnf install -y krb5-libs libkadm5 && microdnf clean all
28+
2629
COPY LICENSE /licenses/LICENSE
2730

28-
COPY --from=builder /app/stackable-kafka-operator /
31+
COPY --from=builder /app/* /usr/local/bin/
2932
COPY deploy/config-spec/properties.yaml /etc/stackable/kafka-operator/config-spec/properties.yaml
3033

3134
RUN groupadd -g 1000 stackable && adduser -u 1000 -g stackable -c 'Stackable Operator' stackable
3235

3336
USER stackable:stackable
3437

35-
ENTRYPOINT ["/stackable-kafka-operator"]
38+
ENTRYPOINT ["stackable-kafka-operator"]
3639
CMD ["run"]

rust-toolchain.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[toolchain]
2-
channel = "1.65.0"
2+
channel = "1.68.2"

tests/ansible/playbook.yaml

-6
This file was deleted.

tests/ansible/requirements.yaml

-4
This file was deleted.

0 commit comments

Comments
 (0)