Skip to content
Draft
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
43 changes: 43 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions misc/helm-charts/operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ The following table lists the configurable parameters of the Materialize operato
| `operator.args.enableInternalStatementLogging` | | ``true`` |
| `operator.args.enableLicenseKeyChecks` | | ``false`` |
| `operator.args.startupLogFilter` | Log filtering settings for startup logs | ``"INFO,mz_orchestratord=TRACE"`` |
| `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". TODO create test that uses this one | ``nil`` |
| `operator.certificate.source` | Where to obtain the certificate for orchestratord. Valid values are 'cert-manager' and 'secret'. | ``"cert-manager"`` |
| `operator.cloudProvider.providers.aws.accountID` | When using AWS, accountID is required | ``""`` |
| `operator.cloudProvider.providers.aws.enabled` | | ``false`` |
| `operator.cloudProvider.providers.aws.iam.roles.connection` | ARN for CREATE CONNECTION feature | ``""`` |
Expand Down
41 changes: 41 additions & 0 deletions misc/helm-charts/operator/templates/certificate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0.

{{- if eq .Values.operator.certificate.source "cert-manager" -}}
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: {{ include "materialize-operator.fullname" . }}-self-signed
namespace: {{ .Release.Namespace }}
labels:
{{- include "materialize-operator.labels" . | nindent 4 }}
spec:
selfSigned: {}

---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ include "materialize-operator.fullname" . }}-self-signed
namespace: {{ .Release.Namespace }}
labels:
{{- include "materialize-operator.labels" . | nindent 4 }}
spec:
dnsNames:
- {{ include "materialize-operator.fullname" . }}.{{ .Release.Namespace }}.svc
secretName: {{ include "materialize-operator.fullname" . }}-cert
privateKey:
algorithm: Ed25519
rotationPolicy: Always
issuerRef:
name: {{ include "materialize-operator.fullname" . }}-self-signed
kind: Issuer
group: cert-manager.io
{{- end -}}
30 changes: 30 additions & 0 deletions misc/helm-charts/operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,15 @@ spec:
- >
--additional-crd-columns={{ toJson .Values.operator.additionalMaterializeCRDColumns }}
{{- end }}
- "--webhook-service-name"
- {{ include "materialize-operator.fullname" . }}
- "--webhook-service-namespace"
- {{ .Release.Namespace }}
ports:
- containerPort: 3100
name: metrics
- containerPort: 8001
name: webhook
resources:
{{- toYaml .Values.operator.resources | nindent 10 }}
securityContext:
Expand All @@ -254,3 +260,27 @@ spec:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
livenessProbe:
httpGet:
path: /healthz
port: webhook
scheme: HTTPS
failureThreshold: 3
periodSeconds: 10
readinessProbe:
httpGet:
path: /healthz
port: webhook
scheme: HTTPS
failureThreshold: 1
periodSeconds: 10
volumeMounts:
- mountPath: /etc/tls
name: certificate
readOnly: true
volumes:
- name: certificate
secret:
defaultMode: 256
optional: false
secretName: {{ if eq .Values.operator.certificate.source "cert-manager" }}{{ include "materialize-operator.fullname" . }}-cert{{ else }}{{ .Values.operator.certificate.secretName }}{{ end }}
26 changes: 26 additions & 0 deletions misc/helm-charts/operator/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0.

---
apiVersion: v1
kind: Service
metadata:
name: {{ include "materialize-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "materialize-operator.labels" . | nindent 4 }}
spec:
selector:
{{- include "materialize-operator.selectorLabels" . | nindent 4 }}
ports:
- name: webhook
protocol: TCP
# TODO use a variable here
port: 8001
targetPort: 8001
9 changes: 9 additions & 0 deletions misc/helm-charts/operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ operator:
# priority: 2
# type: "string"

certificate:
# TODO flesh out this optionality
# -- (string) Where to obtain the certificate for orchestratord. Valid values are 'cert-manager' and 'secret'.
source: cert-manager
# -- (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".
# TODO create test that uses this one
secretName: null


# Cloud provider configuration
cloudProvider:
# -- Specifies cloud provider. Valid values are 'aws', 'gcp', 'azure' , 'generic', or 'local'
Expand Down
1 change: 1 addition & 0 deletions src/cloud-resources/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ schemars = { version = "1.1.0", features = ["uuid1"] }
semver = "1.0.27"
serde = "1.0.219"
serde_json = "1.0.149"
sha2 = "0.10.9"
tracing = "0.1.44"
uuid = { version = "1.19", features = ["serde", "v4"] }
workspace-hack = { version = "0.0.0", path = "../workspace-hack", optional = true }
Expand Down
Loading