Commit Graph

112 Commits

Author SHA1 Message Date
Mike Graves
7988daff93 Add .gitignore to downstream build files (#208)
This is required for ansible-lint.
2023-11-30 06:11:26 +00:00
Mike Graves
408eae11ae Relax the python version in downstream build (#205) 2023-11-17 16:40:25 +00:00
Mike Graves
5244611fa5 Update owners file (#197) 2023-11-15 18:39:37 +00:00
Bikouo Aubin
a63e5b7b36 Update CI - Continue work from #195 (#202)
* Upgrade Ansible and OKD versions for CI

* Use ubi9 and fix sanity

* Use correct pip install

* Try using quotes

* Ensure python3.9

* Upgrade ansible and molecule versions

* Remove DeploymentConfig

DeploymentConfigs are deprecated and seem to now be causing idempotence
problems. Replacing them with Deployments fixes it.

* Attempt to fix ldap integration tests

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Move sanity and unit tests to GH actions

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Firt round of sanity fixes

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Add kubernetes.core collection as sanity requirement

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Add ignore-2.16.txt

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Attempt to fix units

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Add ignore-2.17

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Attempt to fix unit tests

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Add pytest-ansible to test-requirements.txt

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Add changelog fragment

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Add workflow for ansible-lint

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Apply black

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix linters

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Add # fmt: skip

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Yet another round of linting

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Yet another round of linting

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Remove setup.cfg

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Revert #fmt

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Use ansible-core 2.14

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Cleanup ansible-lint ignores

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Try using service instead of pod IP

* Fix typo

* Actually use the correct port

* See if NetworkPolicy is preventing connection

* using Pod internal IP

* fix adm prune auth roles syntax

* adding some retry steps

* fix: openshift_builds target

* add flag --force-with-deps when building downstream collection

* Remove yamllint from tox linters, bump minimum python supported version to 3.9, Remove support for ansible-core < 2.14

---------

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Mike Graves <mgraves@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
2023-11-15 17:00:38 +00:00
Gonéri Le Bouder
cb796e1298 remove myself from OWNERS_ALIASES (#189) 2023-04-12 09:43:11 -04:00
Alina Buzachis
e9c891c5c2 Deprecate the openshift inventory plugin (#186)
* Deprecate the openshift inventory plugin

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Fix indentation

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Update docs

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

---------

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
2023-02-07 10:20:58 -05:00
Bikouo Aubin
81339235c7 Release 2.3.0 (#184) (#185) 2023-02-03 19:21:03 +01:00
Bikouo Aubin
f94eabffa1 update collection with latest feature from kubernetes.core (#181)
* Rebase code with kubernetes.core stable-2.4
2023-02-03 07:57:24 +01:00
Mike Graves
499863fa27 Fix example docs for openshift_auth (#182) 2023-01-26 10:20:49 -05:00
Mike Graves
5834e32c73 Add missing default values in docstrings (#180)
* Add missing default values in docstrings

These are needed for milestone (2.15) sanity tests.

* Add changelog fragment
2023-01-24 11:42:15 -05:00
Bikouo Aubin
5aa63e1b07 openshift_auth - fix discard token (#178)
* openshift_auth: when revoking token, compute the right name of the openshift resource to delete from token name

* conditional check to revoke token
2023-01-12 10:53:42 -05:00
Bikouo Aubin
d7f8aa537a add pytest-forked in test-requirements.txt (#179) 2022-12-01 12:28:01 -05:00
Mike Graves
1691951788 Update for Ansible 2.15 sanity tests (#173) 2022-09-22 15:38:20 +02:00
Bikouo Aubin
ed9fb196f9 Openshift Build modules (#134)
* Openshift Build modules: Start, Prune

* add openshift adm prune builds to ansible-test

* fix sanity for downstream

* sanity ignore

* Remove 2.6 sanity ignores for ansible 2.13 and 2.14

* update code review

* update 2 - code review
2022-08-12 13:56:19 +00:00
Bikouo Aubin
1819975498 Fix sanity tests (#172)
* Fix sanity tests
2022-08-11 18:14:40 +02:00
Mike Graves
01c257ce76 Fix sanity failures for docs on Ansible 2.13 (#167) 2022-05-13 15:59:25 +02:00
Mike Graves
5545c0f9ae Initialize OpenshiftGroupsSync attributes early (#165)
* Initialize OpenshiftGroupsSync attributes early

The fail_json() method calls close_connection(), but this can fail when
the python-ldap library is not installed as close_connection() gets
called before the __ldap_connection attribute has been defined.

* Use already defined virtualenv_command

* Fix tests

* Add changelog fragment
2022-05-12 21:13:59 +00:00
Mike Graves
15fff541b1 Update test dependency (#162) 2.2.0 2022-05-06 09:50:33 -04:00
Mike Graves
cfbbbb3be1 Release 2.2.0 (#161) 2022-05-06 06:57:01 -04:00
Mike Graves
ab83a185f5 Fix integration tests for k8s 2.3 (#159)
* Fix integration tests for k8s 2.3

Previous to
https://github.com/ansible-collections/kubernetes.core/pull/408 an
attempt to list resources for which the user was not authorized resulted
in an unhandled exception. The task now does not fail, but instead
reports the error message.

* try to fix sanity

* Fix tests

* fix tests

* fix tests

* Revert change to downstream build
2022-05-05 14:11:35 -04:00
Mike Graves
e69c88ae30 Upgrade python version on prow container to 3.9 (#156)
* Upgrade python version on prow container to 3.9

* Increase integration time out

* Set build python version

* Fix typo
2022-05-03 15:19:39 -04:00
Mike Graves
3381806d39 Add action groups (#152)
* Add action groups

* Add changelog fragment
2022-05-02 15:26:52 -04:00
Bikouo Aubin
b2d9e78b8e add step to prepare downstream collection (#154)
* add step to prepare downstream collection

* fix header generation

* update downstream_fragments.py
2022-04-29 09:22:46 -04:00
Mike Graves
0290391446 Copy sanity ignores from 2.13 to 2.14 (#147) 2022-04-13 09:42:53 -04:00
jbpratt
80e2692db2 fix kubeconfig flag for newer versions (#142)
backwards compatible change:

```
> podman run -it --rm openshift/origin-cli:v3.11.0 oc --kubeconfig
Error: flag needs an argument: --kubeconfig
```

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2022-03-04 11:21:54 -05:00
Paul Czarkowski
8aeffa3872 fix ocp auth adding / to oauth discovery url (#140)
* fix ocp auth adding / to oauth discovery url

* fix space after comma

* add changelog fragment

* Convert line endings

Co-authored-by: Mike Graves <mgraves@redhat.com>
2022-02-22 13:28:51 -05:00
abikouo
fc4a979762 openshift adm prune images (#133) 2022-01-24 09:46:23 -05:00
abikouo
0a1a647e37 openshift adm group sync/prune (#125) 2022-01-20 11:23:30 -05:00
abikouo
eb11821b3c enable unit testing (#135)
* enable unit testing

* Update test-requirements.txt

* Update test-requirements.txt
2022-01-10 17:25:11 +01:00
abikouo
39cb9a0981 openshift admin prune deployments (#129)
* openshift admin prune deployments

* update test

* update
2021-11-30 16:39:37 +01:00
abikouo
496cdba4e8 openshift admin prune auth (#130)
* openshift admin prune auth

* update change scope
2021-11-30 14:16:22 +01:00
Alina Buzachis
6b2efa180f openshift_adm_migrate_template_instances - new module (#126)
* openshift_adm_migrate_template_instances -  new module to update TemplateInstances to point to the latest group-version-kinds.

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* update

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Add unit tests

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

* Address comments

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
2021-11-17 12:28:35 +01:00
Andrew Klychkov
f13caaffb9 Remove .github/workflows as tests are run by Zuul (#121) 2021-11-12 13:05:26 +01:00
Alina Buzachis
1487d79ac4 Enable unit tests in the CI (#127)
Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
2021-11-11 11:41:41 +01:00
Mike Graves
d154967c88 Release 2.1.0 (#124) 2.1.0 2021-11-02 13:47:24 +01:00
Gonéri Le Bouder
e0c6713926 relax the dependency with kubernetes.core (#109)
* relax the dependency with kubernetes.core

We can use the collection with the 2.2 branch of kubernetes.core.

* galaxy: use <2.3.0 has the upper version bound

See: https://github.com/ansible/ansible-zuul-jobs/pull/1119
2021-10-20 13:05:10 +00:00
Andrew Klychkov
11314f8280 Copy ignore-2.12.txt to ignore-2.13.txt (#119) 2021-09-30 09:35:09 -04:00
Gonéri Le Bouder
c737d44413 improve turbo mode support (#117)
- delay the loading of external modules when possible
- delay the loading of OKDRawModule and OpenShiftProcess classes
- k8s reuse the design of the kubernetes.core modules

We've got a chicken/egg problem that prevent us from properly
reporting if kubernetes.core is missing. We need args_common to create
the module object. And we need the module object to report the missing
dependency. The dependency is declared in the galaxy.yml file anyway,
the problem should not happen.
2021-09-23 11:09:42 -04:00
Gonéri Le Bouder
c340ff6582 pylint: ignore a use-a-generator message (#118)
Follow up to the recent upgrade of pylint in the devel branch, we've
got a new use-a-generator error in k8s.py:

Use a generator instead 'all(desired.get(key, True) == item.get(key, False) for key in keys)'

This commit disables the error until we've got time to rewrite this
part.
Also, since the older branches still use an ancient version of pylint,
we've got another message saying the error does not exist (yet!).
This commit also adds the right entries in the ignore files.
2021-09-23 01:55:47 -04:00
Alina Buzachis
9bea36be5c Update links (#111)
Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
2021-09-21 13:06:09 -04:00
Gonéri Le Bouder
7bb52051da molecule: gives more time to openshift_route (#113)
My set-up is pretty slow and adding a bit of retries help to pass
the test reliably.
2021-09-21 13:05:26 -04:00
Gonéri Le Bouder
ffe6025fe9 gitignore: ansible_collections dir is used by the Makefile (#114)
Ignore the ansible_collections directory. This directory is used to
prepare the collections, before the Makefile call molecule.
2021-09-21 13:05:06 -04:00
Gonéri Le Bouder
f095a4d238 shellcheck: SC2236: Use -n instead of ! -z. (#110)
Address the following warning:

```
ERROR: Found 1 shellcheck issue(s) which need to be resolved:
ERROR: ci/incluster_integration.sh:16:7: SC2236: Use -n instead of ! -z.
```
2021-09-21 13:04:43 -04:00
Alina Buzachis
b0638ad2a4 Update OWNERS by using OWNERS_ALIASES (#112)
Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
2021-09-21 13:04:13 -04:00
Mike Graves
bfb2c8904f Fix sanity test errors (#107)
The empty test-requirements.txt file is needed to get Zuul's sanity job
to run.
2021-09-20 11:53:44 -04:00
Mike Graves
3d0dfc1ae2 Replace IMAGE_FORMAT env var (#108)
The IMAGE_FORMAT env var has been deprecated and removed. This adds a
new env var that will be set upstream in the openshift CI config.
2021-09-16 15:00:37 -04:00
Alina Buzachis
c72d17b6ba Add docs for turbo mode (#104)
Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
2021-09-08 15:05:24 +02:00
Mike Graves
0838ee48d2 Enable turbo mode (#102)
* Enable turbo mode

This enables turbo mode (default is off) for the modules in this
collection that use the client from the kubernetes.core collection.

* Add changelog fragment
2021-08-25 10:37:56 -04:00
Mike Graves
e9f8c41ac4 Fix broken links for downstream collection (#101)
* Fix broken links for downstream collection

The links to the repo on Automation Hub are broken for the downstream
collection. This skips the replacement step for galaxy.yml.

* Add changelog fragment
2021-08-10 12:29:51 +00:00
abikouo
faba4a0812 openshift_route - add support for annotations (#99)
* add support for annotations
2021-07-29 14:36:52 +02:00