armada/armada/schemas/armada-chart-schema.yaml

176 lines
4.4 KiB
YAML

# Copyright 2017 AT&T Intellectual Property. All other rights reserved.
#
# 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.
# JSON schema for validating Armada charts.
---
schema: deckhand/DataSchema/v1
metadata:
name: armada/Chart/v1
schema: metadata/Control/v1
data:
$schema: http://json-schema.org/schema#
definitions:
labels:
type: object
additionalProperties:
type: string
hook_action:
type: array
items:
properties:
name:
type: string
type:
type: string
labels:
$ref: '#/definitions/labels'
required:
- type
additionalProperties: false
type: object
properties:
release:
type: string
chart_name:
type: string
namespace:
type: string
values:
type: object
dependencies:
type: array
items:
type: string
protected:
type: object
properties:
continue_processing:
type: boolean
additionalProperties: false
test:
anyOf:
# TODO: Remove boolean support after deprecation period.
- type: boolean
- type: object
properties:
enabled:
type: boolean
options:
type: object
properties:
cleanup:
type: boolean
additionalProperties: false
additionalProperties: false
# TODO(MarshM): Deprecate this `timeout` in favor of `wait.timeout`
timeout:
type: integer
wait:
type: object
properties:
timeout:
type: integer
resources:
type: array
items:
properties:
type:
type: string
labels:
$ref: '#/definitions/labels'
min_ready:
anyOf:
- type: integer
- type: string
required:
- type
additionalProperties: false
labels:
$ref: "#/definitions/labels"
# Config for helm's native `--wait` param.
native:
type: object
properties:
# TODO: Add separate timeout for native wait?
enabled:
type: boolean
additionalProperties: false
additionalProperties: false
source:
type: object
properties:
type:
type: string
location:
type: string
subpath:
type: string
reference:
type: string
proxy_server:
type: string
auth_method:
type: string
required:
- location
- subpath
- type
install:
# NOTE(sh8121att) Not clear that this key is actually used
# in the code. Will leave it here for backward compatabilities
# until an additional audit is done.
type: object
upgrade:
type: object
properties:
no_hooks:
type: boolean
pre:
type: object
additionalProperties: false
properties:
delete:
$ref: '#/definitions/hook_action'
update:
$ref: '#/definitions/hook_action'
create:
$ref: '#/definitions/hook_action'
# TODO(drewwalters96): Armada ignores post-update actions. Remove them
# in future schemas.
post:
type: object
additionalProperties: false
properties:
create:
$ref: '#/definitions/hook_action'
options:
type: object
properties:
force:
type: boolean
recreate_pods:
type: boolean
additionalProperties: false
required:
- no_hooks
additionalProperties: false
required:
- dependencies
- namespace
- chart_name
- release
- source
additionalProperties: false
...