mirror of
https://github.com/hanzo-ml/trainer.git
synced 2026-09-24 00:31:34 +00:00
* ci(boilerplate): enforce copyright headers on YAML files Signed-off-by: tariq-hasan <[email protected]> * ci(boilerplate): enforce year-less header for new files Signed-off-by: tariq-hasan <[email protected]> --------- Signed-off-by: tariq-hasan <[email protected]>
137 lines
4.7 KiB
YAML
137 lines
4.7 KiB
YAML
# Copyright The Kubeflow Authors.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
suite: test manager configmap
|
|
templates:
|
|
- manager/configmap.yaml
|
|
release:
|
|
name: kubeflow-trainer
|
|
namespace: kubeflow-system
|
|
tests:
|
|
- it: should create configmap with default values
|
|
asserts:
|
|
- isKind:
|
|
of: ConfigMap
|
|
- equal:
|
|
path: metadata.name
|
|
value: kubeflow-trainer-config
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "apiVersion: config.trainer.kubeflow.org/v1alpha1"
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "kind: Configuration"
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "healthProbeBindAddress: :8081"
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "bindAddress: :8443"
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "port: 9443"
|
|
|
|
- it: should use custom webhook service and secret names from config
|
|
set:
|
|
manager:
|
|
config:
|
|
certManagement:
|
|
webhookServiceName: "custom-webhook-service"
|
|
webhookSecretName: "custom-webhook-secret"
|
|
asserts:
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "webhookServiceName: custom-webhook-service"
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "webhookSecretName: custom-webhook-secret"
|
|
|
|
- it: should auto-generate webhook service and secret names when not provided
|
|
asserts:
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "webhookServiceName: kubeflow-trainer-controller-manager"
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "webhookSecretName: kubeflow-trainer-webhook-cert"
|
|
|
|
- it: should enable leader election by default
|
|
asserts:
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "leaderElect: true"
|
|
|
|
- it: should allow disabling leader election
|
|
set:
|
|
manager.config.leaderElection.leaderElect: false
|
|
asserts:
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "leaderElect: false"
|
|
|
|
- it: should use custom controller concurrency values
|
|
set:
|
|
manager.config.controller.groupKindConcurrency.trainJob: 10
|
|
manager.config.controller.groupKindConcurrency.trainingRuntime: 5
|
|
manager.config.controller.groupKindConcurrency.clusterTrainingRuntime: 3
|
|
asserts:
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "TrainJob.trainer.kubeflow.org: 10"
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "TrainingRuntime.trainer.kubeflow.org: 5"
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "ClusterTrainingRuntime.trainer.kubeflow.org: 3"
|
|
|
|
- it: should render default clientConnection qps and burst
|
|
asserts:
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "clientConnection:"
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "qps: 50"
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "burst: 100"
|
|
|
|
- it: should render custom clientConnection qps and burst
|
|
set:
|
|
manager.config.clientConnection.qps: 200
|
|
manager.config.clientConnection.burst: 400
|
|
asserts:
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "qps: 200"
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "burst: 400"
|
|
|
|
- it: should set feature gates
|
|
set:
|
|
manager.config.featureGates.FeatOn: true
|
|
manager.config.featureGates.FeatOff: false
|
|
asserts:
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "featureGates:"
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "FeatOff: false"
|
|
- matchRegex:
|
|
path: data["controller_manager_config.yaml"]
|
|
pattern: "FeatOn: true"
|