Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ result
image.tar

tilt_options.json
.values.yaml

.direnv/
.direnvrc
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ config:
cp -r deploy/config-spec/* "deploy/helm/${OPERATOR_NAME}/configs";\
fi

# We generate a crds.yaml, so that the effect of code changes are visible.
# The operator will take care of the CRD rollout itself.
crds:
mkdir -p extra
cargo run --bin stackable-"${OPERATOR_NAME}" -- crd > extra/crds.yaml
Expand Down
5 changes: 0 additions & 5 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ custom_build(
outputs_image_ref_to='result/ref',
)

# Load the latest CRDs from Nix
watch_file('result')
if os.path.exists('result'):
k8s_yaml('result/crds.yaml')

# We need to set the correct image annotation on the operator Deployment to use e.g.
# oci.stackable.tech/sandbox/opa-operator:7y19m3d8clwxlv34v5q2x4p7v536s00g instead of
# oci.stackable.tech/sandbox/opa-operator:0.0.0-dev (which does not exist)
Expand Down
17 changes: 17 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ ignore = [
#
# https://github.com/RustCrypto/RSA/issues/19 is the tracking issue
"RUSTSEC-2023-0071",

# https://rustsec.org/advisories/RUSTSEC-2024-0436
# The "paste" crate is no longer maintained because the owner states that the implementation is
# finished. There are at least two (forked) alternatives which state to be maintained. They'd
# need to be vetted before a potential switch. Additionally, they'd need to be in a maintained
# state for a couple of years to provide any benefit over using "paste".
#
# This crate is only used in a single place in the xtask package inside the declarative
# "write_crd" macro. The impact of vulnerabilities, if any, should be fairly minimal.
#
# See thread: https://users.rust-lang.org/t/paste-alternatives/126787/4
#
# This can only be removed again if we decide to use a different crate.
"RUSTSEC-2024-0436",
]

[bans]
Expand Down Expand Up @@ -67,6 +81,9 @@ license-files = [
[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-git = [
"https://github.com/kube-rs/kube-rs",
]

[sources.allow-org]
github = ["stackabletech"]
5 changes: 2 additions & 3 deletions deploy/helm/opa-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,15 @@ spec:
fieldRef:
fieldPath: spec.nodeName

- name: OPA_BUNDLE_BUILDER_CLUSTERROLE
value: {{ include "operator.fullname" . }}-opa-bundle-builder-clusterrole

{{- if .Values.kubernetesClusterDomain }}
- name: KUBERNETES_CLUSTER_DOMAIN
value: {{ .Values.kubernetesClusterDomain | quote }}
{{- end }}

{{- include "telemetry.envVars" . | nindent 12 }}
{{- include "maintenance.envVars" . | nindent 12 }}
- name: OPA_BUNDLE_BUILDER_CLUSTERROLE
value: {{ include "operator.fullname" . }}-opa-bundle-builder-clusterrole
volumes:
- name: config-spec
configMap:
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm/opa-operator/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@

---
apiVersion: v1
kind: Service
metadata:
# Note(@sbernauer): We could also call the Service something like
# "product-operator-conversion-webhook". However, in the future we will have more webhooks, and
# it seems like an overkill to have a dedicated Service per webhook.
name: {{ include "operator.fullname" . }}
labels:
{{- include "operator.labels" . | nindent 4 }}
Expand Down
6 changes: 3 additions & 3 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ in pkgs.mkShell rec {
];

# derivation runtime dependencies
buildInputs = pkgs.lib.concatMap (crate: crate.buildInputs) cargoDependencySet;
buildInputs = pkgs.lib.unique (pkgs.lib.concatMap (crate: crate.buildInputs) cargoDependencySet);

# build time dependencies
nativeBuildInputs = pkgs.lib.concatMap (crate: crate.nativeBuildInputs) cargoDependencySet ++ (with pkgs; [
nativeBuildInputs = pkgs.lib.unique (pkgs.lib.concatMap (crate: crate.nativeBuildInputs) cargoDependencySet ++ (with pkgs; [
beku
docker
gettext # for the proper envsubst
Expand All @@ -38,7 +38,7 @@ in pkgs.mkShell rec {
# tilt already defined in default.nix
which
yq-go
]);
]));

LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
BINDGEN_EXTRA_CLANG_ARGS = "-I${pkgs.glibc.dev}/include -I${pkgs.clang}/resource-root/include";
Expand Down