Adds a triage label by default to the issue templates for project
maintainers to identify new issues that still need to be evaluated,
labeled, and addressed.
Change-Id: I9508cce273e7834ccff5eb77c0dd6a1e028dc299
Commands using cobra's ExactArgs feature previously did not have any
validation that the ExactArgs was being enforced. This patchset adds
tests to ensure that in the cases ExactArgs=n, that only n args are
accepted, and other values such as x or y throw an appropriate error.
Change-Id: I27b5774e79db51e0e9bc81d8c207be80811ba459
In the completion command validation was being done at runtime to
determine if too many or too few args were being passed in. This
approach required extra unit tests to validate the behavior.
This patch seeks to streamline the code by specifying the number of
args expected when initializing the cobra command, and allowing cobra
to throw an error before doing any work in go if the number of args is
incorrect.
As a result the unit tests for too many and too few args are no longer
needed for this package and have been removed.
Change-Id: If0cf043713ef08333f17b010210352205d74c4ee
This patch adds methods and repository stucts that will allow easily
clone/pull/update repositories that are defined in config.manifests.
Change-Id: I3789acd79d2072a2b90ed3bbaff99767070334e5
For cluster names that contain underscore ('_') symbol config module
removed some part of the name due to hardcoded indexes after name split
Change-Id: Ibd1e9b3ef2fce7e43cbdf41f4b1852933a253868
This change replaces the usage of the clientcmd's PathOptions with a
simpler filepath approach. The handling of the kube config file
associated with airshipctl is now entirely managed by airshipctl.
This also introduces the environment variable AIRSHIP_KUBECONFIG, which
can be used to override the default location for airship's kube config.
It can in turn be overridden by the command line argument.
Prior to this change, the kube config object was created by creating a
kubernetes client, then stripping off that client's config object. As a
side effect, this change removes the middleman, and creates the kube
config object directly from file.
Change-Id: I99ba88d50a0f45c40597a58fe4b3fdfeb7d1467d
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
to manage authentication information for clusters.
Includes username/password, certificate
and token options.
Change-Id: If95e5bbf5c3ddc4732465e81de407d5ad416e8f2
This fixes an issue where `airshipctl config get-context` would provide
no output when there were no contexts in the configuration.
Change-Id: I8eaafff8ecee7878f80d22867b0420feba1bf376
This null check is no longer necessary, since manifest is guaranteed to
be non-null by the prior call to globalConf.CurrentContextBootstrapInfo
Change-Id: Ibec4eb7b7b993af39055d73861b5cf5c157c12a5
The EnsureComplete method needs to perform various validations on a
Config object. This commit adds the missing validations for Manifests.
Change-Id: Ib562a67eefbbf19eb64444c4a811d946a9c8e170
Loader associated with Unknown type of a transformer kustomize plugin
and considered 'builtin'. Kustomize plugin system executes Config and
Transform method of builtin plugins. Therefore appropriate methods
of the document plugin loaders are executed as well. Main goal for
airship document plugin loaded is to determine desired aitship plugin
based on Kind field and execute its Config or Transform methods
Change-Id: Ic26a880570491ac3a59f2357ed455a2a7362387b
Defer is executed at the very end of a functions. If we have named
return paramteters Cleanp() function will overwrite function result.
So if 'err' is not 'nil' Clenup() will overwrite 'err' with 'nil'
Change-Id: I97bbce53be26281515a287b513a3727aa199260d
Config.Clusters should be indexed only by "simple" cluster names
(without _ephemeral or _target postfixes). This fixes an index
that indexed by the "full" cluster name defined in the kubeconfig,
in some cases resulting in a nil pointer dereference.
Change-Id: Ic7a4b46419354d5755ccea58ff73c5fbbc4d9658
Prior to this change, flags associated with the Config object were being
read too early (that is, before cobra had parsed them). They are now
read just in time for command execution.
Change-Id: I0affca9429867eb25db40f8323403e0f6976b47b
The goimports tool does not check for trailing whitespaces in multiline
strings. This commit adds a simple linter to address this deficiency.
This change will also have the benefit of providing light linting of any
non-go files.
Change-Id: I253dd7c4895f476fa3a6f0c4fccf7c9cada16366
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
Implements `make docs` command to create rtd-themed docs using Sphinx
from the existing Markdown documents in the docs directory.
Changes the `get-modules` command to `depend` to more closely match
OpenStack guidelines in [0].
Adds `fmt` command as specified in [0], currently referencing the `lint`
command.
Adds `godoc` command that will host a local godoc server instance with a
link directly to airshipctl technical documentation.
Adds `releasenotes` commands specified in [0], currently
noted as "TODO".
Adds `images` command as found in other Airship projects, referencing
`docker-image`.
[0] https://governance.openstack.org/tc/reference/pti/golang.html
Change-Id: I134fc2c2714bce6d23dc9cf8b86c3016d68def7e