Skip to content

Commit 698a3ba

Browse files
committed
revert timeout bumps
1 parent 6043be4 commit 698a3ba

File tree

9 files changed

+13
-18
lines changed

9 files changed

+13
-18
lines changed

CHANGELOG.md

-2
Original file line numberDiff line numberDiff line change
@@ -500,5 +500,3 @@
500500
### Fixed
501501
502502
- The cache of available clients is being reset every minute for discovery of newely added resources to a cluster. [#280](https://github.com/operator-framework/operator-sdk/pull/280)
503-
504-

doc/ansible/user-guide.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ be monitored for updates and cached.
6666
* **manageStatus** (optional): When true (default), the operator will manage
6767
the status of the CR generically. Set to false, the status of the CR is
6868
managed elsewhere, by the specified role/playbook or in a separate controller.
69-
* **blacklist**: This is a list of child resources (by GVK) that should not have
70-
watches created and should not be cached.
69+
* **blacklist**: A list of child resources (by GVK) that will not be watched or cached.
7170

7271
An example Watches file:
7372

@@ -98,7 +97,6 @@ An example Watches file:
9897
foo: bar
9998

10099
# ConfigMaps owned by a Memcached CR will not be watched or cached.
101-
---
102100
- version: v1alpha1
103101
group: cache.example.com
104102
kind: Memcached

hack/tests/e2e-ansible.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ test_operator() {
6868
fi
6969

7070
header_text "verify that the metrics endpoint exists (Port 8383)"
71-
if ! timeout 90s bash -c -- "until kubectl run --attach --rm --restart=Never test-metrics --image=$metrics_test_image -- curl -sfo /dev/null http://memcached-operator-metrics:8383/metrics; do sleep 1; done";
71+
if ! timeout 1m bash -c -- "until kubectl run --attach --rm --restart=Never test-metrics --image=$metrics_test_image -- curl -sfo /dev/null http://memcached-operator-metrics:8383/metrics; do sleep 1; done";
7272
then
7373
error_text "FAIL: Failed to verify that metrics endpoint exists"
7474
operator_logs
@@ -85,15 +85,15 @@ test_operator() {
8585

8686
header_text "create custom resource (Memcached CR)"
8787
kubectl create -f deploy/crds/ansible.example.com_v1alpha1_memcached_cr.yaml
88-
if ! timeout 90s bash -c -- 'until kubectl get deployment -l app=memcached | grep memcached; do sleep 1; done';
88+
if ! timeout 60s bash -c -- 'until kubectl get deployment -l app=memcached | grep memcached; do sleep 1; done';
8989
then
9090
error_text "FAIL: Failed to verify to create memcached Deployment"
9191
operator_logs
9292
exit 1
9393
fi
9494

9595
header_text "Verify that a config map owned by the CR has been created."
96-
if ! timeout 90s bash -c -- "until kubectl get configmap test-blacklist-watches > /dev/null 2>&1; do sleep 1; done";
96+
if ! timeout 1m bash -c -- "until kubectl get configmap test-blacklist-watches > /dev/null 2>&1; do sleep 1; done";
9797
then
9898
error_text "FAIL: Unable to retrieve config map test-blacklist-watches."
9999
operator_logs
@@ -110,7 +110,7 @@ test_operator() {
110110

111111

112112
header_text "verify that metrics reflect cr creation"
113-
if ! timeout 90s bash -c -- "until kubectl run -it --rm --restart=Never test-metrics --image=$metrics_test_image -- curl http://memcached-operator-metrics:8686/metrics | grep example-memcached; do sleep 1; done";
113+
if ! timeout 60s bash -c -- "until kubectl run -it --rm --restart=Never test-metrics --image=$metrics_test_image -- curl http://memcached-operator-metrics:8686/metrics | grep example-memcached; do sleep 1; done";
114114
then
115115
error_text "FAIL: Failed to verify custom resource metrics"
116116
operator_logs

internal/scaffold/ansible/molecule_test_cluster_playbook.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const moleculeTestClusterPlaybookAnsibleTmpl = `---
5959
debug:
6060
msg: "{{ lookup('k8s', group='[[.Resource.FullGroup]]', api_version='[[.Resource.Version]]', kind='[[.Resource.Kind]]', namespace=namespace, resource_name=custom_resource.metadata.name) }}"
6161
62-
- name: Wait 4m for reconciliation to run
62+
- name: Wait 2m for reconciliation to run
6363
k8s_info:
6464
api_version: '[[.Resource.Version]]'
6565
kind: '[[.Resource.Kind]]'
@@ -68,7 +68,7 @@ const moleculeTestClusterPlaybookAnsibleTmpl = `---
6868
register: reconcile_cr
6969
until:
7070
- "'Successful' in (reconcile_cr | json_query('resources[].status.conditions[].reason'))"
71-
delay: 24
71+
delay: 12
7272
retries: 10
7373
7474
- import_playbook: '{{ playbook_dir }}/../default/asserts.yml'

internal/scaffold/ansible/molecule_test_local_playbook.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const moleculeTestLocalPlaybookAnsibleTmpl = `---
101101
namespace: '{{ namespace }}'
102102
definition: '{{ custom_resource }}'
103103
104-
- name: Wait 4m for reconciliation to run
104+
- name: Wait 2m for reconciliation to run
105105
k8s_info:
106106
api_version: '{{ custom_resource.apiVersion }}'
107107
kind: '{{ custom_resource.kind }}'
@@ -110,7 +110,7 @@ const moleculeTestLocalPlaybookAnsibleTmpl = `---
110110
register: cr
111111
until:
112112
- "'Successful' in (cr | json_query('resources[].status.conditions[].reason'))"
113-
delay: 24
113+
delay: 12
114114
retries: 10
115115
rescue:
116116
- name: debug cr

pkg/ansible/proxy/proxy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func addWatchToController(owner kubeconfig.NamespacedOwnerReference, cMap *contr
249249
}
250250
}
251251
} else {
252-
log.Info("Resource will not be watched/cached because it is blacklisted.", "GVK", resource.GroupVersionKind())
252+
log.Info("Resource will not be watched/cached.", "GVK", resource.GroupVersionKind())
253253
}
254254
return nil
255255
}

test/ansible-inventory/molecule/test-local/playbook.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
namespace: '{{ namespace }}'
6060
definition: "{{ custom_resource }}"
6161

62-
- name: Wait 4m for reconciliation to run
62+
- name: Wait 2m for reconciliation to run
6363
k8s_info:
6464
api_version: '{{ custom_resource.apiVersion }}'
6565
kind: '{{ custom_resource.kind }}'
@@ -68,7 +68,7 @@
6868
register: cr
6969
until:
7070
- "'Successful' in (cr | json_query('resources[].status.conditions[].reason'))"
71-
delay: 24
71+
delay: 12
7272
retries: 10
7373

7474
- import_playbook: asserts.yml

test/ansible-memcached/asserts.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
debug:
119119
var: service
120120
until: service
121-
retries: 24
121+
retries: 12
122122
delay: 10
123123
vars:
124124
service: '{{ lookup("k8s",

test/ansible-memcached/tasks.yml

-1
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,4 @@
7676
namespace: "{{ meta.namespace }}"
7777
data:
7878
arbitrary: afdasdfsajsafj
79-
# namespace: default
8079
state: present

0 commit comments

Comments
 (0)