# 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. suite: test deployment templates: - deployment.yaml tests: - it: should create a deployment asserts: - isKind: of: Deployment - equal: path: spec.template.spec.containers[0].image value: materialize/orchestratord:v0.152.0 - equal: path: spec.template.spec.containers[0].imagePullPolicy value: IfNotPresent - equal: path: spec.template.spec.serviceAccountName value: orchestratord - it: should set ephemeral volume class when storage class is configured set: storage.storageClass.name: "my-storage-class" asserts: - contains: path: spec.template.spec.containers[0].args content: "--ephemeral-volume-class=my-storage-class" - it: should not set ephemeral volume class when storage class is not configured set: storage.storageClass.name: "" asserts: - notContains: path: spec.template.spec.containers[0].args content: "--ephemeral-volume-class" - it: should set correct base arguments asserts: - contains: path: spec.template.spec.containers[0].args content: "--startup-log-filter=INFO,mz_orchestratord=TRACE" - it: should set resources correctly asserts: - equal: path: spec.template.spec.containers[0].resources.requests.cpu value: 100m - equal: path: spec.template.spec.containers[0].resources.requests.memory value: 512Mi - equal: path: spec.template.spec.containers[0].resources.limits.memory value: 512Mi - it: should set disk limit to 0 when no storage class is configured set: storage.storageClass.name: "" asserts: - matchRegex: path: spec.template.spec.containers[0].args[13] # Index of the environmentd-cluster-replica-sizes argument pattern: disk_limit":"0" - matchRegex: path: spec.template.spec.containers[0].args[13] pattern: is_cc":true - it: should have a cluster with disk limit to 1552MiB when storage class is configured set: storage.storageClass.name: "my-storage-class" asserts: - matchRegex: path: spec.template.spec.containers[0].args[13] pattern: disk_limit":"1552MiB" - matchRegex: path: spec.template.spec.containers[0].args[13] pattern: is_cc":true - it: should configure for AWS provider correctly set: operator.cloudProvider.type: "aws" operator.cloudProvider.region: "us-east-1" operator.cloudProvider.providers.aws: enabled: true accountID: "123456789012" iam: roles: environment: "arn:aws:iam::123456789012:role/env-role" connection: "arn:aws:iam::123456789012:role/conn-role" asserts: - contains: path: spec.template.spec.containers[0].args content: "--cloud-provider=aws" - contains: path: spec.template.spec.containers[0].args content: "--region=us-east-1" - contains: path: spec.template.spec.containers[0].args content: "--aws-account-id=123456789012" - contains: path: spec.template.spec.containers[0].args content: "--environmentd-iam-role-arn=arn:aws:iam::123456789012:role/env-role" - contains: path: spec.template.spec.containers[0].args content: "--environmentd-connection-role-arn=arn:aws:iam::123456789012:role/conn-role" - it: should configure for generic provider correctly set: operator.cloudProvider.type: "generic" operator.cloudProvider.region: "local" asserts: - contains: path: spec.template.spec.containers[0].args content: "--cloud-provider=generic" - contains: path: spec.template.spec.containers[0].args content: "--region=local" - notContains: path: spec.template.spec.containers[0].args content: "--aws-account-id" # Feature Flag Tests - it: should enable balancer creation when configured set: balancerd.enabled: true asserts: - contains: path: spec.template.spec.containers[0].args content: "--create-balancers" - it: should not enable balancer creation when disabled set: balancerd.enabled: false asserts: - notContains: path: spec.template.spec.containers[0].args content: "--create-balancers" - it: should enable console creation when configured set: console.enabled: true asserts: - contains: path: spec.template.spec.containers[0].args content: "--create-console" - it: should configure console image tag map override correctly set: console.imageTagMapOverride: "v0.125.0": "25.1.0" "v0.126.0": "25.2.0" asserts: - contains: path: spec.template.spec.containers[0].args content: "--console-image-tag-map=v0.125.0=25.1.0" - contains: path: spec.template.spec.containers[0].args content: "--console-image-tag-map=v0.126.0=25.2.0" - it: should configure secrets controller kubernetes by default asserts: - contains: path: spec.template.spec.containers[0].args content: "--secrets-controller=kubernetes" - it: should configure secrets controller if overridden set: operator.secretsController: aws-secrets-manager asserts: - notContains: path: spec.template.spec.containers[0].args content: "--secrets-controller=kubernetes" - contains: path: spec.template.spec.containers[0].args content: "--secrets-controller=aws-secrets-manager" - it: should not pass the scheduler when not configured asserts: - notContains: path: spec.template.spec.containers[0].args content: "--scheduler-name" - it: should pass the scheduler when configured set: schedulerName: my-scheduler asserts: - contains: path: spec.template.spec.containers[0].args content: "--scheduler-name=my-scheduler"