mirror of
https://github.com/openshift/community.okd.git
synced 2026-07-28 18:34:32 +00:00
openshift_route - add support for annotations (#99)
* add support for annotations
This commit is contained in:
@@ -238,3 +238,36 @@
|
||||
namespace: default
|
||||
state: absent
|
||||
wait: yes
|
||||
|
||||
# Route with labels and annotations
|
||||
- name: Create route with labels and annotations
|
||||
community.okd.openshift_route:
|
||||
service: hello-kubernetes
|
||||
namespace: default
|
||||
name: route-label-annotation
|
||||
labels:
|
||||
ansible: test
|
||||
annotations:
|
||||
haproxy.router.openshift.io/balance: roundrobin
|
||||
|
||||
- name: Get route information
|
||||
kubernetes.core.k8s_info:
|
||||
api_version: route.openshift.io/v1
|
||||
kind: Route
|
||||
name: route-label-annotation
|
||||
namespace: default
|
||||
register: route
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- route.resources[0].metadata.annotations is defined
|
||||
- '"haproxy.router.openshift.io/balance" in route.resources[0].metadata.annotations'
|
||||
- route.resources[0].metadata.labels is defined
|
||||
- '"ansible" in route.resources[0].metadata.labels'
|
||||
|
||||
- name: Delete route
|
||||
community.okd.openshift_route:
|
||||
name: route-label-annotation
|
||||
namespace: default
|
||||
state: absent
|
||||
wait: yes
|
||||
Reference in New Issue
Block a user