580 Commits

Author SHA1 Message Date
Kostiantyn Kalynovskyi
f2e305a56d Fix missing authentication for redfish dell client
Change-Id: Iffd26171b75ce10dd15d66583b6bda249156c34d
Closes: #396
2020-11-11 15:08:45 +00:00
Zuul
084ed45ef3 Merge "Adds command objects for cluster check-certificate-expiration" 2020-11-11 10:09:30 +00:00
bijayasharma
dfd82242d7 [#376] Add clusterapi name and namespaces to clustermap
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
2020-11-09 21:11:04 +00:00
Sidney Shiba
f4e532e91a Extending Container interface and package
Adding the following method to the interface and implementation for
docker container:
- InspectContainer() - used to determine container status

Change-Id: I4a8096f4f5addad31daa5038a30b1ffcf1d424e9
2020-11-08 13:55:35 +00:00
guhaneswaran20
dd03db0916 Adds command objects for cluster check-certificate-expiration
Reference:- https://hackmd.io/aGaz7YXSSHybGcyol8vYEw
Previous work:- https://review.opendev.org/#/c/755291/

Below is the complete ordered flow of PS for the feature:
https://review.opendev.org/#/c/760498/ - Cobra command
https://review.opendev.org/#/c/760501/ - Command Objects
https://review.opendev.org/#/c/760504/ - TLS check
https://review.opendev.org/#/c/760517/ - Kubeconf check
https://review.opendev.org/#/c/760532/ - Node check
https://review.opendev.org/#/c/760537/ - Combined Unit tests

Change-Id: Ie0fac7799724b7fb2255e387b7e90b26159bda5c
Relates-To: #391
2020-11-06 13:14:21 +00:00
Zuul
ee120fde74 Merge "Adding Bootstrap Event" 2020-11-06 00:01:01 +00:00
Zuul
0c2edba495 Merge "Revert "Encrypt and decrypt using sops"" 2020-11-05 22:32:28 +00:00
Zuul
046a1fc291 Merge "BootConfiguration struct for Bootstrap Container" 2020-11-05 19:52:29 +00:00
Sirisha Gopigiri
f705ff0000 Revert "Encrypt and decrypt using sops"
This reverts commit 9a608de653ffe1ce8f60b5f16249e2152b3522ad.

Requesting revert because of the sops+gpg testcase failure issues. The failed testcases are impacting airship-airshipctl-lint-unit zuul gate.

For more details please refer to https://github.com/airshipit/airshipctl/issues/378

Change-Id: I60f6b5daaeebc038b68556c60413b3d0c6db6d68
2020-11-05 13:53:15 +00:00
Michael Beaver
193dc935f1 Refactor subPath out of config manifests
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
2020-11-04 09:30:03 -06:00
Zuul
e4d11bbc2f Merge "Add support for custom kubeconfig contexts" 2020-11-03 01:56:30 +00:00
Zuul
6a4e23b6a8 Merge "Extend clusterctl client interface with GetKubeconfig function" 2020-11-02 19:00:34 +00:00
Kostiantyn Kalynovskyi
8567ddf749 Add support for custom kubeconfig contexts
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
2020-11-02 15:33:02 +00:00
Zuul
76e937eede Merge "Adding decoding and encoding feature to Replacement Transformer" 2020-10-30 22:24:07 +00:00
Sidney Shiba
e528a89a73 BootConfiguration struct for Bootstrap Container
Adding BootConfiguration structure in preparation for the implementation
of Bootstrap Container / Ephemeral Cluster through "phase/executor".

Change-Id: I0239e9c975784703dd6abacbb17b5e15744f3924
2020-10-30 14:28:49 -05:00
Zuul
f60458a6a8 Merge "Remove context from BMH object." 2020-10-28 20:41:00 +00:00
Zuul
8bb8d28713 Merge "Remove not needed context pointers in container interface" 2020-10-28 14:11:29 +00:00
Zuul
0f287089d9 Merge "Add check for executor ref in phase helper" 2020-10-27 22:32:32 +00:00
Kostiantyn Kalynovskyi
ac6e8d1194 Remove not needed context pointers in container interface
Container interface is being extended right now, because we
build new things on top of it, such as bootstrap containers.

Current version of it, was delivered as MVP and is used only
in ISOGEN. During MVP stage we didn't bother too much about
the pointers and readability. However now when we built something
new on top of it, we want to make sure that it we dont make
matters worse, and building on solid foundation.

The pointers are not needed in any way, and they are dereferenced
on top of that, context.Context is an interface, and there is
very limited theoretical use of pointers to interfaces.

Change-Id: Iee1eeb89f058aa8e994cba685b49085707362ee1
2020-10-27 17:28:25 -05:00
Ruslan Aliev
569d3c3872 Extend clusterctl client interface with GetKubeconfig function
Appropriate function will allow us to retrieve kubeconfig using
native function from cluster-api.

Change-Id: I5b3c9995c03228245b4a76e7034fba99ac03d9a6
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #374
2020-10-27 15:11:01 -05:00
Sirisha Gopigiri
d82e04ea5e Adding decoding and encoding feature to Replacement Transformer
This PS adds decoding features to ReplacementTransformer to decode
the source objectRef when source is of `kind: Secret` and has `data`
field. It also encodes the value in the target fieldRefs before
replacement if the target is `kind: Secret` and has `data` fields.
Throws an error if the target fieldRefs have both `data` and `stringData`
for replacement.

Change-Id: I1d918058409b3511faa9a99512d25574027bda86
2020-10-27 17:45:29 +05:30
Zuul
19360953b0 Merge "Remove legacy code from ReplacementTransformer" 2020-10-26 21:22:22 +00:00
Kostiantyn Kalynovskyi
690d8d88c1 Remove context from BMH object.
This is first step in refactoring remote package to support
future inventory interface, also relates to remote-direct
executor, as it simplifies usage of Host objects

Relates-To: #362

Change-Id: Ief2fece134a465916ce461960cd7d16c9e237eb7
Relates-To: #362
2020-10-26 10:25:44 -05:00
Sidney Shiba
ad0e87ea88 Adding Bootstrap Event
In preparation to the support of Bootstrap Container/Ephemeral Cluster
feature, the following updates have been added:

- Added Bootstrap event type, structure and method in event.go
- added processing of Bootstrap event in processor.go

Change-Id: Ic054f6b198648a4e1edcef71d8cfc0907bb775bc
2020-10-23 17:22:24 -05:00
Dmitry Ukov
96cbb045a4 Remove legacy code from ReplacementTransformer
Change-Id: Ia247ee15efd5f66b5e36cf49339474548d94765d
2020-10-23 14:27:55 +04:00
uday.ruddarraju
9a608de653 Encrypt and decrypt using sops
Design document: https://docs.google.com/document/d/1EjiCuXoiy8DEEXe15KxVJ4iWrwogCyG113_0LdzcWzQ/edit?usp=drive_web&ouid=102644738301620637153

Demo readme: https://hackmd.io/@WE7PUWXBRVeQJzCZkXkOLw/ryoW-aOLv

This patchset comprises of:
- package library to interact with sops
- integrate airshipctl encrypt/decrypt with sops

Change-Id: I2ca3ff3c8661d146708084728cb3f87365a4f39e
2020-10-23 02:27:45 -07:00
Zuul
16c349526f Merge "Add docEntryPointPrefix field to the metadata.yaml" 2020-10-22 18:18:58 +00:00
Zuul
cb9396bc80 Merge "Simplify ShowProgress unit test" 2020-10-22 13:49:38 +00:00
Vladimir Kozhukalov
a608d4c56d Add docEntryPointPrefix field to the metadata.yaml
* The phase.docEntryPointPrefix field in the metadata.yaml
   allows you to define a common part of the documentEntryPoint
   for all phases in the phase bundle.

   For example, let metadata.yaml be
   ---
   phase:
     path: manifests/phases
     docEntryPointPrefix: manifests/site/test-site

   and a phase be
   ---
   apiVersion: airshipit.org/v1alpha1
   kind: Phase
   metadata:
     name: initinfra-ephemeral
     clusterName: ephemeral-cluster
   config:
     executorRef:
       apiVersion: airshipit.org/v1alpha1
       kind: KubernetesApply
       name: kubernetes-apply
   documentEntryPoint: ephemeral/initinfra

   Then the documentEntryPoint for executor will be prepended with
   docEntryPointPrefix and the path to the executor bundle will be
   manifests/site/test-site/ephemeral/initinfra

Change-Id: I29ec14378790d95b66c3ff1fe6120bb200f91a50
Relates-To: #356
2020-10-22 13:29:05 +03:00
Ruslan Aliev
0a1bb41e2d Simplify ShowProgress unit test
Due to variable CPU load on zuul site, there is a possibility that
progress bar will dump its intermittent state during ShowProgress
test execution. This patch simplifies a bit assertion logic so only
"Completed" state of progress bar will matter, possible intermittent
output will be omitted from assertion.

Change-Id: I5369bf57752df928c0bd9f223cfaa17f8f0b0018
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2020-10-21 17:34:13 -05:00
Zuul
46a0a79066 Merge "Uplift cli-utils from 0.18.1 to 0.20.6" 2020-10-21 22:10:27 +00:00
Zuul
113628336f Merge "Proxy config for control plane" 2020-10-21 18:37:35 +00:00
Sirajudeen
afe9121169 Uplift cli-utils from 0.18.1 to 0.20.6
* uplift of cli-utils had changes with signature of Applier.
  So had to update the impacted go code and cleanup the
  unwanted parameters.

Change-Id: I6f3018d1fd4cac2e1a328e50c44ad0f51bb0e16f
Closes: #367
2020-10-21 18:15:03 +00:00
Zuul
37ce87edfb Merge "Add timestamp for events" 2020-10-21 11:28:53 +00:00
Stanislav Egorov
71f04ed976 Proxy config for control plane
Along with the change to support proxy configuration for control plane
there is a change for replacement transformer to support arrays of strings.

The current implementation of cloud-init configuration for the control plane
based on KubeadmControlPlane object and uses an array of strings for commands.

Change-Id: Id0a49cc1a0fdbc392c7c7a56859b21737065b0d6
2020-10-20 21:38:18 -07:00
Zuul
d812b6c165 Merge "Introduce Replacement Transformer plugin container" 2020-10-19 18:51:49 +00:00
Zuul
ab6d9ed311 Merge "Support rotation of svc account tokens" 2020-10-19 15:41:32 +00:00
Vladislav Kuzmin
f9f8c43e8a Add timestamp for events
Relates-To: #339
Change-Id: Iec939e167b6ae3c72aa31e102407d0fffc370766
2020-10-19 18:04:57 +04:00
Guhan Eswaran
b7dd46c4e6 Support rotation of svc account tokens
This patchset introduces airshipctl command
- airshipctl cluster rotate-sa-token which basically rotates SA tokens

Previous work: https://review.opendev.org/#/c/749470/

Change-Id: Ibe932fa8d2831979e5b2ac2781f746e8ec2fdc3c
2020-10-19 07:06:58 +00:00
Ruslan Aliev
0c870e5244 Remove clustertype-related functions
We don't use clustertype anymore, so all the related functions must
be deleted or adjusted as well as appropriate config fields.

Change-Id: I3931fdc71d4318e916f8bbc2d94e062c9df5f641
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #349
2020-10-16 11:31:58 -05:00
Zuul
23224e57c5 Merge "Phase docs are targetPath + phaseRepo + phase.DocumentEntrypoint" 2020-10-16 15:02:04 +00:00
Dmitry Ukov
d783d71f05 Introduce Replacement Transformer plugin container
Relates-To: #341
Change-Id: I65a5b8cf3bcf94321fc02f240b1d8075bca45c0c
2020-10-16 16:00:56 +04:00
Vladimir Kozhukalov
dc68640389 Phase docs are targetPath + phaseRepo + phase.DocumentEntrypoint
Change-Id: I1d5ea75d1c19eb4ebaf37b28918ccde771bcef85
Relates-To: #356
2020-10-15 13:55:59 +03:00
Ruslan Aliev
a6363f1c1e Run image build command like a phase
We perform almost the same activities prior calling createBootstrapIso
function like we do that in phase executor, also image build command
now is techically outdated since it doesn't work because it fails with
"phase document was not found" error. This patch removes unnecessary
functions like GenerateBootstrapIso and runs image build command in
a phase way. Test coverage increases slightly (by 0.2%) by removing
partially duplicating code which was not tested properly. Minor bug
fixes included.

Change-Id: I545004cea721164838b296ae647a7651cde248ff
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2020-10-13 17:48:55 -05:00
Zuul
f92e8bd042 Merge "Replace PrimaryRepositoryName with PhaseRepositoryName" 2020-10-13 20:50:53 +00:00
Zuul
2b7ace99ff Merge "Migrate Replacement Transformer plugin" 2020-10-13 18:39:48 +00:00
Zuul
cb8be36fdb Merge "Implement JSON path filter for kyaml.RNode" 2020-10-13 17:22:26 +00:00
Dmitry Ukov
ca1a3a2d0b Migrate Replacement Transformer plugin
Plugin extended to support new kustomize plugin framework which
consider each plugin as a container

Change-Id: If55b7093f711401165b7d4fd3f5b1059fde464ff
Relates-To: #340
2020-10-13 20:43:55 +04:00
Kostiantyn Kalynovskyi
7095d09de2 Fix kubeconfig flag to be passed to executor
Change-Id: I6e9951785158cecfb952255426d8b5bb40be37ea
Closes: #366
Relates-To: #366
2020-10-13 01:07:49 +00:00
Kostiantyn Kalynovskyi
eddfc6338a Add check for executor ref in phase helper
Relates-To: #365
Closes: #365

Change-Id: I95251a0ef49436d86f6f882bf23a91ceb1b1a952
2020-10-12 13:41:48 -05:00