320 Commits

Author SHA1 Message Date
Zuul
6543f63ebf Merge "Add validation phases" 2021-04-28 03:26:02 +00:00
Zuul
c355b600d7 Merge "Enhance VersionsCatalogue schema" 2021-04-26 21:48:14 +00:00
Ruslan Aliev
31995eaf9d Add validation phases
This patch introduces ability to validate phases using kubeval.
Appropriate functionality was embedded into phase/plan validate
command.

Change-Id: I1e1ccae2b7e4948bdc97a199c96c07a3eb7292b2
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #503
Closes: #2
Closes: #19
2021-04-22 11:37:12 -05:00
Vladislav Kuzmin
014e24cd15 Add set -xe to deployment shell phase-helpers
This allows errors to be passed from a container to
the airshipctl itself. Without this flags container will never fail.

Relates-To: #517
Change-Id: I20254f868bd85af44980acc656ca0fb401779bbc
2021-04-21 18:31:47 +04:00
Zuul
fcfad3533a Merge "Add missing images in versions catalogue" 2021-04-21 02:55:31 +00:00
bijayasharma
a60ca7d85b Add missing images in versions catalogue
This commit adds missing images in versions catalogue
that are being used in manifest.

Change-Id: I0c2ee3fa2062cb0dbf7c843e1b5ed52f718429c8
Signed-off-by: bijayasharma <vetbijaya@gmail.com>
Relates-To: #498
2021-04-20 13:06:30 -04:00
Zuul
a4689a65dc Merge "Move kubectl calls to KRM toolbox pt.3" 2021-04-20 05:20:55 +00:00
Zuul
477f074aef Merge "Move kubectl calls to KRM toolbox pt.2" 2021-04-20 05:17:22 +00:00
Zuul
64d9fc71a3 Merge "Update hwcc image" 2021-04-20 04:13:52 +00:00
Zuul
9f7d7678ed Merge "Add labels to controlplane nodes" 2021-04-19 23:29:21 +00:00
Sreejith Punnapuzha
7167e1d2fe Update hwcc image
Update the hwcc image in version catalogue.

Signed-off-by: Sreejith Punnapuzha <Sreejith.Punnapuzha@outlook.com>
Change-Id: I9c3570891058d615332ab498d38a1b874f90f851
2021-04-19 17:38:12 -05:00
Zuul
cac8564b59 Merge "Switching to the approach with cleanup by selector" 2021-04-19 19:03:21 +00:00
Sreejith Punnapuzha
2c674bdb03 Add labels to controlplane nodes
This commit adds new label to controlplane node so that HCO works

Signed-off-by: Sreejith Punnapuzha <Sreejith.Punnapuzha@outlook.com>
Change-Id: I8cf3efc19bc4b78a6be04af5f28ad300990273e7
2021-04-19 11:44:03 -05:00
Vladislav Kuzmin
217c6fa8ce Move kubectl calls to KRM toolbox pt.3
Move kubectl calls to phases. These phases call KRM toolbox with
prepared shell scripts.

Change-Id: I588d0cfedc26903ae4389667b125fb58983febe9
2021-04-19 13:48:34 +04:00
Vladislav Kuzmin
d9d7f47012 Move kubectl calls to KRM toolbox pt.2
Move kubectl calls to phases. These phases call KRM toolbox with
prepared shell scripts.

Change-Id: Icec3ccfabaf6c0bb996308c35174fa0d6e825a48
2021-04-19 13:44:46 +04:00
Zuul
a0cfddab1b Merge "Remove unused empty directory from test-site/ephemeral" 2021-04-15 20:57:05 +00:00
Matthew Fuller
c62330999a Enhance VersionsCatalogue schema
Modifies the schema for the VersionsCatalogue CRD to allow
images to also be declared using the Helm-style format of
'repository' and 'tag' (or 'sha', 'digest', or 'hash').

Closes: #511
Change-Id: I9b22bb9c3ed814bf0d2b6f7dc1e540d9370eae7c
2021-04-14 20:24:46 +00:00
Alexey Odinokov
b927934b8c Switching to the approach with cleanup by selector
Previously we needed to delete each catalogue separatelly.
After bumping to new kustoimize 3.9.2 it's started to be
possible to use patching of several documents by selector [1],
that can be kind, name, label &etc

[1]
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/patchMultipleObjects.md
+
https://github.com/kubernetes-sigs/kustomize/issues/2945

Change-Id: Ic6a2d2a4716ab0304872c4aad196a7259e58aa53
2021-04-14 15:44:51 +00:00
Zuul
6ff615f987 Merge "Move kubectl calls to KRM toolbox pt.1" 2021-04-14 01:53:02 +00:00
Zuul
7ed59086fc Merge "Pin airshipctl/templater version" 2021-04-12 02:53:40 +00:00
Vladislav Kuzmin
eb6ccf0201 Move kubectl calls to KRM toolbox pt.1
Move kubectl calls to phases. These phases call KRM toolbox with
prepared shell scripts.

Change-Id: Iddf64c7df94c9d796b101bbb4fafb22a7b7621b7
2021-04-10 14:00:40 +04:00
Matthew Fuller
1c19b4d351 Extend NetworkCatalogue CRD schema
Extends the NetworkCatalogue schema to include additional fields
for link objects in the commonHostNetworking.links array.

Change-Id: I562a5da8a8083b816d7111e462607d8e5c862aa0
2021-04-09 20:11:00 +00:00
Roman Gorshunov
51a63bde91 Pin airshipctl/templater version
Pin airshipctl/templater stable version v2
in bootstrap manifests function.

Relates-To: #419

Change-Id: I54529db8eb9e7f1646ebccf0dcdfeb10e9c0e191
2021-04-09 18:15:43 +02:00
Sreejith Punnapuzha
c58a4177f8 Fix ssh key replacement
Correct the user for ssh in replacement

Signed-off-by: Sreejith Punnapuzha <Sreejith.Punnapuzha@outlook.com>
Change-Id: I48a04a8d9be1c05fe36b78c27c4fec2cfc7f4daa
2021-04-06 10:38:55 -05:00
Ruslan Aliev
dd3a9b416a Remove unused empty directory from test-site/ephemeral
It seems "stub" directory was created by mistake since it's empty
and has no relations in airshipctl code and manifests.

Change-Id: I1bb8b98d019ab02c9cdbb553ed5db6f99e560d0f
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2021-04-04 19:29:58 -05:00
Zuul
346196e6c1 Merge "Add qcow-bundle to base catalogues" 2021-04-03 18:07:07 +00:00
Vladislav Kuzmin
892bb6a16d Move deployment scripts from test-site to function
Change-Id: I35a83a4e3fbc60c0f25b3969d624bbc370f0a41b
2021-04-01 15:52:41 +00:00
Zuul
ea534c379f Merge "Add toolbox krm function" 2021-04-01 07:08:19 +00:00
Zuul
030bb123d8 Merge "Add toleration for taint in helm-chart-collator" 2021-04-01 06:45:20 +00:00
Sreejith Punnapuzha
494e90df90 Add toleration for taint in helm-chart-collator
This commit adds toleation for taint master:NoSchedule so that
helm-chart-collator deployment will be successfull

Signed-off-by: Sreejith Punnapuzha <Sreejith.Punnapuzha@outlook.com>
Change-Id: I4c5115a57596984247f7540d2acefd315ef99da4
2021-03-31 16:28:27 +00:00
Vladislav Kuzmin
d5c0377207 Add toolbox krm function
Add krm function to execute bash scripts inside container.

Closes: #494
Change-Id: I3074a27a022f65e87f190ab5a39c252f225ca1fa
2021-03-31 13:28:16 +00:00
Sirajudeen
e437d5456b Use SSH key to access target & worker node.
* Private and public key will be generated during
  `phase run generate-secrets`
* generated public key will be used to replace the
  place holders in the manifests and the same will be deployed
  on nodes.
* This can be used to prepare inventory for
  Hostconfig operator to manage nodes.

Depends-On: https://review.opendev.org/c/airship/airshipctl/+/783718

Change-Id: I780f6f6acce3df2fb3ba2f94e732fe34ddfb0454
2021-03-31 13:00:33 +00:00
Matthew Fuller
7222467df3 Add validation for catalogues
This change ensures that catalogue CRs (i.e. networking,
versions) are validated when running validate_docs script.

Also fixes:
* problem encountered with the creation of the ironic-vars
ConfigMap when a non-string data type was used as the
replacement target value.
* amends VersionsCatalogue schema to allow an optional
'ipam-manager' object in capi_images, necessitated by
a change to the capm3 function[0].

[0] https://review.opendev.org/c/airship/airshipctl/+/780297

Closes: #476
Change-Id: Idd05eb046e411b757b7d4f7b21a9b89b6cc51bb6
2021-03-31 02:44:07 +00:00
Zuul
3749a8fe50 Merge "Allow to pass iso url from env for remotedirect-ephemeral phase" 2021-03-27 08:53:01 +00:00
Zuul
9f0c254733 Merge "Changing personal images with upstream for Sops" 2021-03-27 07:47:41 +00:00
Andrii Ostapenko
993544d2ac Add qcow-bundle to base catalogues
Change-Id: I200b7f58070b001dec658c2c02bf70b602a2e620
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2021-03-27 03:38:27 +00:00
Zuul
aa76ebab3f Merge "Update hwcc replacement target name" 2021-03-26 17:16:43 +00:00
Alexey Odinokov
988cd9f99b Changing personal images with upstream for Sops
During our work we used personal images, because
there was no upstream available. Now when the
upstream is avaialbe - we're changing all urls to it.

Change-Id: I6e8344723e343c4396304d68908fae328d139434
2021-03-26 16:17:27 +00:00
Andrii Ostapenko
0c14bde17e Allow to pass iso url from env for remotedirect-ephemeral phase
This commit introduces an ability to consume
AIRSHIPCTL_EPHEMERAL_ISO_URL environment variable. Also
it switches from phase patch to catalogue and implements
corresponding replacement transformer for remotedirect
variables.

With this code isoURL catalogue value is only used in an
absense of AIRSHIPCTL_EPHEMERAL_ISO_URL.

Airshipctl does not control how an iso is served leaving it on
discretion of deployment pipeline, also iso contents are fully
determined by image-builder image and manifests, thus this change
does not violate GitOps principles.

Change-Id: Ie6eebe0f0502b2f8e41b081281336299c63f5e4d
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2021-03-26 16:16:21 +00:00
Zuul
c7516c3f05 Merge "Change default worker count (capd)" 2021-03-25 22:01:44 +00:00
Zuul
929b11b8bc Merge "Bump timeout for controlplane phases" 2021-03-25 19:11:40 +00:00
Zuul
4e296dacab Merge "Don't fail if docEntryPoint isn't defined for Container exec" 2021-03-25 08:49:25 +00:00
Zuul
76e345b862 Merge "Pin krm function calls" 2021-03-24 21:34:06 +00:00
Sean Eagan
299b2833b2 Pin krm function calls
This pins krm function calls to version `v2` which represents [0] [1] the latest
2.x.x semantic version. If we need to make breaking changes to any krm functions,
that can now be done by incrementing their major version and thus not
breaking these references.

[0]: https://review.opendev.org/c/airship/airshipctl/+/762924
[1]: https://review.opendev.org/c/airship/airshipctl/+/780875

Closes: #419
Change-Id: I6cf6519511c77da6cac7e46a6b56ea338bcf150c
2021-03-24 09:28:54 -05:00
Ruslan Aliev
395aa537ca Don't fail if docEntryPoint isn't defined for Container exec
Input for this executor could be empty, so we have to handle
ErrDocumentEntrypointNotDefined error more intelligently.

Change-Id: I73e0f770e64cead7dbbbce2af2b7a2ebd323b83b
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #485
Closes: #485
2021-03-23 22:04:40 -05:00
Zuul
104d650a36 Merge "Remove obsolete directory in manifests" 2021-03-24 00:46:49 +00:00
Rishabh Kumar Jain
a4548cb9ea Change default worker count (capd)
* change default worker count to 2
      from 1
    * remove usage comments to scale workers
      in deployment script

Change-Id: Ic880deea7d3ff104cb2af39b1b81c53a331d353f
2021-03-23 14:10:48 -07:00
Battina, Sai (sb464f)
a7ea1dddaf Update hwcc replacement target name
Change-Id: I91d496d31b3c0391cb04eba25f0b5139a1a7a2c5
2021-03-23 14:38:00 -05:00
Zuul
bb37ba1382 Merge "SOPS improvements" 2021-03-23 17:41:00 +00:00
Alexey Odinokov
a7e332f9ec SOPS improvements
Added 2 phases:
1. secret-reencrypt - This phase can be used to
reecnrypt the existing secrets with new key.
To do so SOPS_IMPORT_PGP must contain
old public key and new private key (but
may also include other data).
SOPS_PGP_FP must contain fingerprint of
new private key.

2. secret-show - This phase may be useful for some users
that need to see what generated by secret-generate phase.

Disabled SOPS debug by default.
To enable it back run commands with
env variable DEBUG_SOPS_GPG=true

Change-Id: Id7fe13d6943d386577df25dba4aaa83e62e58980
2021-03-19 21:31:25 +00:00