mirror of
https://github.com/hanzo-ml/spark-operator.git
synced 2026-10-30 20:39:07 +00:00
* Use controller-runtime to reconstruct spark operator Signed-off-by: Yi Chen <[email protected]> * Update helm charts Signed-off-by: Yi Chen <[email protected]> * Update examples Signed-off-by: Yi Chen <[email protected]> --------- Signed-off-by: Yi Chen <[email protected]>
68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
#
|
|
# Copyright 2024 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
|
|
#
|
|
# https://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 controller service account
|
|
|
|
templates:
|
|
- controller/serviceaccount.yaml
|
|
|
|
release:
|
|
name: spark-operator
|
|
namespace: spark-operator
|
|
|
|
tests:
|
|
- it: Should not create controller service account if `controller.serviceAccount.create` is false
|
|
set:
|
|
controller:
|
|
serviceAccount:
|
|
create: false
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|
|
|
|
- it: Should create controller service account by default
|
|
asserts:
|
|
- containsDocument:
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
name: spark-operator-controller
|
|
|
|
- it: Should use the specified service account name if `controller.serviceAccount.name` is set
|
|
set:
|
|
controller:
|
|
serviceAccount:
|
|
name: custom-service-account
|
|
asserts:
|
|
- containsDocument:
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
name: custom-service-account
|
|
|
|
- it: Should add extra annotations if `controller.serviceAccount.annotations` is set
|
|
set:
|
|
controller:
|
|
serviceAccount:
|
|
annotations:
|
|
key1: value1
|
|
key2: value2
|
|
asserts:
|
|
- equal:
|
|
path: metadata.annotations.key1
|
|
value: value1
|
|
- equal:
|
|
path: metadata.annotations.key2
|
|
value: value2
|