Skip to content

Commit 7714f2e

Browse files
Materialize CRD changes to use hash of the spec
1 parent bd9d3e1 commit 7714f2e

21 files changed

Lines changed: 1733 additions & 121 deletions

File tree

Cargo.lock

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

ci/nightly/pipeline.template.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2596,3 +2596,16 @@ steps:
25962596
ci-builder: stable
25972597
agents:
25982598
queue: hetzner-aarch64-16cpu-32gb
2599+
2600+
- id: orchestratord-v1alpha2-opt-in
2601+
label: "Orchestratord v1alpha2 opt-in tests"
2602+
artifact_paths: ["mz_debug_*.zip"]
2603+
depends_on: devel-docker-tags
2604+
timeout_in_minutes: 120
2605+
plugins:
2606+
- ./ci/plugins/mzcompose:
2607+
composition: orchestratord
2608+
run: v1alpha2-opt-in
2609+
ci-builder: stable
2610+
agents:
2611+
queue: hetzner-aarch64-16cpu-32gb

doc/user/content/self-managed-deployments/installation/install-on-local-kind.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,19 @@ Starting in v26.0, Self-Managed Materialize requires a license key.
107107
kubectl get nodes --show-labels
108108
```
109109

110+
1. Install cert-manager
111+
112+
Cert-manager is used for generating TLS certificates needed by the materialize operator
113+
for CRD conversion webhooks.
114+
115+
```shell
116+
helm install cert-manager oci://quay.io/jetstack/charts/cert-manager \
117+
--version v1.19.2 \
118+
--namespace cert-manager \
119+
--create-namespace \
120+
--set crds.enabled=true
121+
```
122+
110123
1. To help you get started for local evaluation/testing, Materialize provides
111124
some sample configuration files. Download the sample configuration files from
112125
the Materialize repo:

misc/helm-charts/operator/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ The following table lists the configurable parameters of the Materialize operato
144144
| `operator.args.enableInternalStatementLogging` | | ``true`` |
145145
| `operator.args.enableLicenseKeyChecks` | | ``false`` |
146146
| `operator.args.startupLogFilter` | Log filtering settings for startup logs | ``"INFO,mz_orchestratord=TRACE"`` |
147+
| `operator.certificate.secretName` | Name of a secret in the operator's namespace containing ca.crt, tls.crt, and tls.key entries. Only used if `source` is "secret". | ``nil`` |
148+
| `operator.certificate.source` | Where to obtain the certificate for orchestratord. Valid values are 'cert-manager' and 'secret'. | ``"cert-manager"`` |
147149
| `operator.cloudProvider.providers.aws.accountID` | When using AWS, accountID is required | ``""`` |
148150
| `operator.cloudProvider.providers.aws.enabled` | | ``false`` |
149151
| `operator.cloudProvider.providers.aws.iam.roles.connection` | ARN for CREATE CONNECTION feature | ``""`` |
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright Materialize, Inc. and contributors. All rights reserved.
2+
#
3+
# Use of this software is governed by the Business Source License
4+
# included in the LICENSE file at the root of this repository.
5+
#
6+
# As of the Change Date specified in that file, in accordance with
7+
# the Business Source License, use of this software will be governed
8+
# by the Apache License, Version 2.0.
9+
10+
{{- if eq .Values.operator.certificate.source "cert-manager" -}}
11+
---
12+
apiVersion: cert-manager.io/v1
13+
kind: Issuer
14+
metadata:
15+
name: {{ include "materialize-operator.fullname" . }}-self-signed
16+
namespace: {{ .Release.Namespace }}
17+
labels:
18+
{{- include "materialize-operator.labels" . | nindent 4 }}
19+
spec:
20+
selfSigned: {}
21+
22+
---
23+
apiVersion: cert-manager.io/v1
24+
kind: Certificate
25+
metadata:
26+
name: {{ include "materialize-operator.fullname" . }}-self-signed
27+
namespace: {{ .Release.Namespace }}
28+
labels:
29+
{{- include "materialize-operator.labels" . | nindent 4 }}
30+
spec:
31+
dnsNames:
32+
- {{ include "materialize-operator.fullname" . }}.{{ .Release.Namespace }}.svc
33+
secretName: {{ include "materialize-operator.fullname" . }}-cert
34+
privateKey:
35+
algorithm: Ed25519
36+
rotationPolicy: Always
37+
issuerRef:
38+
name: {{ include "materialize-operator.fullname" . }}-self-signed
39+
kind: Issuer
40+
group: cert-manager.io
41+
{{- end -}}

misc/helm-charts/operator/templates/clusterrole.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ rules:
7676
- apiGroups: ["apiextensions.k8s.io"]
7777
resources:
7878
- customresourcedefinitions
79+
- customresourcedefinitions/status
7980
verbs:
8081
- create
8182
- update

misc/helm-charts/operator/templates/deployment.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,15 @@ spec:
240240
- >
241241
--additional-crd-columns={{ toJson .Values.operator.additionalMaterializeCRDColumns }}
242242
{{- end }}
243+
- "--webhook-service-name"
244+
- {{ include "materialize-operator.fullname" . }}
245+
- "--webhook-service-namespace"
246+
- {{ .Release.Namespace }}
243247
ports:
244248
- containerPort: 3100
245249
name: metrics
250+
- containerPort: 8001
251+
name: webhook
246252
resources:
247253
{{- toYaml .Values.operator.resources | nindent 10 }}
248254
securityContext:
@@ -254,3 +260,27 @@ spec:
254260
runAsNonRoot: true
255261
seccompProfile:
256262
type: RuntimeDefault
263+
livenessProbe:
264+
httpGet:
265+
path: /healthz
266+
port: webhook
267+
scheme: HTTPS
268+
failureThreshold: 3
269+
periodSeconds: 10
270+
readinessProbe:
271+
httpGet:
272+
path: /healthz
273+
port: webhook
274+
scheme: HTTPS
275+
failureThreshold: 1
276+
periodSeconds: 10
277+
volumeMounts:
278+
- mountPath: /etc/tls
279+
name: certificate
280+
readOnly: true
281+
volumes:
282+
- name: certificate
283+
secret:
284+
defaultMode: 256
285+
optional: false
286+
secretName: {{ if eq .Values.operator.certificate.source "cert-manager" }}{{ include "materialize-operator.fullname" . }}-cert{{ else }}{{ .Values.operator.certificate.secretName }}{{ end }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright Materialize, Inc. and contributors. All rights reserved.
2+
#
3+
# Use of this software is governed by the Business Source License
4+
# included in the LICENSE file at the root of this repository.
5+
#
6+
# As of the Change Date specified in that file, in accordance with
7+
# the Business Source License, use of this software will be governed
8+
# by the Apache License, Version 2.0.
9+
10+
---
11+
apiVersion: v1
12+
kind: Service
13+
metadata:
14+
name: {{ include "materialize-operator.fullname" . }}
15+
namespace: {{ .Release.Namespace }}
16+
labels:
17+
{{- include "materialize-operator.labels" . | nindent 4 }}
18+
spec:
19+
selector:
20+
{{- include "materialize-operator.selectorLabels" . | nindent 4 }}
21+
ports:
22+
- name: webhook
23+
protocol: TCP
24+
port: 8001
25+
targetPort: 8001

misc/helm-charts/operator/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ operator:
3434
# priority: 2
3535
# type: "string"
3636

37+
certificate:
38+
# -- (string) Where to obtain the certificate for orchestratord. Valid values are 'cert-manager' and 'secret'.
39+
source: cert-manager
40+
# -- (string) Name of a secret in the operator's namespace containing ca.crt, tls.crt, and tls.key entries. Only used if `source` is "secret".
41+
secretName: null
42+
43+
3744
# Cloud provider configuration
3845
cloudProvider:
3946
# -- Specifies cloud provider. Valid values are 'aws', 'gcp', 'azure' , 'generic', or 'local'

src/cloud-resources/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ schemars = { version = "1.2.1", features = ["uuid1"] }
2727
semver = "1.0.27"
2828
serde = "1.0.219"
2929
serde_json = "1.0.149"
30+
sha2 = "0.10.9"
3031
tracing = "0.1.44"
31-
uuid = { version = "1.19", features = ["serde", "v4"] }
32+
uuid = { version = "1.19", features = ["serde", "v4", "v5"] }
3233
workspace-hack = { version = "0.0.0", path = "../workspace-hack", optional = true }
3334

3435
async-trait = { version = "0.1.89", optional = true }

0 commit comments

Comments
 (0)