mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-06-11 02:56:10 +00:00
Re-enable support for turbo mode (#169)
Re-enable support for turbo mode SUMMARY This re-enables the ability to add turbo mode. It also adds a few more tests to cover some cases that had been broken in turbo mode previously. Testing with turbo mode is not currently enabled, and would fail until ansible-collections/cloud.common#69 can be merged and a new cloud.common release is done. This also does not add cloud.common to the collection dependencies until a decision has been made about how enabling/disabling turbo mode will work when cloud.common is already installed. ISSUE TYPE Bugfix Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Abhijeet Kasurde <None> Reviewed-by: Mike Graves <mgraves@redhat.com> Reviewed-by: Gonéri Le Bouder <goneri@lebouder.net> Reviewed-by: None <None>
This commit is contained in:
@@ -36,12 +36,30 @@
|
||||
path: ~/.kube/config
|
||||
state: absent
|
||||
|
||||
- name: Try to create namespace without default kube config
|
||||
kubernetes.core.k8s:
|
||||
name: testing
|
||||
kind: Namespace
|
||||
ignore_errors: true
|
||||
register: result
|
||||
|
||||
- name: No default kube config should fail
|
||||
assert:
|
||||
that: result is not successful
|
||||
|
||||
- name: Using custom config location should succeed
|
||||
kubernetes.core.k8s:
|
||||
name: testing
|
||||
kind: Namespace
|
||||
kubeconfig: ~/.kube/customconfig
|
||||
|
||||
- name: Using an env var to set config location should succeed
|
||||
kubernetes.core.k8s:
|
||||
name: testing
|
||||
kind: Namespace
|
||||
environment:
|
||||
K8S_AUTH_KUBECONFIG: ~/.kube/customconfig
|
||||
|
||||
always:
|
||||
- name: Return kubeconfig
|
||||
copy:
|
||||
@@ -365,6 +383,38 @@
|
||||
register: k8s_info_testing6
|
||||
failed_when: not k8s_info_testing6.resources or k8s_info_testing6.resources[0].status.phase != "Active"
|
||||
|
||||
- name: Create large configmap data
|
||||
command: dd if=/dev/urandom bs=500K count=1
|
||||
register: cmap_data
|
||||
|
||||
- name: Create configmap with large value
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: testmap
|
||||
namespace: testing
|
||||
data:
|
||||
testkey: "{{ cmap_data.stdout | b64encode }}"
|
||||
wait: true
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
|
||||
- name: Retrieve configmap
|
||||
k8s_info:
|
||||
kind: ConfigMap
|
||||
namespace: testing
|
||||
name: testmap
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result.resources[0].data.testkey == "{{ cmap_data.stdout | b64encode }}"
|
||||
|
||||
always:
|
||||
- name: Delete all namespaces
|
||||
k8s:
|
||||
|
||||
Reference in New Issue
Block a user