31995eaf9d
This patch introduces ability to validate phases using kubeval. Appropriate functionality was embedded into phase/plan validate command. Change-Id: I1e1ccae2b7e4948bdc97a199c96c07a3eb7292b2 Signed-off-by: Ruslan Aliev <raliev@mirantis.com> Relates-To: #503 Closes: #2 Closes: #19
27 lines
706 B
YAML
Executable File
27 lines
706 B
YAML
Executable File
apiVersion: airshipit.org/v1alpha1
|
|
kind: Templater
|
|
metadata:
|
|
name: validator-config-patch-template
|
|
annotations:
|
|
config.kubernetes.io/function: |
|
|
container:
|
|
image: quay.io/airshipit/templater:v2
|
|
envs:
|
|
- AIRSHIPCTL_CURRENT_PHASE
|
|
- AIRSHIPCTL_CURRENT_PLAN
|
|
template: |
|
|
{{- $currentPhase := env "AIRSHIPCTL_CURRENT_PHASE" }}
|
|
{{- $currentPlan := env "AIRSHIPCTL_CURRENT_PLAN" }}
|
|
apiVersion: builtin
|
|
kind: PatchStrategicMergeTransformer
|
|
metadata:
|
|
name: smp
|
|
patches: |-
|
|
---
|
|
apiVersion: airshipit.org/v1alpha1
|
|
kind: KubevalOptions
|
|
metadata:
|
|
name: kubeval-options
|
|
phaseName: {{ $currentPhase }}
|
|
planName: {{ $currentPlan }}
|