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
This commit adds functionality to generate SSH keypair via templater
plugins. ssh keypairs can be generated via generate-secrets phase.
Signed-off-by: Sreejith Punnapuzha <Sreejith.Punnapuzha@outlook.com>
Change-Id: I83720df5f934caf65dab201a1d0894ed3fee6cb5
* command internal logic was revised and optimized
* added ability to delete/reset context fields
* unit tests were reorganized, new cases were added
Change-Id: Ie35d11405e88fea21abf33cb75f44b03bb4644fd
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #348
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
This reverts commit 9a608de653ffe1ce8f60b5f16249e2152b3522ad.
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
* 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
Change introduces evolution of airshipctl document plugins which
are compatible to the new approach for kustomize plugins.
Change-Id: I422110ba523b97c8a80a0b82cb43b70a4ee8e558
Relates-To: #322
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 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
With this implementation reader is an in memory interface that allows
to build clusterctl config based airshipctl documents
Relates-To: #200
Closes: #200
Change-Id: If4a5fbd5c8402c958563cdfc939fc579289b0bfb
Client interface currently has only one Init method.
Also add a constructor for the Client which is based on resource
defined in clusterctl/api package and a filesystem root to construct
bundle for repository interface. Root is expected to be derived
from the airshipctl settings document manifest.target-path
Factory functions allow to insert custom repository interface
into clusterctl client
Relates-To: #170
Change-Id: Ib27e73043b4776001f405d2d4e96016735c6f46e
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
The wrapper is called ApplyAdapter and is a struct, that has Apply(..)
method and some setters that allow to control kubectl apply behaviour
Addapter is expected to be used through Apply(..) function, which takes
slice of document.Document interface objects, writes them out to
temporary file system, from where they are picked up by kubectl Apply
module, and delivered to kubernetes cluster. The decision to use
temporary file system is based on the fact, that in current state
kubectl project currently only works with actual files, and ignores
io.Streams object, that is part of ApplyOptions struct, so it is
currently the only way to use it.
Change-Id: Idc5d79794149c00198f420d76cf9aa3b5264946e
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