Skip to content

Commit b99522a

Browse files
committed
chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@7dffd3c
Reference-to: stackabletech/operator-templating@7dffd3c (chore: Allow RUSTSEC-2024-0436 and github.com/kube-rs/kube-rs)
1 parent a81be6c commit b99522a

7 files changed

Lines changed: 2292 additions & 23 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ result
1313
image.tar
1414

1515
tilt_options.json
16+
.values.yaml
1617

1718
.direnv/
1819
.direnvrc

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ config:
4545
fi
4646

4747
crds:
48-
mkdir -p extra
49-
cargo run --bin stackable-"${OPERATOR_NAME}" -- crd > extra/crds.yaml
48+
mkdir -p deploy/helm/"${OPERATOR_NAME}"/crds
49+
cargo run --bin stackable-"${OPERATOR_NAME}" -- crd | yq eval '.metadata.annotations["helm.sh/resource-policy"]="keep"' - > "deploy/helm/${OPERATOR_NAME}/crds/crds.yaml"
5050

5151
chart-lint: compile-chart
5252
docker run -it -v $(shell pwd):/build/helm-charts -w /build/helm-charts quay.io/helmpack/chart-testing:v3.5.0 ct lint --config deploy/helm/ct.yaml

Tiltfile

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,18 @@ helm_values = settings.get('helm_values', None)
3535

3636
helm_override_image_repository = 'image.repository=' + registry + '/' + operator_name
3737

38-
k8s_yaml(helm(
39-
'deploy/helm/' + operator_name,
40-
name=operator_name,
41-
namespace="stackable-operators",
42-
set=[
43-
helm_override_image_repository,
44-
],
45-
values=helm_values,
46-
))
38+
# Exclude stale CRDs from Helm chart, and apply the rest
39+
helm_crds, helm_non_crds = filter_yaml(
40+
helm(
41+
'deploy/helm/' + operator_name,
42+
name=operator_name,
43+
namespace="stackable-operators",
44+
set=[
45+
helm_override_image_repository,
46+
],
47+
values=helm_values,
48+
),
49+
api_version = "^apiextensions\\.k8s\\.io/.*$",
50+
kind = "^CustomResourceDefinition$",
51+
)
52+
k8s_yaml(helm_non_crds)

deny.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ ignore = [
2424
#
2525
# https://github.com/RustCrypto/RSA/issues/19 is the tracking issue
2626
"RUSTSEC-2023-0071",
27+
28+
# https://rustsec.org/advisories/RUSTSEC-2024-0436
29+
# The "paste" crate is no longer maintained because the owner states that the implementation is
30+
# finished. There are at least two (forked) alternatives which state to be maintained. They'd
31+
# need to be vetted before a potential switch. Additionally, they'd need to be in a maintained
32+
# state for a couple of years to provide any benefit over using "paste".
33+
#
34+
# This crate is only used in a single place in the xtask package inside the declarative
35+
# "write_crd" macro. The impact of vulnerabilities, if any, should be fairly minimal.
36+
#
37+
# See thread: https://users.rust-lang.org/t/paste-alternatives/126787/4
38+
#
39+
# This can only be removed again if we decide to use a different crate.
40+
"RUSTSEC-2024-0436",
2741
]
2842

2943
[bans]
@@ -67,6 +81,9 @@ license-files = [
6781
[sources]
6882
unknown-registry = "deny"
6983
unknown-git = "deny"
84+
allow-git = [
85+
"https://github.com/kube-rs/kube-rs",
86+
]
7087

7188
[sources.allow-org]
7289
github = ["stackabletech"]

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

Lines changed: 2250 additions & 0 deletions
Large diffs are not rendered by default.

deploy/helm/opa-operator/templates/deployment.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ spec:
2121
{{- toYaml . | nindent 8 }}
2222
{{- end }}
2323
labels:
24-
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
25-
webhook.stackable.tech/conversion: enabled
26-
{{- end }}
2724
{{- include "operator.selectorLabels" . | nindent 8 }}
2825
spec:
2926
{{- with .Values.image.pullSecrets }}
@@ -77,16 +74,13 @@ spec:
7774
fieldRef:
7875
fieldPath: spec.nodeName
7976

80-
- name: OPA_BUNDLE_BUILDER_CLUSTERROLE
81-
value: {{ include "operator.fullname" . }}-opa-bundle-builder-clusterrole
82-
8377
{{- if .Values.kubernetesClusterDomain }}
8478
- name: KUBERNETES_CLUSTER_DOMAIN
8579
value: {{ .Values.kubernetesClusterDomain | quote }}
8680
{{- end }}
87-
8881
{{- include "telemetry.envVars" . | nindent 12 }}
89-
{{- include "maintenance.envVars" . | nindent 12 }}
82+
- name: OPA_BUNDLE_BUILDER_CLUSTERROLE
83+
value: {{ include "operator.fullname" . }}-opa-bundle-builder-clusterrole
9084
volumes:
9185
- name: config-spec
9286
configMap:

deploy/helm/opa-operator/templates/service.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
12
---
23
apiVersion: v1
34
kind: Service
45
metadata:
6+
# Note(@sbernauer): We could also call the Service something like
7+
# "product-operator-conversion-webhook". However, in the future we will have more webhooks, and
8+
# it seems like an overkill to have a dedicated Service per webhook.
59
name: {{ include "operator.fullname" . }}
610
labels:
711
{{- include "operator.labels" . | nindent 4 }}
812
spec:
913
selector:
10-
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
11-
webhook.stackable.tech/conversion: enabled
12-
{{- end }}
13-
{{- include "operator.selectorLabels" . | nindent 4 }}
14+
{{- include "operator.selectorLabels" . | nindent 6 }}
1415
ports:
1516
- name: conversion-webhook
1617
protocol: TCP

0 commit comments

Comments
 (0)