Without this commit airship can hang endlessly waiting for stdin
to be open. Apparently it depends on the containerd and docker
server version. This commit adds asnyc writing to stdin, this way
we don't have to wait for write to complete before starting docker
container. The code uses similar approach to upstream docker cli
implementation.
Related-To: #513
Change-Id: I2e6d4cbe37df1f8cba356af79c1c2cf18438e86c
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>
This will enable airship to run containers in privileged mode
as well and to specify commands to be executed.
Change-Id: I663eb55547bb821f26a9071c24d08166a3b3d56b
Since golint job was fixed and it's essential to maintain
code standards this job should have voting status.
Change-Id: I623171ce89b3906eac30e11fa3d7ebeb2725372b
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Currently golint check zuul job does nothing because of
bug inside tools/golint script. This patch fixes this issue.
Change-Id: Iaab1741b2a3f5f61c49549d8e4ce88be6212d570
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Adding go code to templater to support generation of strings
based on the regular expression passed.
Closes: #438
Change-Id: Ife0c4f8d5dd8032408875c73ba098919470be9e9
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
Currently mockContainer implementation is located under
pkg/bootstrap/isogen and it's not possible to import it from
other packages. This patch moves it to appropriate new package
under testutil.
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To : #432
Change-Id: I36510e8e065434de597e7316dfbe51da0825d343
This reverts commit 9a608de653.
Requesting revert because of the sops+gpg testcase failure issues. The failed testcases are impacting airship-airshipctl-lint-unit zuul gate.
For more details please refer to https://github.com/airshipit/airshipctl/issues/378
Change-Id: I60f6b5daaeebc038b68556c60413b3d0c6db6d68
Appropriate function will allow us to retrieve kubeconfig using
native function from cluster-api.
Change-Id: I5b3c9995c03228245b4a76e7034fba99ac03d9a6
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #374
* uplift of cli-utils had changes with signature of Applier.
So had to update the impacted go code and cleanup the
unwanted parameters.
Change-Id: I6f3018d1fd4cac2e1a328e50c44ad0f51bb0e16f
Closes: #367
This commit uplifts cluster-api go package to 0.3.10
In new version we are now allowed to skip var subsitution completely
that is why TestAdditionalVariableSubstitutionRepoClient is changed
to relfect that.
Also some of the cluster-api constructor functions has been changed,
and we are changing our factory injection methods as well.
Change-Id: I24aa849271eb7109eb4f7d53a352ea3bb20a21a5
This patch provides the ability to show progress bar using
container logs (ubuntu/debian based only).
Change-Id: I86eebe4d368d81c4685fb27ca31b86cbb3dea08d
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #278
Poller provides an ability to implement status reader,
which is an object that can fetch a resource of a specific
GVK from the cluster and compute its status.
Change-Id: Ia6f5de81a0ac645903308947df56664a838076dd
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
This commit uplifts cobra to the latest version. It also includes
various changes accounting for differences in the new version.
Change-Id: I0d1ed3ecd3b8d406428fded92abf6e782951d005
The package will have Event object, that would represent any event
that airshipctl can have, also this package provides Processor interface
that is to be used to process, print, or track progress of the executor
runners
Change-Id: I184408f7b6130653cdbabbe5e5adaac2dd758663
This change creates a tool that generates CLI documentation each time
`make update-golden` is executed.
Change-Id: I4bcdf299cd424f4cff1ecf6503822d304e9a3947
Signed-off-by: Drew Walters <andrew.walters@att.com>
This commit overrides default components interface behavior by
allowing to inject SkipVariables parameter, see L#37 at components_client.go.
To do this, we pass new Repository Client interface which is built on top
of the clusterctl implementation with one simple injection of SkipVariables
Please see related issue for more details
Relates-To: #201
Closes: #201
Change-Id: If068caa8308e39c9ee23d07f189bad26be04d5cf
Plugin is responsible for resource generation based on template
(go template format is used) supplied to its configuration.
Go template can use an object (map) specified under 'spec'
configuration parameter.
Change-Id: I8c1b7dc5676bfff2f9b1a47f6433177ae796a15f
Implementation would allow us to build our own cluster-api components
based on airship document bundle.
Relates-To: #170
Change-Id: Ic029fd07ca5221747e49c3cf48e80a3e279ac1f0
This version is required to integrate with clusterctl.
Starting v0.0.6 cobra Execute() method returns ErrSubCommandRequired if
command is executed when its not runnable (Run or RuneE == nil), hence
all tests that invoke such commands need to be either remove or adjusted
to expect these errors
Change-Id: Ia7935c1bf83d47b3a7d3a6c03d1989d53ad57a9a
Relates-To: #187
The go-git module (and helper modules) recently moved from
`gopkg.in/src-d/go-git` to `github.com/go-git/go-git` [0]. This commit
switches to the new module, as well as uplifts from v4 to v5.
[0] https://github.com/src-d/go-git/issues/1295#issuecomment-592965250
Change-Id: I2e73ba7bb1220a3c75c0d81aa5ab0f1f13479161
This updates the Kustomize dependency for airshipctl to
api/v0.3.1, which is the oldest version which will support the
Replacement Transformer plugin.
Some changes were needed to accomodate the fact that various apis
that airshipctl was relying on were moved to kustomize-insternal
packages, namely:
- Integrated with the krusty.Kustomizer to drive kustomization
- Removed the custom plugin loader which leveraged the Unknown type
- Worked around NoFieldError becoming private, inc. removing a test
As a follow on we'll need to re-integrate plugin functionality somehow.
Also, in this release Kustomize has implemented support for the
"config.kubernetes.io/local-config" annotation, which we'd planned
to use to to avoid deploying some documents to the Kubernetes API.
It turns out the semantics are different than we anticipated;
Kustomize also fails to return these docs via document *selection*.
Therefore, this change reverts to an earlier approach which uses
a custom airshipit.org/deploy-k8s label.
Change-Id: I7022e12464ea7b6a3ca8609f99f3699bf8da0edd
This updates the Kustomize module dependency to v3.3.1,
which has replacement functionality required by the Replacement Transformer
plugin, among other enhancements.
Change-Id: I058114c398464394cfb6b2626cb475d763c1bacc
This adds the StatusMap type, which can be used to gather the Status of
a given kubernetes resource. A StatusMap can be created from a
document.Bundle and represents all possible Statuses for all
CustomResources, and the conditions that must be met for those statuses
to be valid.
Relates-To: #73
Change-Id: If2cba0bb9890fe28feff0c890bb8036489196fc4
This change removes the dependencies on arbitrary 1.16 SHAs in favor of
depending on a tagged 1.17 version of various kubernetes packages.
Change-Id: I5c99e431b1d1b27502aeb0ad13b4a84c25011420
k8s.io/kubernetes package is not needed any more since kubectl cli
support has been removed. Therefore we do not need replacements for
kubernetes modules any more
Change-Id: I5d9229c0011881afe8957f0f5957985d5c0b8041
Closes: #63
This adds the golint linter to the `make lint` target. As of this
commit, the results from golint are not counted as errors. Further
changes to the code will be required to bring it up to golint's
standards, at which point we will allow golint to cause failures for the
`lint` target.
Change-Id: I34134e3deb080e6da0bc0aac299caca6c3b5d0a9
Adds `airshipctl document pull` command that will check the current
manifest specified by the config and download it to the config specified
target path.
Change-Id: I493564c056225ff1e19f5d1aecb8c187683529ec
This commit removes any assertion from Go's "testing" package,
preferring instead to use an assertion from the testify package. All
tests now have uniformity.
This also decrease the number of iterations in the password generation
test, decreasing test runtime tenfold
Change-Id: I8799110e93dfa19bebe9050528e865b4c991c3df
This commit implements redfish remote direct subcommand
under bootstrap.
Change-Id: Idf97445f6fa59a77145eae1edaa15b1d22723f19
Signed-off-by: Kanwar Saad Bin Liaqat <kanwar.sbl@gmail.com>