blob: 5b94ce642b91393df236ce68472d19d878e57edf [file]
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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: workload-and-service-annotations
templates:
- templates/sts-coordinator.yaml
- templates/sts-tablet.yaml
- templates/svc-coordinator.yaml
- templates/svc-tablet.yaml
tests:
- it: renders no annotations by default
asserts:
- notExists:
path: metadata.annotations
- it: renders statefulset metadata annotations
set:
coordinator.annotations:
secret.reloader.stakater.com/reload: fluss-paimon-creds
tablet.annotations:
secret.reloader.stakater.com/reload: fluss-paimon-creds
asserts:
- equal:
path: metadata.annotations["secret.reloader.stakater.com/reload"]
value: fluss-paimon-creds
template: templates/sts-coordinator.yaml
- equal:
path: metadata.annotations["secret.reloader.stakater.com/reload"]
value: fluss-paimon-creds
template: templates/sts-tablet.yaml
- it: renders service annotations
set:
coordinator.service.annotations:
example.com/key: coordinator-value
tablet.service.annotations:
example.com/key: tablet-value
asserts:
- equal:
path: metadata.annotations["example.com/key"]
value: coordinator-value
template: templates/svc-coordinator.yaml
- equal:
path: metadata.annotations["example.com/key"]
value: tablet-value
template: templates/svc-tablet.yaml