* 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
* 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
This type would allow us to control behavior of clusterctl modules
and choose components we want to install, if we put document of kind
Clusterctl into Bundle. In near future we need to generate deepcopy
methods for this object, so it can be used with kubernetes schema
Relates-To: #170
Change-Id: I2f40a7e9b66e0f7f0bbc8b6874ec45f767416c69
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 commit also introduces a dochelper concept. This provides
some convenience methods to the document pkg that help extract data
from known document types as well as walk document relationships to
discover related information such as BMC credentials for baremetal
hosts.
Once merged, a follow up patchset will leverage these within the
cloud-init code to deduplicate some of these lookups.
Change-Id: Ie6a770ce4b34adbea30281917f0cb2fdc460b4fb
By default every document is to be deployed to kubernetes however
some documents may need to be skipped, because they serve only
informational purposes and have no consumers in kubernetes cluster
Change-Id: If2ea5659acb319c15cf3f55e9f3d9e86dc647e9f
Relates-To: #130
Closes: #130
By default kustomize cli orders k8s resources, in a way, that they
can easily by applied to cluster, namespaces and crds first. In this
patch set we implementing same behavior
Relates-To: #131
Closes: #131
Change-Id: I4fc75366627ed361ac1da48e89a35949bcb79801
Also this commit, adds condition to setup testbundle, that ignores
directories
Commit adds new set of functions that allow easy selection of
documents from bundle for different modules.
Relates-To: #61
Closes: #61
Change-Id: I6011203a1f573cbb847e9f57c04aa60bf8278ef1
Introduce Selector object that would serve as adaptor to kustomize,
this provides a layer between kustomize in a way that there is no
more need to import types package from kustomize by other modules.
Change-Id: Ib9e892e8b71d1808e427dd5240e4f313cc366225
This introduces two new interfaces to airshipctl:
* Bundle: represents a Kustomize rendered
collection of your documents that allows you to
iterate over or filter the documents in the bundle.
* Document: a thin wrapper around a rendered
document.
This commit also includes a proposal for a way to
represent YAML test fixtures as testdatafs.go
and a new testdata subfolder within the document
pkg.
Change-Id: I4282b27977617552c25c5ae2c3b7da44e67dd014