Compare commits

...
13 Commits
Author SHA1 Message Date
Mike GravesandGitHub ac86a8900c Release 1.1.1 (#79)
* Release 1.1.1

* Add CI fix to changelog
2021-04-06 12:09:53 -04:00
Mike GravesandGitHub fb1912728d Update CI for ansible 2.11 (#80)
* Update CI for ansible 2.11

This copies the ignore-2.11.txt to ignore-2.12.txt and makes sure the CI
build tests against ansible 2.11.

* Add changelog fragment
2021-04-06 16:40:46 +02:00
Mike GravesandGitHub 22f878023a Add missing requirements.txt file (#78)
* Add missing requirements.txt file

This is needed for execution environments.

* Add changelog fragment
2021-04-06 06:14:43 +02:00
Abhijeet KasurdeandGitHub 921c451f0d k8s_auth: Redirect using meta/runtime.yml (#73)
Fixes: #57

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-04-05 18:39:15 +02:00
Mike GravesandGitHub e7e114743c Fix sanity failure (#77)
* Fix sanity failure

This fixes a sanity test failure for newer versions of ansible-test. It
was falsely flagging the key parameter for TLS configuration as
sensitive. This parameter is just the path to a key file.

* Restrict molecule version

This is needed to address a breaking change in molecule 3.3.0.

* Add changelog fragment
2021-04-05 17:15:15 +02:00
Mike GravesandGitHub ef6712c8f6 Release version 1.1.0 (#72) 2021-02-24 10:33:21 -05:00
Mike GravesandGitHub 570a8ccd27 Increase kubernetes.core dependency version number (#71)
* Increase kubernetes.core dependency version number

* Add changelog fragment
2021-02-23 02:43:25 -05:00
Eric GustavssonandGitHub d76430d879 typo: conig -> config (#69) 2021-02-22 11:15:15 -05:00
Mike GravesandGitHub 2b51c229ad Prepare for 1.0.2 release (#70) 2021-02-19 12:03:23 -05:00
Mike GravesandGitHub d197d28cd1 Restrict kubernetes.core dependency version (#66)
* Restrict kubernetes.core dependency version

In order to better coordinate releases between this collection and the
kubernetes.core collection we need to use a more restrictive dependency
version range.

* Add changelog fragment
2021-02-19 10:38:31 -05:00
Mike GravesandGitHub 5361c9322e Remove has_action field from doc fragment (#68)
A recent change in Ansible
(https://github.com/ansible/ansible/commit/42da4807214cd609fd3c1800ab245c025ae044cd)
added a has_action field to the json output of ansible-doc. This started
causing the downstream sanity checks to fail.
2021-02-18 11:35:30 -05:00
Mike GravesandGitHub 6c1dc79c7f Fix doc string (#67)
* Fix doc string

The sanity tests fail due to missing default values on a few options in
the doc string. This change puts the doc string in alignment with the
argument spec.

* Fix case
2021-02-18 08:01:49 -05:00
Abhijeet KasurdeandGitHub 4cfbde3d14 Sanity check fixes for CI (#63)
Fixes: #62 #57

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-11-18 15:52:26 +01:00
22 changed files with 103 additions and 22 deletions
+1
View File
@@ -24,6 +24,7 @@ jobs:
ansible:
- stable-2.9
- stable-2.10
- stable-2.11
- devel
python:
- 2.7
+27
View File
@@ -5,6 +5,33 @@ OKD Collection Release Notes
.. contents:: Topics
v1.1.1
======
Bugfixes
--------
- add missing requirements.txt file needed for execution environments (https://github.com/ansible-collections/community.okd/pull/78).
- openshift_route - default to ``no_log=False`` for the ``key`` parameter in TLS configuration to fix sanity failures (https://github.com/ansible-collections/community.okd/pull/77).
- restrict molecule version to <3.3.0 to address breaking change (https://github.com/ansible-collections/community.okd/pull/77).
- update CI to work with ansible 2.11 (https://github.com/ansible-collections/community.okd/pull/80).
v1.1.0
======
Minor Changes
-------------
- increase the kubernetes.core dependency version number (https://github.com/ansible-collections/community.okd/pull/71).
v1.0.2
======
Minor Changes
-------------
- restrict the version of kubernetes.core dependency (https://github.com/ansible-collections/community.okd/pull/66).
v1.0.1
======
+1 -1
View File
@@ -1,5 +1,5 @@
# Also needs to be updated in galaxy.yml
VERSION = 1.0.1
VERSION = 1.1.1
# To run sanity tests in a venv, set SANITY_TEST_ARGS to '--venv'
SANITY_TEST_ARGS ?= --docker --color
+1 -1
View File
@@ -39,7 +39,7 @@ You can also include it in a `requirements.yml` file and install it via `ansible
---
collections:
- name: community.okd
version: 1.0.1
version: 1.1.1
```
### Installing the OpenShift Python Library
+27
View File
@@ -75,3 +75,30 @@ releases:
fragments:
- 59-downstream-docs.yml
release_date: '2020-11-17'
1.0.2:
changes:
minor_changes:
- restrict the version of kubernetes.core dependency (https://github.com/ansible-collections/community.okd/pull/66).
fragments:
- 66-restrict-kubernetes-core-version.yaml
release_date: '2021-02-19'
1.1.0:
changes:
minor_changes:
- increase the kubernetes.core dependency version number (https://github.com/ansible-collections/community.okd/pull/71).
fragments:
- 71-bump-kubernetes-core-version.yaml
release_date: '2021-02-23'
1.1.1:
changes:
bugfixes:
- add missing requirements.txt file needed for execution environments (https://github.com/ansible-collections/community.okd/pull/78).
- openshift_route - default to ``no_log=False`` for the ``key`` parameter in
TLS configuration to fix sanity failures (https://github.com/ansible-collections/community.okd/pull/77).
- restrict molecule version to <3.3.0 to address breaking change (https://github.com/ansible-collections/community.okd/pull/77).
- update CI to work with ansible 2.11 (https://github.com/ansible-collections/community.okd/pull/80).
fragments:
- 77-fix-ci-failure.yaml
- 78-add-requirements-file.yaml
- 80-update-ci.yaml
release_date: '2021-04-06'
@@ -0,0 +1,2 @@
minor_changes:
- restrict the version of kubernetes.core dependency (https://github.com/ansible-collections/community.okd/pull/66).
@@ -0,0 +1,2 @@
minor_changes:
- increase the kubernetes.core dependency version number (https://github.com/ansible-collections/community.okd/pull/71).
@@ -0,0 +1,3 @@
bugfixes:
- restrict molecule version to <3.3.0 to address breaking change (https://github.com/ansible-collections/community.okd/pull/77).
- openshift_route - default to ``no_log=False`` for the ``key`` parameter in TLS configuration to fix sanity failures (https://github.com/ansible-collections/community.okd/pull/77).
@@ -0,0 +1,2 @@
bugfixes:
- add missing requirements.txt file needed for execution environments (https://github.com/ansible-collections/community.okd/pull/78).
+2
View File
@@ -0,0 +1,2 @@
bugfixes:
- update CI to work with ansible 2.11 (https://github.com/ansible-collections/community.okd/pull/80).
+1 -1
View File
@@ -18,7 +18,7 @@ RUN yum install -y \
&& pip3 install --no-cache-dir \
openshift \
ansible==2.9.* \
molecule \
"molecule<3.3.0" \
&& yum clean all \
&& rm -rf $HOME/.cache \
&& curl -L https://github.com/openshift/okd/releases/download/4.5.0-0.okd-2020-08-12-020541/openshift-client-linux-4.5.0-0.okd-2020-08-12-020541.tar.gz | tar -xz -C /usr/local/bin
+6 -4
View File
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/bash -eu
# Script to dual-home the upstream and downstream Collection in a single repo
#
@@ -9,7 +9,7 @@
# - All functions are prefixed with f_ so it's obvious where they come
# from when in use throughout the script
DOWNSTREAM_VERSION="1.0.1"
DOWNSTREAM_VERSION="1.1.1"
KEEP_DOWNSTREAM_TMPDIR="${KEEP_DOWNSTREAM_TMPDIR:-''}"
_build_dir=""
@@ -32,6 +32,7 @@ f_text_sub()
{
# Switch FQCN and dependent components
OKD_sed_files="${_build_dir}/README.md ${_build_dir}/CHANGELOG.rst ${_build_dir}/changelogs/config.yaml ${_build_dir}/ci/downstream.sh ${_build_dir}/galaxy.yml"
# shellcheck disable=SC2068
for okd_file in ${OKD_sed_files[@]}; do sed -i.bak "s/OKD/OpenShift/g" "${okd_file}"; done
sed -i.bak "s/============================/==================================/" "${_build_dir}/CHANGELOG.rst"
@@ -155,6 +156,8 @@ f_handle_doc_fragments_workaround()
do
local module_py="plugins/modules/${doc_fragment_mod}.py"
f_log_info "Processing doc fragments for ${module_py}"
# We need following variable for ansible-doc only
# shellcheck disable=SC2097,SC2098
ANSIBLE_COLLECTIONS_PATH="${install_collections_dir}" \
ANSIBLE_COLLECTIONS_PATHS="${ANSIBLE_COLLECTIONS_PATH}:${install_collections_dir}" \
ansible-doc -j "redhat.openshift.${doc_fragment_mod}" > "${temp_fragments_json}"
@@ -166,9 +169,8 @@ f_handle_doc_fragments_workaround()
fi
"${PYTHON}" "${_start_dir}/ci/downstream_fragments.py" "redhat.openshift.${doc_fragment_mod}" "${temp_fragments_json}"
sed -n '/STARTREMOVE/q;p' "${module_py}" > "${temp_start}"
sed '0,/ENDREMOVE/d' "${module_py}" > "${temp_end}"
sed '1,/ENDREMOVE/d' "${module_py}" > "${temp_end}"
cat "${temp_start}" "${rendered_fragments}" "${temp_end}" > "${module_py}"
cat "${module_py}"
done
rm -f "${rendered_fragments}"
rm -fr "${install_collections_dir}"
+5 -3
View File
@@ -1,8 +1,11 @@
#!/usr/bin/env python
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
import yaml
import sys
import yaml
with open("./rendereddocfragments.txt", 'w') as df_fd:
with open(sys.argv[2], 'r') as fd:
@@ -10,6 +13,7 @@ with open("./rendereddocfragments.txt", 'w') as df_fd:
json_docs[sys.argv[1]]['doc'].pop('collection', '')
json_docs[sys.argv[1]]['doc'].pop('filename', '')
json_docs[sys.argv[1]]['doc'].pop('has_action', '')
df_fd.write("DOCUMENTATION = '''\n")
df_fd.write(yaml.dump(json_docs[sys.argv[1]]['doc'], default_flow_style=False))
@@ -22,5 +26,3 @@ with open("./rendereddocfragments.txt", 'w') as df_fd:
df_fd.write("RETURN = '''\n")
df_fd.write(yaml.dump(json_docs[sys.argv[1]]['return'], default_flow_style=False))
df_fd.write("'''\n\n")
+8 -7
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -eu
set -x
@@ -11,17 +11,18 @@ NAMESPACE=${NAMESPACE:-default}
# and set the IMAGE_FORMAT environment variable so that it properly
# resolves to your image. For example, quay.io/mynamespace/$component
# would resolve to quay.io/mynamespace/molecule-test-runner
# shellcheck disable=SC2034
component='molecule-test-runner'
eval IMAGE=$IMAGE_FORMAT
eval IMAGE="$IMAGE_FORMAT"
PULL_POLICY=${PULL_POLICY:-IfNotPresent}
if ! oc get namespace $NAMESPACE
if ! oc get namespace "$NAMESPACE"
then
oc create namespace $NAMESPACE
oc create namespace "$NAMESPACE"
fi
oc project $NAMESPACE
oc project "$NAMESPACE"
oc adm policy add-cluster-role-to-user cluster-admin -z default
oc adm policy who-can create projectrequests
@@ -52,7 +53,7 @@ spec:
EOF
function check_success {
oc wait --for=condition=complete job/molecule-integration-test --timeout 5s -n $NAMESPACE \
oc wait --for=condition=complete job/molecule-integration-test --timeout 5s -n "$NAMESPACE" \
&& oc logs job/molecule-integration-test \
&& echo "Molecule integration tests ran successfully" \
&& return 0
@@ -60,7 +61,7 @@ function check_success {
}
function check_failure {
oc wait --for=condition=failed job/molecule-integration-test --timeout 5s -n $NAMESPACE \
oc wait --for=condition=failed job/molecule-integration-test --timeout 5s -n "$NAMESPACE" \
&& oc logs job/molecule-integration-test \
&& echo "Molecule integration tests failed, see logs for more information..." \
&& return 0
+2 -2
View File
@@ -5,7 +5,7 @@ authors:
- willthames (https://github.com/willthames)
- Akasurde (https://github.com/akasurde)
dependencies:
kubernetes.core: '>=1.1.1'
kubernetes.core: '>=1.2.0,<1.3.0'
description: OKD Collection for Ansible.
documentation: ''
homepage: ''
@@ -24,4 +24,4 @@ tags:
- okd
- cluster
# Also needs to be updated in the Makefile
version: 1.0.1
version: 1.1.1
+4
View File
@@ -1,2 +1,6 @@
---
requires_ansible: '>=2.9'
plugin_routing:
modules:
k8s_auth:
redirect: community.okd.openshift_auth
+1 -1
View File
@@ -71,7 +71,7 @@ DOCUMENTATION = '''
- name: K8S_AUTH_EXTRA_ARGS
oc_kubeconfig:
description:
- Path to a oc config file. Defaults to I(~/.kube/conig)
- Path to a oc config file. Defaults to I(~/.kube/config)
default: ''
vars:
- name: ansible_oc_kubeconfig
+2
View File
@@ -134,6 +134,7 @@ options:
will only work if the same object is passed with state=absent (alternatively, just use state=absent with the name including
the generated hash and append_hash=no)
type: bool
default: false
apply:
description:
- C(apply) compares the desired resource definition with the previously supplied resource definition,
@@ -141,6 +142,7 @@ options:
- C(apply) works better with Services than 'force=yes'
- mutually exclusive with C(merge_type)
type: bool
default: false
requirements:
- "python >= 2.7"
-1
View File
@@ -1 +0,0 @@
openshift_auth.py
+1 -1
View File
@@ -367,7 +367,7 @@ class OpenShiftRoute(K8sAnsibleMixin):
ca_certificate=dict(type='str'),
certificate=dict(type='str'),
destination_ca_certificate=dict(type='str'),
key=dict(type='str'),
key=dict(type='str', no_log=False),
insecure_policy=dict(type='str', choices=['allow', 'redirect', 'disallow'], default='disallow'),
))
spec['termination'] = dict(choices=['edge', 'passthrough', 'reencrypt', 'insecure'], default='insecure')
+2
View File
@@ -0,0 +1,2 @@
openshift>=0.6.2
requests-oauthlib
+3
View File
@@ -0,0 +1,3 @@
plugins/modules/k8s.py validate-modules:parameter-type-not-in-doc
plugins/modules/k8s.py validate-modules:return-syntax-error
plugins/modules/openshift_process.py validate-modules:parameter-type-not-in-doc