Add ValidateClusterMap() method to confirm there are no parent-child
dependancy issues for any clustermaps.
Closes: #481
Change-Id: Ifb57b026933909a4350d71353adca23a42440a48
This command is outdated and no longer needed, according to the
design call it should be removed.
Change-Id: I7c96fdd8cbc21c56ad9d0d6291ea9b6c6626735d
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #588
This command is outdated and no longer used, according to the design call
it should be removed.
Change-Id: I5953f0c66e9cee40c070afe148aa98c9d07113f7
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #588
This PS replaces cluster-api implementation with our own since
it allows to configure timeout.
Change-Id: I5cbba24dd7c6a279fcd2325e904ac7d18348eabf
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #548
Closes: #548
Moves CAPI resources in ephemeral cluster from the 'default'
namespace to a new 'target-infra' namespace.
Closes: #551
Change-Id: I419a71baa8e05e7b57b38234d15b955b36951b40
This patchset introduces new field to Phase.Config API object
SiteWideKubeconfig - if set to true, the phase will have access
to all kubeconfigs for each cluster defined in ClusterMap.
By default only kubeconfig of the cluster specified in
Phase.Metadata.ClusterName will be available to the phase executor.
This approach will speed up the deployment process because arishipctl
will not have to look for multiple kubeconfigs when running each phase
Closes: #547
Change-Id: Ic92027ba88d3ce8cb769c254968530037540b8fd
Now the target path for the default manifest is
$HOME/.airship/default. This is reasonable default
location.
The target path is a mandatory field in the
definition of a manifest. If a user wants
to use her current working directory as a location
the manifests, then it must be properly configured
in the $HOME/.airship/config.
Relates-To: #416
Relates-To: #417
Change-Id: I96601803939df5c7369d1580842dfabeb19aa017
Since document.NewBundleByPath() is pretty resource and time
consuming call (because it invokes kustomize under the hood),
we should avoid unnecessary calls of this function. There are
lots of the same constructor calls of new bundle from phase
bundle root path, mostly in helper, which slows airshipctl
and makes no sense. This patch fixes this problem by storing
phase root bundle variable in helper, which creates only once
during airshipctl execution.
Change-Id: I6b59d440f7ab7a68dc613091dafcc9e82df10eb7
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Closes: #488
Since this field is no longer actually used, there is need to
remove it completely.
Change-Id: I9f7002f8def31d1660919bd0128707e43a57ad71
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Now if we run `airshipctl cluster get-kubeconfig` without args
it will return kubeconfig for the entire site, which will have
contexts for every cluster defined in cluster map.
Relates-To: #460
Closes: #460
Change-Id: Icf1f09724a5c60ac520b1dbcbda69c3280ac4c7e
Change ClusterMap API object to support multiple kubeconfig sources
for a cluster. If one kubeconfig source fails, kubeconfig builder
will not fail and move on to the next one. This behaviour will allow
to support cases when ephemeral cluster is not accesible anymore or
when target cluster is not yet accessible.
For more information please read issue #460 in airshipctl github
Relates-To: #460
Related-To: #460
Change-Id: I7cd32f78cd7c4ad8814eac357424c24216f40d76
This PS will allow us to retrieve kubeconfig from different
kind of sources.
Change-Id: I31381cf466c58373efda40d06587e34bef411c68
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
This commit deletes a left over method that was used to get
namespace of the cluster. Instead ClusterAPIRef should be
used to get both name and namespace of the cluster in
terms of cluster-api.
Change-Id: I770cd11094257df29e1cac2c63ed3edecd62e54f
This commit fixes the minor comment message on pkg/cluster/clustermap/map.go
file and not related to any issue.
Change-Id: Ie92a7c09ada8b0983631cbcd0cd82622c068fc5b
This commit will add clusterapi name and namespaces with a given cluster
to a clustermap.
Refer code from this PS: https://review.opendev.org/#/c/759805/
Change-Id: I1937efa0bbf0b5b175d18777fdf4ba837d1d7344
Relates-To: #376
Closes: #376
This change removes the SubPath entry portion of the config manifests, and
refactors several areas that used it. This also updates unit tests to
reflect the new changes.
Closes: #255
Change-Id: Ibbb519a3f1fb28a1594e971274c5de54b99c867e
This commit extends cluster map interface to be able to specify
a custom kubeconfig context per cluster in ClusterMap
Related-To: #380
Related-To: #375
Closes: #380
Change-Id: I9a8a26e3a3666e069c243e871f89ae9222228f17
This patch moves all cluster status functionality from
cmd level to pkg level as well as unit tests, making code
cleaner and improving actual test coverage.
Change-Id: Ia811887b684b2129ca30dd90b5afc72e726271ff
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
This commit adds cluster map api object, cluster map
interface and it's implementation built on top of cluster map api
object.
Important note:
ClusterMap interface needs a method to identify namespace of the
cluster, it can't be a part of api object, because real source for
cluster namespace is cluster object from cluster-api upstream lib.
This will need further design discussion on how we will find
cluster-api kind: Cluster object in our manifests. For now, there
is dummy "default" namespace being used
Change-Id: I8175f54abbe77331f0c87c0bde50857ee5c0eb1d
Poller provides an ability to implement status reader,
which is an object that can fetch a resource of a specific
GVK from the cluster and compute its status.
Change-Id: Ia6f5de81a0ac645903308947df56664a838076dd
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
* GetGroup(), GetVerion() is already added as member method of document.Document
Use that to get group, version, kind on a resource object
Change-Id: Ib75229647461cdaad832c8c1c32af5bcaa9c9c37
Command "cluster initinfra" should be removed since
"phase apply" was introduced instead.
Change-Id: I263f8988a4456fc03314093a55ee1c1da8048404
Relates-To: #162
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Problems description:
Once we execute airshipctl config init, the default config in
~/.airship/config doesn't contain default values for:
currentContext: ~
clusters:
default:
clusterType:
target:
bootstrapInfo: ~
managementConfiguration: ~
---
This PS set default values for Airshipctl config to use it
out of the box.
Closes: #234
Change-Id: I57449e678f19ab1c0e2212c38b01ea195f62aa44
Instead of having a lot different arbitrary named commands
such as "cluster initinfra", "cluster control-plane", add
a generic phase command that would provide capabilities
for interacting with phases (e.g. getting list or applying
specific one).
Change-Id: I1ab797121aecbfd2348933dfd993c1a5974edaf9
Relates-To: #162
This change modifies the constructor for StatusMaps, which uses the CRDs
currently residing in a cluster as the basis for how to define a
resource's status.
Change-Id: I15c04c1093c06840dba9b21bd5148b99f1257595
Currently it takes ClusterType as first parameter, however
this parameter can be retrieved via appropriate function
CurrentContextClusterType in the same module.
Change-Id: I205fd7d00bf1745cada88d8fd972dac1dbe0fddf
Removed Modules from config. There are no other types of modules
that need additional configuration. BootstrapInfo is defined
in the config directly.
Used camelCase for config parameters.
Change-Id: I3531a061026f3b2f1e72af6272ba4709f28d1b3d
This change accomplishes the following:
* Add a constructor for fake.Clients
* Add the ResourceAccumulator type and several instances of
ResourceAccumulators, each of which is intended to supply a fake.Client
with arbitrary kubernetes resources.
* Add the client.Factory type, which provides an easier method of
providing a fake.Client in place of a real one.
Change-Id: I97f5a613df3ca14bc4fdcf726d3e20c5413cbb5b
Goland is complaining of a number of bad practices, and unused code.
This patchset addresses some of those complaints, such as:
- struct initialization without field names
- error string should not be capitalized or end with punctuation
- name starts with package name
- duplicate yaml keys
- snake case
- redundant parentheses
For the http.Transport redundant parentheses, the lint target fails
without the use of //nolint:errcheck so it has been added as
(currently) there is no potential for there to be an error returned
see [0] for example.
[0] https://golang.org/src/net/http/transport.go#L42
Change-Id: Ib1b20639c9b6e9be097ef1f158ecd7472f578488
Signed-off-by: Alexander Hughes <Alexander.Hughes@pm.me>