kohlstechnology / ansible-role-openshift-provision Goto Github PK
View Code? Open in Web Editor NEWThis project forked from gnuthought/ansible-role-openshift-provision
Provision OpenShift resources with Ansible
This project forked from gnuthought/ansible-role-openshift-provision
Provision OpenShift resources with Ansible
The current PR checks only run tests against the code. The checks should be updated to run pylint to ensure the python code in the repository is properly formatted.
When a PR is submitted, ansible-lint should be run against the ansible playbooks to ensure the code base is formatted in a standard way.
In the playbook openshift-cluster.yml
, in the task named Process facts for OpenShift version
, the variable oc_version_output
is being set to the string get_version.stdout
rather than the value of the variable get_version.stdout
.
This is resulting in the openshift_provision_openshift_version
and openshift_provision_oc_version
variables to be set to the string get_version.stdout
which is not what these values should be set to.
If you are managing a cluster that has multiple api resources with the same short name, but in different API groups, the patch
action may not utilize the correct api resource. An example of this would be the api resources configs.imageregistry.operator.openshift.io
and configs.operator.openshift.io
on an OpenShift 4.5 cluster.
Here is the error message received when I attempted to patch a configs.imageregistry.operator.io
on an OpenShift 4.x cluster (error json formatted for easier readability):
TASK [openshift-provision : Provision cluster resources] ***********************
failed: [localhost] (item=[u'Resource_kind - "Config"', u'Resource_name - "cluster"']) =>
{
"changed": false,
"cmd": "/usr/local/oc --server=https://api.example.com:6443 --token=**** patch Config cluster '--patch={\"kind\": \"Config\", \"spec\": {\"defaultRoute\": true}, \"apiVersion\": \"imageregistry.operator.openshift.io/v1\", \"metadata\": {\"namespace\": null, \"name\": \"cluster\", \"annotations\": {\"openshift-provision/patch-type\": \"merge\", \"openshift-provision/action\": \"patch\"}}}' --type=merge",
"msg": "Error from server: failed to update object (json PATCH for operator.openshift.io/v1, Kind=Config) managed fields: failed to convert new object to proper version: imageregistry.operator.openshift.io/v1, Kind=Config is unstructured and is not suitable for converting to \"operator.openshift.io/v1\"",
"rc": 1,
"resource": {
"apiVersion": "imageregistry.operator.openshift.io/v1",
"kind": "Config",
"metadata": {
"annotations": {
"openshift-provision/action": "patch",
"openshift-provision/patch-type": "merge"
},
"name": "cluster"
},
"spec": {
"defaultRoute": true
}
},
"stderr": "Error from server: failed to update object (json PATCH for operator.openshift.io/v1, Kind=Config) managed fields: failed to convert new object to proper version: imageregistry.operator.openshift.io/v1, Kind=Config is unstructured and is not suitable for converting to \"operator.openshift.io/v1\"\n",
"stderr_lines": ["Error from server: failed to update object (json PATCH for operator.openshift.io/v1, Kind=Config) managed fields: failed to convert new object to proper version: imageregistry.operator.openshift.io/v1, Kind=Config is unstructured and is not suitable for converting to \"operator.openshift.io/v1\""],
"stdout": "",
"stdout_lines": []
}
The current pull request checks that are run through TravisCI fail with the following error:
$ ansible-playbook tests/test.yml -i tests/inventory --syntax-check
ERROR! the playbook: tests/test.yml could not be found
The command "ansible-playbook tests/test.yml -i tests/inventory --syntax-check" exited with 1.
It looks like the file tests/test.yml
was removed a while ago and the .travis.yml
was not updated.
The .travis.yml
should be updated to run the tests/test.sh
script to ensure our code is tested regularly when PRs are created.
Ref: 4c4cafa
A bug currently exists where Ansible will keep the original resourceVersion when attempting to retry failed resources, despite the resource possibly changing its resourceVersion.
This will print out an error saying that "the object has been modified; please apply your changes to the latest version and try again"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.