Commit Graph

24 Commits

Author SHA1 Message Date
Phil Sphicas 416eff4e52 Armada client: Enable TCP keepalives
This change enables TCP keepalives in the transport adapter used by the
Armada client.

Change-Id: I44d9fe0f29dfb1c00250a76452f4db610ea377ad
2022-03-14 13:40:23 -07:00
Sean Eagan 68747d0815 Use helm 3 CLI as backend
Helm 3 breaking changes (likely non-exhaustive):

- crd-install hook removed and replaced with crds directory in
  chart where all CRDs defined in it will be installed before
  any rendering of the chart
- test-failure hook annotation value removed, and test-success
  deprecated. Use test instead
- `--force` no longer handles recreating resources which
  cannot be updated due to e.g. immutability [0]
- `--recreate-pods` removed, use declarative approach instead [1]

[0]: https://github.com/helm/helm/issues/7082
[1]: https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments

Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: I20ff40ba55197de3d37e5fd647e7d2524a53248f
2021-10-04 21:40:26 -05:00
Sean Eagan 8c5e5c7d24 Remove unused commands
This removes release rollback/delete functionality. This functionality
was likely not being used and thus was likely not working.

This primary driver for this change is to ease introduction of Helm 3
support. Particularly to avoid having to make API changes related to
the namespacing of helm releases in Helm 3.

This also removes the swagger api documentation as it was not
maintained.

Change-Id: I7edb1c449d43690c87e5bb24726a9fcaf428c00b
2021-09-30 17:22:16 -05:00
DODDA, PRATEEK REDDY (pd2839) bbfe30e4a4 Address PEP8 Failures in Armada
Flake8 version recently updated to include new PEP8 rules. Some of
the codebase is not compliant with the new rules.

Change-Id: Ieb9de200535b6e3fd743e1c0f2e851e81cae79f3
2020-05-29 18:02:11 -05:00
HUGHES, ALEXANDER (ah8742) b787c418e3 Standardize Armada code with YAPF
From recently merged document updates in [0] there is a desire to
standardize the Airship project python codebase.  This is the effort
to do so for the Armada project.

[0] https://review.opendev.org/#/c/671291/

Change-Id: I4fe916d6e330618ea3a1fccfa4bdfdfabb9ffcb2
2019-07-31 10:16:15 -05:00
Smruti Soumitra Khuntia 6dd190c9d9 End user logging for audit traceabilty
Changes for Client to support new end user header
and add end user name to logs.

Change-Id: If1a43197c59cac60caca2a517bcf053fa33f82c4
2019-04-04 13:18:44 +00:00
Andreas Jaeger cb737354f0 Fix Flake8 3.6.0 errors
Flake8 3.6.0 now warns about both line break after and *before* binary
operator, you have to choose whether you use W503 or W504. Disable the
newer W504.

Fix "F841 local variable 'e' is assigned to but never used".

Handle warnings about invalid escape sequence in regex.

Handle invalid escape sequence in string.

Change-Id: I68efbde4e9dd2e6e9455d91313eb45c9c79d35ce
2018-10-26 09:23:42 -04:00
Zuul b170daeea7 Merge "fix: Use superior oslo.policy authorize over enforce" 2018-10-23 19:14:17 +00:00
Vladyslav Drok 95fd341b97 Add viewer rule to armada API
Viewer will be able to do GET Tiller release and Tiller status
requests armada API defines. In addition, this change also
allows doing POST validate manfest request to a user with
viewer role.

Change-Id: I903ab656de1c6fdf979a193b1842dbd0842451d6
2018-10-16 17:20:25 +00:00
Felipe Monteiro e573cf1ad5 fix: Use superior oslo.policy authorize over enforce
`oslo.policy` supports both enforce and authorize. authorize is
stricter because it'll raise an exception if the policy action is
not found in the list of registered rules. This means that attempting
to enforce anything not found in ``armada.common.policies`` will error
out with a 'Policy not registered' message and 403 status code.

This problem manifests itself through such cases: [0]

Please reference the oslo.policy docs on authorize [1] and
enforce [2] to better understand the discrepancy between the
two.

[0] https://review.openstack.org/#/c/610117/1
[1] feac3dcbfe/oslo_policy/policy.py (L960)
[2] feac3dcbfe/oslo_policy/policy.py (L792)

Change-Id: I5b0a28a2b5fb4dff150f13a56013a7a9b694c756
2018-10-15 20:24:51 +01:00
Roman Gorshunov 09f099e5b2 Fix: various documentation and URL fixes
1) UCP -> Airship
2) readthedocs.org -> readthedocs.io (there is redirect)
3) http -> https
4) attcomdev -> airshipit (repo on quay.io)
5) att-comdev -> openstack/airship-* (repo on github/openstack git)
6) many URLs have been verified and adjusted to be current
7) no need for 'en/latest/' path in URL of the RTD
8) added more info to some setup.cfg and setup.py files
9) ucp-integration docs are now in airship-in-a-bottle
10) various other minor fixes

Change-Id: I1e2d133a701dc2dade5bfcbdab5c0950cbe7eed5
2018-09-24 12:53:27 +02:00
Marshall Margenau f235512d57 Adding yapf config, plus formatted code.
- Adding yapf diff to pep8 target
- Adding yapf tox target to do actual format

** The rest of this PS contains formatted code only, no other changes

Change-Id: Idfef60f53565add2d0cf65bb8e5b91072cf0aded
2018-06-22 14:56:04 -05:00
DaeSeong Kim caeb4b623a Fix to pass a manifest file to the armada server
This PS changes the 'apply' cli to generate documents object from
a manifest file and pass it to the armada server.

Change-Id: I19241e2aa0b2c82dfbc043ba8ad8e0482922ff5c
2018-06-12 00:53:03 -07:00
Sean Eagan 571c0b77f9 Add command to rollback release to CLI and API
This adds a command to the CLI and API to rollback a release name to a
specified version.

Change-Id: Ie1434da42ccc75c658b7bde7164b3f4c909be7c4
2018-06-06 09:40:31 -05:00
Marshall Margenau 3430283865 feat(logging): Enhance logging and update grpcio
Enhance request logging (and scrub sensitive headers)
Enhance Tiller logging
Update grpcio, unpin from 1.6.0rc1

Plus a couple typo fixes
Plus a couple unused vars

Change-Id: I8afd679f6716c6e1af234a59ac44ba1fdc73cdc8
2018-03-09 11:36:57 -05:00
Bryan Strassner 7a2ba22ab1 [390136] Add timeout options to Armada client
Allows for timeouts to be specified for each Armada client call,
and sets a more reasonable default for connect timeout of 20 seconds
instead of 3600 seconds.  Read timeout default remains at 3600s

Change-Id: I6bb04a6c8d55db4b98310f62ea6f037b3efdde24
2018-03-05 18:02:07 -06:00
Dae Seong Kim 73be096cea [Bug] Fix to setup policy
setup_policy() method is not working because it is outside of
decorator. So the api server always runs with default policy
even policy.yaml file exists.

Change-Id: I2c70b0444cf838a03fa4e3a0a79cd9e137f153c6
2018-02-21 22:38:11 -08:00
Marshall Margenau e1b64d200b style(armada): quality of life and cleanup
- adding .editorconfig file
- minor cleanup in various files related to .editorconfig
- typos, whitespace, etc.
- other general housekeeping items on the codebase

Change-Id: I104f8dcb06aafb180da12f7ee4c0ded41fc07b9d
2018-02-12 10:27:11 -05:00
Felipe Monteiro 093b5d2296 bug(manifest): Allow specific manifest to be specified
This PS allows users to specify the manifest file to use
by the Armada handler by introducing a new flag called
`target_manifest`. This flag was added to the API and
CLI.

A foundation of unit tests for the manifest handler
is included in this PS. Most of the coverage is aimed
at checking the various success and failure cases
surrounding the new target_manifest feature.

Also updates documentation to convey information about
the new flag and clean up some documentation formatting
inconsistencies and typos.

Change-Id: I1d5a3ecc1e99b6479438d0ee5490610178be34fe
2018-01-25 16:29:18 -05:00
Marshall Margenau ae86aeae24 fix(api): Update old endpoint to /validatedesign
- Updating old /validate endpoints to reference the new endpoint at /validatedesign.
- Update docs to reflect /validatedesign and fix error in description.

Change-Id: Ie1fa4e4584c81373fe193b2b2f83cd96ff571437
2018-01-08 16:12:02 -06:00
Roadrunner2058 d383e772fd feat(yaml): Support document references
This allows the user to apply and/or validate a manifest using
either a filepath (as before) or URL.

Addition by sh8121att:

- Create a general document resolver class to handle local paths
  and URIs
- Allow multiple filenames and combine them into a single document
  set
- Change API to allow for passing document reference URIs to be
  resolved server-side rather
- Update validation API to conform to UCP specification
- Dockerfile updates to speed up build
- Fix unit tests

Closes #96

Change-Id: I5a57779f10d1b63ffc161a14afec851a34ae9efe
2018-01-08 13:39:26 -06:00
Felipe Monteiro 4b3d843f04 bug(tests): Unskip Armada API unit tests
This PS sets the foundation for unskipping Armada API unit tests
by making necessary framework changes where necessary as well
as test refactoring so that the tests not only can be unskipped
but also execute successfully.

However, until a feature-rich testing framework is in place, it's
not possible to do end-to-end testing as mocking is currently used
to stub out Tiller API.

Negative RBAC tests will be added in a follow-up.

Included in this PS:
  - policy fixture for asserting that expected policies are enforced
  - unit tests for tiller/armada API
  - test_utils module

Change-Id: I2f454b27b014875bc35fd706f7c0d05364ce562a
2017-12-14 17:02:50 -04:00
gardlt 7b26e59422 feat(cli): using-click-framework
- using click framework
- added api client
- allow interactions between code and service endpoints
- documention on the command line
- updated gitignore

Change-Id: Ibe359025f5b35606d876c29fa88e04048f276cc8
2017-11-02 20:59:57 +00:00
gardlt bb26131ce2 feat(api): policy enforcement and api standard
- enhanced logging
- created base structure
- updated docs
- PasteDeploy auth
- Oslo Policy

Closes #107

Change-Id: I805863c57f17fcfb26dac5d03efb165e4be49a4e
2017-09-20 21:54:39 +00:00