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
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
Fixes possible name collisions between variable names and package names
Remove redundant import naming
Use nil slices for slice declarations instead of empty slices
Use make for slices of fixed lengths
Remove redundant parentheses
Replace deprecated `SetOutput` method with `SetOut`
Fix swapped actual/expected arguments on assertEqualGolden
Change-Id: Ia39ef44372c3e44948e5440575125bdb470898df
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 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 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