This PS replaces cluster-api implementation with our own since
it allows to configure timeout.
Change-Id: I5cbba24dd7c6a279fcd2325e904ac7d18348eabf
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #548
Closes: #548
* validation config is now part of airshipctl api
* additional CRD locations can be only kustomize entrypoints
* changed mechanism to call document-validation executor to allow
to pass validation config from phase or plan
* kubeval version pinned to the latest 0.16.1
* default k8s version to validate against uplifted to 1.18.6
* default URL with k8s schemas changed to more updated and reliable
Change-Id: Ifb24be224d5f0860d323a671b94e28a86debc65b
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Closes: #563
This patchset introduces new field to Phase.Config API object
SiteWideKubeconfig - if set to true, the phase will have access
to all kubeconfigs for each cluster defined in ClusterMap.
By default only kubeconfig of the cluster specified in
Phase.Metadata.ClusterName will be available to the phase executor.
This approach will speed up the deployment process because arishipctl
will not have to look for multiple kubeconfigs when running each phase
Closes: #547
Change-Id: Ic92027ba88d3ce8cb769c254968530037540b8fd
This patch will allow us to bypass unnecassary logic in generic
container executor (e.g. mounting kubeconfig).
Change-Id: I526940e8f01c66f7609355a4ef750b38f1d9a323
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
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
Phase helper provides plenty of useful methods for
a phase client. But these methods are not used by
phase executor initializers except for getting some
configuration values. So, it is better to provide
initializers with necessary values instead of passing
them the phase helper.
Change-Id: I8c596455e30444570a86efad73d792af0ca83a33
Relates-To: #464
Relates-To: #465
This patch implements CLI command to invoke plan validation.
Appropriate functionality was already added to pkg previously.
Change-Id: I038b49c8de0af65f38b62950b27b31d95a6301a9
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #19
Relates-To: #497
Closes: #497
Since document.NewBundleByPath() is pretty resource and time
consuming call (because it invokes kustomize under the hood),
we should avoid unnecessary calls of this function. There are
lots of the same constructor calls of new bundle from phase
bundle root path, mostly in helper, which slows airshipctl
and makes no sense. This patch fixes this problem by storing
phase root bundle variable in helper, which creates only once
during airshipctl execution.
Change-Id: I6b59d440f7ab7a68dc613091dafcc9e82df10eb7
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Closes: #488
There are some debries left after removing --kubeconfig flag
from support, this patch cleans them up.
Change-Id: Iabdd6bcbc59d169bf162c9cddb3cb264fb88a3f7
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
* phase related errors were moved to separate package to prevent
cycling import error;
* error duplicates were removed;
* non-related to package errors were moved to appropriate ones.
Change-Id: If6cfb08c48d356c1517a13157a5fe740dc1635a4
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #485
Now if clusterName is specified for kubebuilder, Build() method
will return kubeconfig containing only context for that cluster.
If no clusterName is specified kubeconfig will have contexts of
all clusters that builder can build. This behaviour is similar
to `kubeconfig get` command.
Relates-To: #460
Change-Id: Ib3bebf61bc60430d347ded41b2e31249b11126eb
Change ClusterMap API object to support multiple kubeconfig sources
for a cluster. If one kubeconfig source fails, kubeconfig builder
will not fail and move on to the next one. This behaviour will allow
to support cases when ephemeral cluster is not accesible anymore or
when target cluster is not yet accessible.
For more information please read issue #460 in airshipctl github
Relates-To: #460
Related-To: #460
Change-Id: I7cd32f78cd7c4ad8814eac357424c24216f40d76
Isogen executor is not needed any more since there is
iso build phase plan that runs two phases using generic
containers.
Relates-To: #440
Change-Id: I3600e82fa1d8a92cdf103d93cd4536bf4a713cca
This will make sure that phases have access to kubeconfgs generated
by cluster-api for the managed clusters.
Change-Id: Iabecced78192969d7a2ee5a48e75fc3adb0af092
Plan validation:
1. Each phase must be defined within phase document bundle.
2. Each phase does not return error for Validate method
Phase validation:
1. Document bundle associated with the phase can be rendered without an
error.
2. Associated executor must not return an error.
Relates-to: #330
Change-Id: I08c5e8e42570f2cafdced5a02481b033414ffae0
All the duplicated methods were removed. Unit tests reorganized.
Test coverage increased.
Change-Id: I0f7bd3eea63c101195ea50c0369e62945d73f297
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Closes: #432
This patchset includes the go code for the Executor for the Bootstrap
container/Ephemeral cluster and respective unit test code.
This executor allows to deploy a K8S cluster on a public/private cloud
provider through a dedicated Bootstrap container.
This patchset does not include the manifests for the executor to avoid
too big patchset. It will be included in a different patchset.
Change-Id: I3f9d2ba1bb65b344522e105fd26310af24e3a1b1
This parameter allows to get full path to current site.
Also change phaseRoot to phaseBundleRoot and
change the corresponding methods.
Change-Id: Ia4b1b55ceaa8c544ed429ec314bc8772a2fee6de
Relates-To: #379
In current setup, we rely on executor to perform render operation,
however there are many usecases, when we want to have a simple
`kustomize build` performed against document entrypoint in phase.
Now this will be a default behaviour and if a user would like
executor to perform rendering to actually understand what it's
doing, he will be able to specify --executor boolean flag.
Relates-To: #403
Change-Id: I181830f9814ff48a19ba0a1284e89900187bc7d8
Having an executor within container package creates
potential import cycling. This patch moves it to a separate
package which can be used to conveniently store all the executors
at one place.
Change-Id: Ibd07c2ba46d1971604bdbd9e5e360759bb68a659
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #432
Having an executor within applier package creates
potential import cycling. This patch moves it to a separate
package which can be used to conveniently store all the executors
at one place.
Change-Id: I68d909489b691e4fb7129446ef9a3fb085f8683c
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #432
Having an executor within isogen package creates
potential import cycling. This patch moves it to a separate
package which can be used to conveniently store all the executors
at one place.
Change-Id: I2154c0af6c28f47abb2448863332766260106759
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #432
Having an executor within clusterctl.client package creates
potential import cycling. This patch moves it to a separate
package which can be used to conveniently store all the executors
at one place.
Change-Id: Ib0a6072a393e68885d9ef911aa2894a0de055668
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #374
* The phase.docEntryPointPrefix field in the metadata.yaml
allows you to define a common part of the documentEntryPoint
for all phases in the phase bundle.
For example, let metadata.yaml be
---
phase:
path: manifests/phases
docEntryPointPrefix: manifests/site/test-site
and a phase be
---
apiVersion: airshipit.org/v1alpha1
kind: Phase
metadata:
name: initinfra-ephemeral
clusterName: ephemeral-cluster
config:
executorRef:
apiVersion: airshipit.org/v1alpha1
kind: KubernetesApply
name: kubernetes-apply
documentEntryPoint: ephemeral/initinfra
Then the documentEntryPoint for executor will be prepended with
docEntryPointPrefix and the path to the executor bundle will be
manifests/site/test-site/ephemeral/initinfra
Change-Id: I29ec14378790d95b66c3ff1fe6120bb200f91a50
Relates-To: #356