-
Notifications
You must be signed in to change notification settings - Fork 70
Add checking if resource is OpenShift specific to properly create OpenShift artifacts #802
Conversation
Can one of the admins verify this patch? |
3 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
#dotests |
#dotests |
@@ -540,5 +540,6 @@ def main(): | |||
cli = CLI() | |||
cli.run() | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
random newline added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cdrage flake8 was updated last week and since the version is not locked down for CI testing it failed because the latest version requires a double newline between all def statements and the start of the program. Adding this newline passed the CI tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dymurray Ahhh, that makes sense!
@@ -180,6 +180,8 @@ def _generate_kurl(self, obj, namespace, name=None, params=None): | |||
url = self.k8s_api | |||
else: | |||
url = urljoin(self.k8s_apis, "%s/" % api_version) | |||
elif resource in self.oc_api_resources: | |||
url = self.oc_api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does LGTM, but I'm just going to make sure this still works when creating k8s resources via OpenShift.
oc_object = {"apiVersion": "v1", "kind": "Route", "metadata": {"labels": {"name": "helloapache-route"}, "name": "helloapache-route"}, "spec": { | ||
"host": "$endpoint", "to": [{"kind": "Service", "name": "helloapache-svc"}]}} | ||
a = KubeOpenshiftClient(config) | ||
a.delete(oc_object, "foobar") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for more tests. thank you!
Seems that this works correctly on all fronts! :) I'm going to go ahead and merge this. |
Thanks @dymurray |
Can one of the admins verify this patch? |
3 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
It appears that this file was copy pasted from the Kubernetes Kubeshift file and wasn't tested. Currently deploying an atomicapp which has a route as an artifact will fail since a route isn't listed as a Kubernetes resource. I tested this deploying an Etherpad atomicapp (https://github.com/fusor/nulecule-library/tree/master/etherpad-atomicapp) on Openshift with an added route artifact with success.
┆Issue is synchronized with this Asana task