Currently airshipctl is not able to checkout remote branch
due to using simple branch reference name instead of remote one.
This patch fixes appropriate problem and allows user to specify
what kind of branch to use - local or remote one (since reference
name will be different in these scenarios).
Change-Id: I1fea29f84097b9e7160597003d0e8961f4d3aca6
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
* This commit is the smaller patchset from earlier work:
https://review.opendev.org/#/c/750449/
* This is the first series of patchset
Change-Id: Ib1ff74eba65de7c7c59cf8f4fd26b15e388ba368
Signed-off-by: bijayasharma <vetbijaya@gmail.com>
Relates-To: #296
The following code uses the documentFs interface and adds
simple fileExists function to templater plugin.
Change-Id: Ia53c573e54188960eaf99f7c48469359d4e3688b
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
In order to widely use filesystem interface in airshipctl
there is need to move it to separate package to avoid
importing unnecessary dependencies from document
package and, as a consequence, possible cyclic dependencies.
* filesystem moved from document/fs to pkg/fs
Change-Id: I3b6298462f03db43594a9fa26bf23ab7687c5589
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #415
This PS adds decoding features to ReplacementTransformer to decode
the source objectRef when source is of `kind: Secret` and has `data`
field. It also encodes the value in the target fieldRefs before
replacement if the target is `kind: Secret` and has `data` fields.
Throws an error if the target fieldRefs have both `data` and `stringData`
for replacement.
Change-Id: I1d918058409b3511faa9a99512d25574027bda86
Along with the change to support proxy configuration for control plane
there is a change for replacement transformer to support arrays of strings.
The current implementation of cloud-init configuration for the control plane
based on KubeadmControlPlane object and uses an array of strings for commands.
Change-Id: Id0a49cc1a0fdbc392c7c7a56859b21737065b0d6
We don't use clustertype anymore, so all the related functions must
be deleted or adjusted as well as appropriate config fields.
Change-Id: I3931fdc71d4318e916f8bbc2d94e062c9df5f641
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #349
Plugin extended to support new kustomize plugin framework which
consider each plugin as a container
Change-Id: If55b7093f711401165b7d4fd3f5b1059fde464ff
Relates-To: #340
Change introduces kyaml.RNode Pipe Filter which uses k8s go-client JSON
path parser. This enables to use JSON queries defined by
https://goessner.net/articles/JsonPath/
Change-Id: I6c2276f27652190ed9d183cea0e45eb118346c6b
Relates-To: #340
Change introduces evolution of airshipctl document plugins which
are compatible to the new approach for kustomize plugins.
Change-Id: I422110ba523b97c8a80a0b82cb43b70a4ee8e558
Relates-To: #322
Currently we don't test document pull step by rewriting
manifest_directory variable as current source path, which
makes a mess in target_path, manifest_path and related paths
(concatenation of target_path+manifest_path won't return
an existing and proper location). This patch organizes
mentioned variables and enables document pull step which
starts working properly. The latest repo state used as
git source for this command.
Change-Id: I5abce73877441c7529f2f77add79cf410e2226d8
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Data structure representing plugin configurations should be a part of
airshipctl API module. Plugin implementations will reside in document
package.
Change-Id: Id2e359b747a16a5573052cfb05c1148d346db508
Relates-To: #322
This change adds the ability to use substring substitution to inject
numeric source values into string targets. This is required for our
networking catalogue, since a numeric k8s API port needs to be inserted into
numeric and (sub)string targets in different phases.
Co-Authored-By: Ian Howell <ian.howell0@gmail.com>
Change-Id: I24beb46a2bda4e118406129a0a922b0c56142c76
This command 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: Iff75eb66db2fee922e6db1bf2930892c02c3b601
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
AirshipCTLSettings are not used here, so it was removed.
Change-Id: If4bf64b9991b4ac05898632c79bacbacd7872635
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
* Substring replacement failing in ReplacementTranformer when
target substring contains periods (.)
* This is temporary fix till the kpt-function way of replacement
transformer is implemented
* In this fix it is assumed that the substring condition can only occur at
the end of the path.
example:
expected: replace the nginx version from 1.7.9 to 1.17.0 for container named
`nginx-tagged`
target condition:
spec.template.spec.containers[name=nginx-tagged].image%1.7.9%
Change-Id: I76fb65f69a6eedf3cbdd692d3bc1835a214dc8fa
Relates-To: #336
Closes: #336
* This commit will remove unused constant.
* According to issue, we have one unused constant:
pkg/document/constants.go
Change-Id: Ib93fa01dbd60bb48cf6b8b77298bd0ab4d5b82a4
Move code from environment module to util and document
modules to prevent circular dependencies.
Relates-To: #264
Change-Id: Ifec9ab3f1ada01cc662e655ff4a6f2cfebe4150a
1) modifications to exported functions/variables documentation
2) moved some methods into a different folder
Change-Id: I212442516424bde3284f75b326d152c290d20c80
This patch refactors some code and adds useful debug/info log output.
Change-Id: I590f6e5c300e5c91443af0a8fdb1073229602a67
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #278
This PS has a function which constructs a collection of Metal3 BareMetalHost
resources, along with associated configuration Secrets.
It solves for a couple of things:
1. pulling the nitty gritty details for generating BMH into one reusable place,
2. allowing the site-specific details to be filled in via catalogues of values
This function leverages a couple of different plugins in sequence:
The airshipctl Replacement plugin, which pulls the site-specific data from
the catalogue documents into a Templater plugin configuration; and then
the airshipctl Templater plugin, which generates a variable number of
BMHs in a data-driven fashion.
More details can be found in the README.md in this patchset.
Closes: #245
Change-Id: I3ddbd36dc53ea6afbd633098c985f4b28bcbb793
The change would allow to build a document object from bytes
Change-Id: I15c13a960b4e989cffa4525c85b8f32f2a51a0e1
Relates-To: #238
Relates-To: #279
Closes: #279
* GetGroup, GetVersion and GetKind now can be used to construct GVK
structs
* ToObject deserialize document to a particular object. This is
needed to precess custom resources which were defined for airship
Change-Id: I527e2c73288e865455853c5553bffd508a2d2eb6