Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend k8s schema validation #2929

Merged
merged 4 commits into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelogs/CHANGELOG-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Added

- [#2701](https://github.com/epiphany-platform/epiphany/issues/2701) - Epicli prepare - generate files in separate directory
- [#2812](https://github.com/epiphany-platform/epiphany/issues/2812) - Extend K8s config validation

### Fixed

Expand Down
127 changes: 124 additions & 3 deletions schema/common/validation/configuration/kubernetes-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,87 @@ title: "K8s-master specification schema"
description: "K8s-master specification schema"
type: object
properties:
version:
type: string
cni_version:
type: string
cluster_name:
type: string
allow_pods_on_master:
type: boolean
storage:
type: object
properties:
name:
type: string
path:
type: string
enable:
type: boolean
capacity:
type: integer
data:
type: object
required:
- name
- path
- enable
- capacity
- data
advanced:
type: object
properties:
api_server_args:
type: object
properties:
profiling:
type: boolean
enable-admission-plugins:
type: string
audit-log-maxbackup:
type: integer
audit-log-maxsize:
type: integer
secure-port:
type: integer
required:
- profiling
- enable-admission-plugins
- audit-log-maxbackup
- audit-log-maxsize
- secure-port
controller_manager_args:
type: object
properties:
profiling:
type: boolean
terminated-pod-gc-threshold:
type: integer
required:
- profiling
- terminated-pod-gc-threshold
scheduler_args:
type: object
properties:
profiling:
type: boolean
required:
- profiling
networking:
type: object
properties:
dnsDomain:
type: string
serviceSubnet:
type: string
plugin:
type: string
required:
- dnsDomain
- serviceSubnet
- plugin
imageRepository:
type: string
certificates:
type: object
properties:
Expand All @@ -26,6 +104,49 @@ properties:
description: |-
Whether to renew certificates or not
type: boolean
default: false
examples:
- false
required:
- expiration_days
- renew
etcd_args:
type: object
properties:
encrypted:
type: boolean
required:
- encrypted
kubeconfig:
type: object
properties:
local:
type: object
properties:
api_server:
type: object
properties:
hostname:
type: string
port:
type: integer
required:
- hostname
- port
required:
- api_server
required:
- local
required:
- api_server_args
- controller_manager_args
- scheduler_args
- networking
- imageRepository
- certificates
- etcd_args
- kubeconfig
required:
- version
- cni_version
- cluster_name
- allow_pods_on_master
- storage
- advanced