Skip to content

Commit

Permalink
Generated commit to update templated files based on rev 0a2908a in st…
Browse files Browse the repository at this point in the history
…ackabletech/operator-templating repo.

Triggered by:
Manual run triggered by: razvan with message [Post release 23.4]
  • Loading branch information
stackable-bot committed Apr 18, 2023
1 parent 553a90d commit 91c2b7c
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 50 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ jobs:
env:
RUSTC_BOOTSTRAP: 1
steps:
- name: Install protoc
- name: Install host dependencies
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.65.0
- uses: dtolnay/rust-toolchain@1.68.2
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
with:
key: udeps
- run: cargo install cargo-udeps
- run: cargo udeps
- run: cargo udeps --workspace

# This job evaluates the github environment to determine why this action is running and selects the appropriate
# target repository for published Helm charts based on this.
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.65.0
- uses: dtolnay/rust-toolchain@1.68.2
with:
components: rustfmt
- run: cargo fmt --all -- --check
Expand All @@ -125,14 +125,14 @@ jobs:
name: Run Clippy
runs-on: ubuntu-latest
steps:
- name: Install protoc
- name: Install host dependencies
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.65.0
- uses: dtolnay/rust-toolchain@1.68.2
with:
components: clippy
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
Expand All @@ -156,14 +156,14 @@ jobs:
name: Run RustDoc
runs-on: ubuntu-latest
steps:
- name: Install protoc
- name: Install host dependencies
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.65.0
- uses: dtolnay/rust-toolchain@1.68.2
with:
components: rustfmt
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
Expand All @@ -175,14 +175,14 @@ jobs:
name: Run Cargo Tests
runs-on: ubuntu-latest
steps:
- name: Install protoc
- name: Install host dependencies
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.65.0
- uses: dtolnay/rust-toolchain@1.68.2
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
with:
key: test
Expand Down Expand Up @@ -230,10 +230,10 @@ jobs:
name: Check if committed Helm charts are up to date
runs-on: ubuntu-latest
steps:
- name: Install protoc
- name: Install host dependencies
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
Expand All @@ -243,7 +243,7 @@ jobs:
with:
version: v3.6.2
- name: Set up cargo
uses: dtolnay/rust-toolchain@1.65.0
uses: dtolnay/rust-toolchain@1.68.2
- name: Set up rust-cache
uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
with:
Expand Down Expand Up @@ -288,17 +288,17 @@ jobs:
outputs:
IMAGE_TAG: ${{ steps.printtag.outputs.IMAGE_TAG }}
steps:
- name: Install protoc
- name: Install host dependencies
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
submodules: recursive
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
if: ${{ github.event_name == 'pull_request' }}
- uses: dtolnay/rust-toolchain@1.65.0
- uses: dtolnay/rust-toolchain@1.68.2
with:
components: rustfmt
- name: Install requirements for version tool
Expand Down
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,4 @@ crate-hashes.json
result
image.tar

tilt_options.json

deploy/olm/*/bundle
deploy/olm/*/bundle.Dockerfile
deploy/olm/*/catalog.Dockerfile
deploy/olm/*/catalog
tilt_options.json
2 changes: 1 addition & 1 deletion .readme/partials/borrowed/footer.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ We develop and test our operators on the following cloud platforms:
* GKE on Google Cloud Platform (GCP)
* [IONOS Cloud Managed Kubernetes](https://cloud.ionos.com/managed/kubernetes)
* K3s
* Kubernetes 1.21-1.25
* Kubernetes 1.23-1.26

We are currently working to support:

Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ chart-clean:
rm -rf "deploy/helm/${OPERATOR_NAME}/crds"

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

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

run-dev:
nix run -f. tilt -- up --port 5434
kubectl apply -f deploy/stackable-operators-ns.yaml
nix run -f. tilt -- up --port 5434 --namespace stackable-operators
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ We develop and test our operators on the following cloud platforms:
* GKE on Google Cloud Platform (GCP)
* [IONOS Cloud Managed Kubernetes](https://cloud.ionos.com/managed/kubernetes)
* K3s
* Kubernetes 1.21-1.25
* Kubernetes 1.23-1.26

We are currently working to support:

Expand Down
2 changes: 2 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ custom_build(
registry + '/' + operator_name,
'nix shell -f . crate2nix -c crate2nix generate && nix-build . -A docker --argstr dockerName "${EXPECTED_REGISTRY}/' + operator_name + '" && ./result/load-image | docker load',
deps=['rust', 'Cargo.toml', 'Cargo.lock', 'default.nix', "nix", 'build.rs', 'vendor'],
ignore=['*.~undo-tree~'],
# ignore=['result*', 'Cargo.nix', 'target', *.yaml],
outputs_image_ref_to='result/ref',
)
Expand All @@ -26,6 +27,7 @@ helm_crds, helm_non_crds = filter_yaml(
helm(
'deploy/helm/' + operator_name,
name=operator_name,
namespace="stackable-operators",
set=[
'image.repository=' + registry + '/' + operator_name,
],
Expand Down
30 changes: 23 additions & 7 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
tonic-reflection = attrs: {
buildInputs = [ pkgs.rustfmt ];
};
stackable-secret-operator = attrs: {
buildInputs = [ pkgs.protobuf pkgs.rustfmt ];
};
krb5-sys = attrs: {
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ (pkgs.enableDebugging pkgs.krb5) ];
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
BINDGEN_EXTRA_CLANG_ARGS = "-I${pkgs.glibc.dev}/include -I${pkgs.clang.cc.lib}/lib/clang/${pkgs.lib.getVersion pkgs.clang.cc}/include";
};
};
}
, meta ? pkgs.lib.importJSON ./nix/meta.json
Expand All @@ -27,14 +36,21 @@ rec {
dockerImage = pkgs.dockerTools.streamLayeredImage {
name = dockerName;
tag = dockerTag;
contents = [ pkgs.bashInteractive pkgs.coreutils pkgs.util-linuxMinimal ];
contents = [
# Common debugging tools
pkgs.bashInteractive pkgs.coreutils pkgs.util-linuxMinimal
# Kerberos 5 must be installed globally to load plugins correctly
pkgs.krb5
# Make the whole cargo workspace available on $PATH
build
];
config = {
Env =
let
fileRefVars = {
PRODUCT_CONFIG = deploy/config-spec/properties.yaml;
};
in pkgs.lib.concatLists (pkgs.lib.mapAttrsToList (env: path: pkgs.lib.optional (pkgs.lib.pathExists path) "${env}=${path}") fileRefVars);
Env =
let
fileRefVars = {
PRODUCT_CONFIG = deploy/config-spec/properties.yaml;
};
in pkgs.lib.concatLists (pkgs.lib.mapAttrsToList (env: path: pkgs.lib.optional (pkgs.lib.pathExists path) "${env}=${path}") fileRefVars);
Entrypoint = [ entrypoint ];
Cmd = [ "run" ];
};
Expand Down
5 changes: 5 additions & 0 deletions deploy/stackable-operators-ns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: stackable-operators
7 changes: 5 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@ RUN microdnf install -y yum \
&& yum clean all \
&& microdnf clean all

# Install kerberos client libraries
RUN microdnf install -y krb5-libs libkadm5 && microdnf clean all

Check warning on line 27 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / hadolint

[hadolint] docker/Dockerfile#L27 <DL3041>(https://github.com/hadolint/hadolint/wiki/DL3041)

Specify version with `dnf install -y <package>-<version>`.
Raw output
message:"Specify version with `dnf install -y <package>-<version>`."  location:{path:"docker/Dockerfile"  range:{start:{line:27  column:1}}}  severity:WARNING  source:{name:"hadolint"  url:"https://github.com/hadolint/hadolint"}  code:{value:"DL3041"  url:"https://github.com/hadolint/hadolint/wiki/DL3041"}

COPY LICENSE /licenses/LICENSE

COPY --from=builder /app/stackable-hdfs-operator /
COPY --from=builder /app/* /usr/local/bin/
COPY deploy/config-spec/properties.yaml /etc/stackable/hdfs-operator/config-spec/properties.yaml

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

USER stackable:stackable

ENTRYPOINT ["/stackable-hdfs-operator"]
ENTRYPOINT ["stackable-hdfs-operator"]
CMD ["run"]
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.65.0"
channel = "1.68.2"
6 changes: 0 additions & 6 deletions tests/ansible/playbook.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions tests/ansible/requirements.yaml

This file was deleted.

0 comments on commit 91c2b7c

Please sign in to comment.