Repository: devopsspiral/KubeLibrary (language: python)

Issue:
Running from withing the cluster
Running from withing the cluster


Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 23de8064..cb3f35bc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 - Keyword for list cronjob [#48](https://github.com/devopsspiral/KubeLibrary/pull/48) by [@satish-nubolab](https://github.com/satish-nubolab)
 - Keyword for list daemonset [#50](https://github.com/devopsspiral/KubeLibrary/pull/50) by [@satish-nubolab](https://github.com/satish-nubolab)
 - Keyword for CustomObjectsApi [#54](https://github.com/devopsspiral/KubeLibrary/pull/54) by [@mika-b](https://github.com/mika-b)
+- Example tests for Ambassador CRDs [#63](https://github.com/devopsspiral/KubeLibrary/pull/63) by [@Nilsty](https://github.com/Nilsty)
+
 
 ### Fixed
 - Fix for cert validation disabling not being possible for all api clients [#61](https://github.com/devopsspiral/KubeLibrary/pull/61) by [@m-wcislo](https://github.com/m-wcislo)


Test patch:
diff --git a/testcases/custom_objects/ambassador_crds.robot b/testcases/custom_objects/ambassador_crds.robot
new file mode 100644
index 00000000..d15a624f
--- /dev/null
+++ b/testcases/custom_objects/ambassador_crds.robot
@@ -0,0 +1,33 @@
+*** Settings ***
+Library         KubeLibrary
+
+Documentation  These are example test cases to check custom resource definitions created by Ambassador.
+...            Ambassador is on open source API gateway solution. The most common CRDs created by ambassador 
+...            are Mappings and Hosts, which control the routing of API requests to different services
+...            running in your cluster.
+...            https://www.getambassador.io/products/api-gateway/
+...            More details on Ambassador Mappings:
+...            https://www.getambassador.io/docs/pre-release/topics/using/intro-mappings/#introduction-to-the-mapping-resource
+
+*** Test Cases ***
+Get details for all ambassador mappings
+    ${listed_mappings}=  List Cluster Custom Objects   getambassador.io   v2   mappings
+    FOR  ${mapping}  IN  @{listed_mappings['items']}
+        Log  Mapping name: ${mapping}[metadata][name]  console=True
+        Log  Mapping namespace: ${mapping}[metadata][namespace]  console=True
+        Log  Mapping prefix: ${mapping}[spec][prefix]  console=True
+        Log  Mapping service: ${mapping}[spec][service]  console=True
+        ${status}=  Run Keyword And Ignore Error  Log  Mapping status: ${mapping}[status][state]  console=True
+        Run Keyword If   '''FAIL''' in '''${status}'''  Log  ! Mapping ${mapping}[metadata][name] is not running  console=True
+        Log  ---------------------------------------------------  console=True
+    END
+
+Get details for all ambassador hosts
+    ${listed_hosts}=  List Cluster Custom Objects   getambassador.io   v2   hosts
+    FOR  ${host}  IN  @{listed_hosts['items']}
+        Log  Host name: ${host}[metadata][name]  console=True
+        Log  Host namespace: ${host}[metadata][namespace]  console=True
+        Log  Host hostname: ${host}[spec][hostname]  console=True
+        Log  Host status: ${host}[status][state]  console=True
+        Log  ---------------------------------------------------  console=True
+    END