886 Commits

Author SHA1 Message Date
Ian Howell
1d09fa090c Add auth to template for 22_test_configs.sh
This adds the following vairables to be used with the 22_test_configs.sh
script, so that it can generate configs which have access to private
repos.

* AIRSHIP_CONFIG_MANIFEST_REPO_AUTH_TYPE
* AIRSHIP_CONFIG_MANIFEST_REPO_AUTH_KEY_PASSWORD
* AIRSHIP_CONFIG_MANIFEST_REPO_AUTH_KEY_PATH
* AIRSHIP_CONFIG_MANIFEST_REPO_AUTH_HTTP_PASSWORD
* AIRSHIP_CONFIG_MANIFEST_REPO_AUTH_SSH_PASSWORD
* AIRSHIP_CONFIG_MANIFEST_REPO_AUTH_USERNAME

Relates-To: #627

Change-Id: I791e45eb6747e76f0e69a7cdcfde90db570fa1d1
2021-09-03 09:16:36 -05:00
Zuul
f74a935df6 Merge "Implement fetching remote refs for document pull" 2021-08-10 22:07:46 +00:00
Zuul
5be95e2e82 Merge "Use kube-webhook-certgen image from quay.io" 2021-07-31 00:16:53 +00:00
Zuul
c8434994bd Merge "Add possibility to specify 0 timeout via CLI options" 2021-07-30 21:57:47 +00:00
Ruslan Aliev
38849e63d1 Use kube-webhook-certgen image from quay.io
Allows to avoid docker pull limit issue.

Change-Id: Ic3cb4be1945f95962a185bdfd8d50c6e7746d2e4
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2021-07-30 16:12:51 -05:00
Zuul
2219c810b8 Merge "Switching airshipctl and krm-functions to kustomize 4.2.0" 2021-07-29 19:51:17 +00:00
Ian Howell
cb080a2066 Implement fetching remote refs for document pull
This commit adds the `fetch` and `fetch.remoteRefSpec` fields to the
configuration for repositories, allowing the capability to fetch
references from a remote. This is useful for pulling specific gerrit
patchsets.

This also changes `checkout.remoteRefSpec` to `checkout.refSpec`, and
implements the logic required to checkout to an arbitrary ref.

Closes: #616

Change-Id: Ie21a6c2a7a7ac92ed3c05fef7e5683203cd62e45
2021-07-29 10:16:27 -05:00
Zuul
0ff049115d Merge "Move clustetctl to KRM" 2021-07-28 22:06:50 +00:00
Alexey Odinokov
37c2854cce Switching airshipctl and krm-functions to kustomize 4.2.0
Reworked build process of dependent krm functions
to use the latest airshipctl

Change-Id: If4c7f992123b86442980f381ae69fb003f4851e3
2021-07-22 17:06:32 +00:00
Sirajudeen
7974e041c5 Regenerate deepcopy with recent changes
* updated README to use `make generate` option to generate deepcopy file.

Change-Id: I43f3ebd970fb48671fe936bf184eaed2a15a2389
2021-07-21 22:13:46 +00:00
Ruslan Aliev
ab55bc5e86 Move clustetctl to KRM
Change-Id: I79ccb7b7c92f27cf6fdaaa540d86db80a0a62b41
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Closes: #568
2021-07-17 22:06:43 -05:00
Ruslan Aliev
d1abe6e1ea Decouple implementations and unit tests in container module
Unit test should follow black-box approach.

Change-Id: I98c46c613a73b539f79d8dfe99cd73592792536d
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Closes: #561
2021-07-16 21:02:03 -05:00
Zuul
0c36a47ee3 Merge "adding installation registry to version catalogue" 2021-07-16 17:16:13 +00:00
Graham Steffaniak
edb2aae971 Validate clustermap parent-child dependancy
Add ValidateClusterMap() method to confirm there are no parent-child
dependancy issues for any clustermaps.

Closes: #481
Change-Id: Ifb57b026933909a4350d71353adca23a42440a48
2021-07-13 20:38:19 +00:00
shon phand
e9f35dabe8 adding installation registry to version catalogue
* modified image_repositories section schema in version catalogue.
  new type : type map[string]ImageRepositorySpec
  old type : string.
* replaced registry attribute in Installation resource from
  version-catalogue image_repositories section.
* updated old attributes from  image_repositories section as per new
  schema.

Closes: #590
Change-Id: I2159e23b8a63b5f48d2f4e79b56c2bc021646c77
2021-07-12 16:46:12 +00:00
Zuul
3544c96249 Merge "Remove secret generate cmd and its implementation" 2021-07-10 07:43:58 +00:00
Zuul
3b49a3af59 Merge "Remove cluster resetsatoken subcommand" 2021-07-02 19:13:23 +00:00
Zuul
63492f7437 Merge "Remove cluster check-expiration subcommand" 2021-07-02 19:13:19 +00:00
Ruslan Aliev
583fda5dfe Add possibility to specify 0 timeout via CLI options
Currently zero timeout won't be applied if specified via CLI
options of commands plan run and plan run. This patch fixes it.

Change-Id: Icad06ae8c71d78dc81821e2c5b0adb486d547fda
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #566
Closes: #566
2021-06-29 01:26:34 -05:00
Zuul
d844fdceca Merge "Generate additional CRDs from API types" 2021-06-29 00:15:35 +00:00
Ruslan Aliev
f5daa32ef9 Remove secret generate cmd and its implementation
This command is obsolete and can be safely removed. All the secrets
functionality now is part of SOPS krm function and phases.

Change-Id: Ia8244e51aa8c28f1ac07734e4f4afc6ee59e4021
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #588
2021-06-28 17:49:08 -05:00
Ruslan Aliev
ada5d6f131 Remove cluster resetsatoken subcommand
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
2021-06-28 17:45:30 -05:00
Ruslan Aliev
7a89572149 Remove cluster check-expiration subcommand
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
2021-06-28 17:43:27 -05:00
Kostiantyn Kalynovskyi
df55f50cb6 Allow rendering by label for replacement transformer
Change-Id: Ie2d68d735cb2b95987f5c95cbc024d608696f028
2021-06-28 18:42:49 +00:00
Zuul
261a0d4b8a Merge "Add flags to airshipctl get-kubeconfig cmd" 2021-06-25 21:23:51 +00:00
Matthew Fuller
52c5aedc63 Generate additional CRDs from API types
'make manifests' attempts to generate all airshipctl API types,
but several types throw errors and the resulting CRDs can't be
properly generated. This change:

- updates the controller-gen version to pull in a bug fix for the
  error 'map values must be a named type, not *ast.StarExpr'
- modifies the Templater type's Values member to be of type JSON
  since controller-gen does not support map[string]interface{},
  and unmarshals it separately in the templater itself
- adds 'image_repositories' to the VersionsCatalogueSpec struct
  to ensure it doesn't get deleted from the schema when manifests
  get regenerated
- checks in generated copies of all CRDs from airshipctl's API
  types, not just catalogues, to be used for validation

Closes: #574
Change-Id: I89a12cfd307a08da9aaec9773eac01169ea43ace
2021-06-25 19:10:25 +00:00
bijayasharma
622d45f3bd Add flags to airshipctl get-kubeconfig cmd
* This commits add --file and --merge flags to
  airshipctl get-kubeconfig cmd

Change-Id: I919d4f068d3ef9bcda6b3a7c9aeb0826a4e5c0d4
Signed-off-by: bijayasharma <vetbijaya@gmail.com>
Relates-To: #495
Closes: #495
2021-06-23 13:41:14 +00:00
Kostiantyn Kalynovskyi
a121a88a97 Add airship container cleanup
Closes: #546

Change-Id: I623694327bd6cc7dea616c109a7dcb7d97420be9
2021-06-22 14:49:53 +00:00
Zuul
8d882fcc85 Merge "Enable tolerance to apply timeout errors" 2021-06-19 03:15:30 +00:00
Ruslan Aliev
5fc39a8b54 Enable tolerance to apply timeout errors
This commit allows to tolerate up to three timeout errors that
came from poll requests before interruption of apply process.

Change-Id: I6cb95eba908e62ee44be3338c263b20c7dffc34b
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #579
Closes: #579
2021-06-18 14:17:17 -05:00
Ruslan Aliev
035e371a5e Allow to setup timeout for get kubeconfig request
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
2021-06-13 17:29:10 -05:00
Ruslan Aliev
bc9f97ff2e Embed validation cfg into phase and plan definition
* validation config is now part of airshipctl api
 * additional CRD locations can be only kustomize entrypoints
 * changed mechanism to call document-validation executor to allow
   to pass validation config from phase or plan
 * kubeval version pinned to the latest 0.16.1
 * default k8s version to validate against uplifted to 1.18.6
 * default URL with k8s schemas changed to more updated and reliable

Change-Id: Ifb24be224d5f0860d323a671b94e28a86debc65b
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Closes: #563
2021-06-11 15:37:38 +00:00
Zuul
575023cfcf Merge "Update metadata.yaml to kubernetes style" 2021-06-09 18:06:36 +00:00
Zuul
f7f5cc3513 Merge "Update ephemeral-bmc-secret to use base64 data" 2021-06-09 18:04:13 +00:00
Zuul
55aea51f70 Merge "Move CAPI resources to target-infra namespace" 2021-06-09 17:23:36 +00:00
Graham Steffaniak
97377236ec Update ephemeral-bmc-secret to use base64 data
Transform stringData into base64-enc data manually so the
annotation won't remain from the stringData.

Closes: #424
Change-Id: I4bcfd57601d9199307c749e8e6deb5ee5445d821
2021-06-07 15:17:17 -05:00
siraj.yasin
f45ece8294 Update metadata.yaml to kubernetes style
* Define GVK for metadata.yaml
* Added supoorting type and registered the kind 'AirshipMetadata' to
  runtime scheme
* Used document object to read metadata instead of reading it as config

Relates-To: #530

Change-Id: I748cd0921ba7bb04ca6fb2999294776e6803ed3e
2021-06-04 03:34:31 +00:00
Matthew Fuller
75429db630 Move CAPI resources to target-infra namespace
Moves CAPI resources in ephemeral cluster from the 'default'
namespace to a new 'target-infra' namespace.

Closes: #551
Change-Id: I419a71baa8e05e7b57b38234d15b955b36951b40
2021-06-03 23:40:00 +00:00
Vladislav Kuzmin
16da661959 Switch gating deployment to phase plan
Add all needed phases for deployment to deploy-gating
phase plan.

Relates-To: #517
Change-Id: I9d5af24b0877d90ab1ba24b31cca6ec7127e0f1d
2021-06-03 19:41:05 +04:00
Ruslan Aliev
0c4d8b80bf Allow to configure timeout for k8s client
It would be helpful to have a possibility to configure Timeout
field, as well as others allowed.

Change-Id: I1e0e895b7ca6a17e86a6ad36f405e2538775cbbb
Closes: #553
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2021-05-28 00:28:30 -05:00
Ruslan Aliev
16e5e9f06a Use proper object to create cmdutil factory
MatchVersionFalgs object should be used instead as cli-utils
library suggests, particularly it will allow us to avoid the
issue when airshipctl apply process stuck after Unknown state.

Change-Id: Id6d6ca69a67cb4a500b150a00df538ffffa11eb3
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Closes: #552
2021-05-27 12:24:39 -05:00
Zuul
cc5221972a Merge "Update Validation Logic for Clusterctl Move" 2021-05-26 04:03:58 +00:00
Zuul
1f5dbf8645 Merge "Implement render method for container exec" 2021-05-24 21:32:08 +00:00
Zuul
dc8c241c31 Merge "Show the context name and current context using get-context command" 2021-05-24 21:31:52 +00:00
Matthew Fuller
b69a641940 Add ntp to network catalogue
Adds an ntp object to the NetworkCatalogue schema
and populates default ntp servers into the networking
base catalogue. Also adds replacement rules in:

* function/k8scontrol/replacements
* function/workers-capm3/replacements

Change-Id: I5dedda563c8825c283e7ba846bedb0b282459d41
2021-05-19 15:13:34 +00:00
Ratnopam Chakrabarti
1cd6c2842a Update Validation Logic for Clusterctl Move
Removed the namespace condition check from the validation of 'Move'.
This is to allow validation of docker and cloud provider test site
manifests that do not use namespace.

Relates-To: #503
Change-Id: I39544ba9c9c13ff5a6519b7afd8844629e60087e
2021-05-19 11:09:25 -04:00
chumkid
02d2fc7e4a Show the context name and current context using get-context command
The command "airshipctl config get-context" will display the name of the contexts as well as the current context name.

Relates-To: #475
Change-Id: I8234d74f6b98869e27e4974a54b68230d8be8565
2021-05-19 13:42:22 +05:30
Zuul
e38f4fbf4c Merge "Use site-wide kubeconfig only on demand" 2021-05-18 19:06:09 +00:00
Zuul
a9dcdaaf47 Merge "Use bundle mock for k8s applier tests" 2021-05-18 17:49:49 +00:00
Zuul
e12b1e2fa6 Merge "Invoke validation container directly via ClientV1 package" 2021-05-18 02:10:56 +00:00