Currently zero timeout won't be applied if specified via CLI
options of commands plan run and plan run. This patch fixes it.
Change-Id: Icad06ae8c71d78dc81821e2c5b0adb486d547fda
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #566
Closes: #566
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
AirshipConfig and BundleName fields are not used within Executors,
so they should be removed.
Change-Id: I23c54b854938ae554e888102a41c7ec215b85c27
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
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
This patch implements ability to filter phase by given
cluster name.
Change-Id: I4eb95f9f75c57eff4ae8eb41c608c6f6d7fa009c
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
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 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
* 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
We perform almost the same activities prior calling createBootstrapIso
function like we do that in phase executor, also image build command
now is techically outdated since it doesn't work because it fails with
"phase document was not found" error. This patch removes unnecessary
functions like GenerateBootstrapIso and runs image build command in
a phase way. Test coverage increases slightly (by 0.2%) by removing
partially duplicating code which was not tested properly. Minor bug
fixes included.
Change-Id: I545004cea721164838b296ae647a7651cde248ff
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
This commit adds cluster map api object, cluster map
interface and it's implementation built on top of cluster map api
object.
Important note:
ClusterMap interface needs a method to identify namespace of the
cluster, it can't be a part of api object, because real source for
cluster namespace is cluster object from cluster-api upstream lib.
This will need further design discussion on how we will find
cluster-api kind: Cluster object in our manifests. For now, there
is dummy "default" namespace being used
Change-Id: I8175f54abbe77331f0c87c0bde50857ee5c0eb1d
All the phase commands was refactored for usage with new config
factory. Config object now is being initialized in pkg module on demand,
which provides more flexibility and cleaner code.
Change-Id: I742c39788098c3185ce89936ea81cd461bf97af3
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
Kubeconfig builder will be a single source of kubeconfig, allowing
to make a decision how to build kubeconfig based on different
parameters, such as path to kubeconfig, dynamic kubeconfig
options, or kubeconfig based on document bundle.
Change-Id: Ia63e11a6f0b327e283d3e7fce169a35d54684dfb
Now Run method will accept channels that they will write
events to, this will allow us to pass channels we want to them,
instead of execting them to return us a channel.
Wait method is removed from interface for now, as it needs more
design.
Change-Id: Ibd47dfe49172f537b79bcc8f83f7c76aece8e862
This will allow to use various sources for kubeconfig and provide
utility to write, save, and clean kubeconfig files, as well as
use kubeconfig interface for phase executors.
Relates-To: #264
Change-Id: Ia5b5af00700a0adf55124e1dd335d570515ed804
Change executors interface to return event channels and allow to
to set event processors. In further development this will allow better
visibility in UI or in command line, also opens the room for concurency.
Also add kubeconfig provider interface that will return kubeconfig.File
object to provide uniform way of accessing kubeconfig
Change-Id: I47bf9409a9b4286905cd9fc4ce172ee33e16dfa6
With this commit executors will not rely on hardcoded path to build
bundle with phase information
Change-Id: I6b8826929cb5a4b95a5c4d30f23fad3a3af52555
Relates-To: #259
Change introduces phase executor interface as well as method to call it.
Each registered executor must implement this interface.
Relates-To: #259
Change-Id: I44665e5318ae59b4549cc77d10526a71bd40b40a