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
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
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
The methods are useful when incoming data are not key value pairs,
rather than iterating two times, one time when we call Annotate()
or Label() over the map, and then iterate again inside the function,
it would be better if we could skip iterating the first time, and
let everything to be handled by Annotate or Label functions
Relates-To: #162
Change-Id: Ia9d989a0534d15e4024317c4606a187ac021b751
* added license templates for go, bash & yaml in tools dir
* added a script that will add license information for all
missing files. Type: go, yaml, yml, sh
* skip adding license for all files within testdata
* Syntax:
> ./tools/add_license.sh
* Skip license for manifests folder
* Added one extra line after licene for yaml files
* Added License after Hashbang for bash.
* Add an extra line after hashbang and before license
* Updated the go template to use multiline comments
New Files:
1. tools/add_license.sh
2. tools/license_go.txt
3. tools/license_yaml.txt
4. tools/license_bash.txt
Change-Id: Ia4da5b261e7cd518d446896b72c810421877472a
Realtes-To:#147
* Expose the GetAnnotations method of the document.Document interface.
* Add the Annotate method for adding a single annotation to a
document.Document
* Clean up the implementation of Label and GetLabels
Change-Id: I94af2380f50848bfcd64af9d5c2c991305d9746f
Relates-To: #102
Removed external methods from document interface.
Created new methods to supply document labelling.
Change-Id: I4c20ad515999a6c049a2feddafdb62af8e1dfefb
This patch addresses guidance from effective go [0] and golint
failures such as:
pkg/document/document.go:8:6: type name will be used as
document.DocumentFactory by other packages, and that stutters; consider
calling this Factory
pkg/remote/errors.go:9:6: type name will be used as
remote.RemoteDirectError by other packages, and that stutters; consider
calling this DirectError
pkg/remote/remote_direct.go:27:6: type name will be used as
remote.RemoteDirectClient by other packages, and that stutters; consider
calling this DirectClient
pkg/remote/redfish/errors.go:10:6: type name will be used as
redfish.RedfishClientError by other packages, and that stutters;
consider calling this ClientError
pkg/remote/redfish/redfish.go:14:6: type name will be used as
redfish.RedfishRemoteDirect by other packages, and that stutters;
consider calling this RemoteDirect
[0] https://golang.org/doc/effective_go.html#package-names
Relates-To: #58
Change-Id: I6d94da7755c8719bbcc4a77917e283074281309a
Signed-off-by: Alexander Hughes <Alexander.Hughes@pm.me>
This change causes the linter to be a bit more complainy. The hope is
that this will cut down on some of the more pedantic issues being caught
in code reviews, and thus reduce the overall time a change spends in the
review process.
This change includes various changes to the codebase to bring it up to
the new standards.
Change-Id: I570d304bca5554404354f972d8a2743279a0171b
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