This change fixes a bug where the default values that are
populated during an `airshipctl config init` were getting
mixed in with user specified values at runtime. For example,
a user with two contexts defined in their airship config
file would actually see a third phantom context with default
values in the output of `airshipctl config get-context`.
Also fixes a number of the config cmd and pkg unit tests that
were affected by this bug.
Change-Id: Iac591d4c2a616090028eb730576478edefb82544
Closes: #447
Now if we run `airshipctl cluster get-kubeconfig` without args
it will return kubeconfig for the entire site, which will have
contexts for every cluster defined in cluster map.
Relates-To: #460
Closes: #460
Change-Id: Icf1f09724a5c60ac520b1dbcbda69c3280ac4c7e
It is not used anywhere anymore as commands themselves were
deprecated and removed in favor of clusterctl move and init
executors.
Change-Id: I526f75d95b70754034f0846edfc9d3e468648ced
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
This reverts commit 694067492cfedd5e7b369b396bfce9923c0ca3a1.
Reason for revert: Encryption configs inside airship config are
no longer required. Encrypt feature was implemented different way.
Change-Id: I1c8feec75000402e314e815e4832ce740f0e1254
Modified the test framework so that error messages are actualy checked
for an expected value (instead of previously only checking if there was
an error returned)
Closes-Bug: #451
Change-Id: I9c4b172a705a7648467afe41346c389c503e764b
We use phases for building the ephemeral ISO image, so
a user can use `phase run` command instead. It is better
to remove `image build` subcommand to avoid support of
an unnecessary piece of code.
Change-Id: Ife9b5fdebc3cdfd5dac3ecccc8fef55811741ce8
Closes: #473
This PS will allow us to retrieve kubeconfig from different
kind of sources.
Change-Id: I31381cf466c58373efda40d06587e34bef411c68
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
With this change we will be sure that no commands against bmh
hosts will be applied without selector flags specified, now if you
want to target all hosts in inventory you must specify --all flag
Relates-To: #364
Related-To: #364
Closes: #364
Change-Id: I0d615ea226528162e07acc96fa61b26e031145aa
Instead of these commands users should run apporopriate phase
linked to clusterctl executor
Relates-To: #463
Change-Id: Iecb7320668fa98cfe322cbf922eb77e9490acbdc
This patch implements ability to filter phase by given
cluster name.
Change-Id: I4eb95f9f75c57eff4ae8eb41c608c6f6d7fa009c
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Now we would be able to render phase bundle, executor bundle
and config bundle. Config bundle will contain documents such as
phases and executors.
Relates-To: #459
Closes: #459
Change-Id: Ia6b9196dfb3d8fb3264fef676c975ccc32883fee
* Table printer is based on cli-utils approach
* Rename 'phase plan' command to 'phase list' and print all Phase
documents from model instead of just printing PhasePlan object
Relates-To: #358
Change-Id: If3c5e2463e32f6794af4c82c12955a45583fce80
* This commit will removed capitalizaion in Error message
and follow the Golang code rule.
* Golang errors should not begin with capitalization:
https://github.com/golang/go/wiki/CodeReviewComments#error-strings
Signed-off-by: bijayasharma <vetbijaya@gmail.com>
Change-Id: I053cfa9e21ad56b0f30e476ec36320cb7cea4da4
This patch links cluster get-kubeconfig command call with
appropriate clusterctl functionality, and also replaces old
callbacks and removes outdated implementation.
Change-Id: Ibd0d981985f94497db250c8df3f5675fdec1d2ca
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #374
This introduces airshipctl integration with image-builder [0], which
replaces the existing isogen tool for ephemeral ISO generation.
The airshipctl isogen executor has been updated for building ephemeral
ISOs using the image-builder container. The ability for user-declared
filenames for cloud-init user data and network data was removed, since
the user's only interest is in supplying the relevant overrides, not in
transparent naming coordination with the image-builder container. A new
object is added to the document package to identify the document kind,
label, and key to retrieve data from since this is pattern we will
reuse elsewhere.
Progress flag removed as requsted. Progress is reported directly by the
image-builder container.
Isogen debug flag removed in favor of using log.DebugEnabled()
[0] https://review.opendev.org/#/c/730777/
Depends-On: https://review.opendev.org/c/airship/images/+/730777/
Change-Id: I545004feaf2116f8ffb29faf6f7f7f5fcfe24fff
This command will be used to retrieve kubeconfig from from leveraging
cluster or from document model. Particular implementation will be
added in further commits to make it easier for review.
Change-Id: If9e35dd90fdfcad6fa60a3cc4fab76ec1cb57f62
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Related-To: #374
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
* Phase executors accept run options which
have progress boolean field.
`airshipctl phase run` must be able to set
this options from the command line flag.
Change-Id: I0645680ae68bf8690800aac5f3837ca78909ade0
Added support to accept regex parameter as part of `airshipctl secret
generate encryptionkey` command. This allows user to pass regex parameter
so that the passphrase generated matches the regex.
Relates-To: #398
Change-Id: I3914e6a896bb669e3974fe67c466336e15989a8d
Currently airshipctl will overwrite an existing config file
by default during config init execution. This patch adds an
appropriate flag to explicitly control whether the user wants
to overwrite an existing file or not.
Change-Id: I9f4756b98e9d1245145809aed203974e99feb662
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>