Skip to content

Commit e7b456c

Browse files
rsevilla87aakarshg
authored andcommitted
migrate to ansible-operator-v0.17
1 parent 502c9fa commit e7b456c

File tree

20 files changed

+82
-64
lines changed

20 files changed

+82
-64
lines changed

build/Dockerfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
FROM quay.io/operator-framework/ansible-operator:v0.8.1
1+
FROM quay.io/operator-framework/ansible-operator:v0.17.0
2+
3+
COPY requirements.yml ${HOME}/requirements.yml
4+
COPY image_resources/centos8-appstream.repo /etc/yum.repos.d/centos8-appstream.repo
5+
RUN ansible-galaxy collection install -r ${HOME}/requirements.yml \
6+
&& chmod -R ug+rwx ${HOME}/.ansible
7+
8+
USER root
9+
RUN dnf install -y --nodocs redis --enablerepo=centos8-appstream && dnf clean all
10+
11+
# Temporally workaround to fix https://github.com/operator-framework/operator-sdk/issues/2648
12+
RUN ln -s ${HOME}/.ansible /.ansible
213

314
COPY group_vars/ ${HOME}/group_vars/
415
COPY roles/ ${HOME}/roles/
516
COPY watches.yaml ${HOME}/watches.yaml
617
COPY playbook.yml ${HOME}/playbook.yml
7-
8-
USER root
9-
RUN yum install -y redis
1018
USER 1001
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[centos8-appstream]
2+
name=CentOS-8-Appstream
3+
baseurl=http://mirror.centos.org/centos/8/AppStream/x86_64/os/
4+
enabled=0
5+
gpgcheck=0

playbook.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
name: "uuid"
3737

3838
- name: Setting the uuid for the benchmark
39-
k8s_status:
39+
operator_sdk.util.k8s_status:
4040
api_version: ripsaw.cloudbulldozer.io/v1alpha1
4141
kind: Benchmark
4242
name: "{{ meta.name }}"
@@ -63,7 +63,7 @@
6363
name: backpack
6464
when: metadata is defined and not metadata.targeted | default('true') | bool
6565

66-
- k8s_status:
66+
- operator_sdk.util.k8s_status:
6767
api_version: ripsaw.cloudbulldozer.io/v1alpha1
6868
kind: Benchmark
6969
name: "{{ meta.name }}"

requirements.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
collections:
3+
- name: community.kubernetes
4+
version: "<1.0.0"
5+
- operator_sdk.util

roles/backpack/tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace: "{{ operator_namespace }}"
88
register: benchmark_state
99

10-
- k8s_status:
10+
- operator_sdk.util.k8s_status:
1111
api_version: ripsaw.cloudbulldozer.io/v1alpha1
1212
kind: Benchmark
1313
name: "{{ meta.name }}"
@@ -58,7 +58,7 @@
5858
set_fact:
5959
backpack_cur_gen: "{{ my_daemonset | json_query('resources[].metadata.generation')|first }}"
6060

61-
- k8s_status:
61+
- operator_sdk.util.k8s_status:
6262
api_version: ripsaw.cloudbulldozer.io/v1alpha1
6363
kind: Benchmark
6464
name: "{{ meta.name }}"
@@ -89,7 +89,7 @@
8989

9090
- block:
9191

92-
- k8s_status:
92+
- operator_sdk.util.k8s_status:
9393
api_version: ripsaw.cloudbulldozer.io/v1alpha1
9494
kind: Benchmark
9595
name: "{{ meta.name }}"

roles/byowl/tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace: '{{ operator_namespace }}'
99
register: resource_state
1010

11-
- k8s_status:
11+
- operator_sdk.util.k8s_status:
1212
api_version: ripsaw.cloudbulldozer.io/v1alpha1
1313
kind: Benchmark
1414
name: "{{ meta.name }}"
@@ -34,7 +34,7 @@
3434
definition: "{{ lookup('template', 'workload.yml') | from_yaml }}"
3535
when: workload_args.kind is not defined
3636

37-
- k8s_status:
37+
- operator_sdk.util.k8s_status:
3838
api_version: ripsaw.cloudbulldozer.io/v1alpha1
3939
kind: Benchmark
4040
name: "{{ meta.name }}"
@@ -56,7 +56,7 @@
5656
- app = byowl-{{ trunc_uuid }}
5757
register: client_pods
5858

59-
- k8s_status:
59+
- operator_sdk.util.k8s_status:
6060
api_version: ripsaw.cloudbulldozer.io/v1alpha1
6161
kind: Benchmark
6262
name: "{{ meta.name }}"

roles/cerberus/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
register: result
77

88
- name: Update status if unhealthy
9-
k8s_status:
9+
operator_sdk.util.k8s_status:
1010
api_version: ripsaw.cloudbulldozer.io/v1alpha1
1111
kind: Benchmark
1212
name: "{{ meta.name }}"
@@ -17,7 +17,7 @@
1717
when: result.content == "False"
1818

1919
- name: Update status if healthy
20-
k8s_status:
20+
operator_sdk.util.k8s_status:
2121
api_version: ripsaw.cloudbulldozer.io/v1alpha1
2222
kind: Benchmark
2323
name: "{{ meta.name }}"

roles/fio_distributed/tasks/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace: '{{ operator_namespace }}'
88
register: resource_state
99

10-
- k8s_status:
10+
- operator_sdk.util.k8s_status:
1111
api_version: ripsaw.cloudbulldozer.io/v1alpha1
1212
kind: Benchmark
1313
name: "{{ meta.name }}"
@@ -59,7 +59,7 @@
5959
with_sequence: start=1 count={{ workload_args.servers|default('1')|int }}
6060
when: workload_args.storageclass is defined
6161

62-
- k8s_status:
62+
- operator_sdk.util.k8s_status:
6363
api_version: ripsaw.cloudbulldozer.io/v1alpha1
6464
kind: Benchmark
6565
name: "{{ meta.name }}"
@@ -87,7 +87,7 @@
8787
- app = fio-benchmark-{{ trunc_uuid }}
8888
register: server_pods
8989

90-
- k8s_status:
90+
- operator_sdk.util.k8s_status:
9191
api_version: ripsaw.cloudbulldozer.io/v1alpha1
9292
kind: Benchmark
9393
name: "{{ meta.name }}"
@@ -119,7 +119,7 @@
119119
- name: Create IP list
120120
set_fact:
121121
fio_hosts: |
122-
{% for ip, node in pod_details.iteritems() %}
122+
{% for ip, node in pod_details.items() %}
123123
{{ ip }}
124124
{% endfor %}
125125
@@ -139,7 +139,7 @@
139139
k8s:
140140
definition: "{{ lookup('template', 'client.yaml') | from_yaml }}"
141141

142-
- k8s_status:
142+
- operator_sdk.util.k8s_status:
143143
api_version: ripsaw.cloudbulldozer.io/v1alpha1
144144
kind: Benchmark
145145
name: "{{ meta.name }}"
@@ -160,7 +160,7 @@
160160
- app = fiod-client-{{ trunc_uuid }}
161161
register: client_pods
162162

163-
- k8s_status:
163+
- operator_sdk.util.k8s_status:
164164
api_version: ripsaw.cloudbulldozer.io/v1alpha1
165165
kind: Benchmark
166166
name: "{{ meta.name }}"

roles/fs-drift/tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace: '{{ operator_namespace }}'
99
register: resource_state
1010

11-
- k8s_status:
11+
- operator_sdk.util.k8s_status:
1212
api_version: ripsaw.cloudbulldozer.io/v1alpha1
1313
kind: Benchmark
1414
name: "{{ meta.name }}"
@@ -116,7 +116,7 @@
116116
with_sequence: start=1 count={{workload_args.worker_pods|default('1')|int}}
117117
when: workload_args.worker_pods|default('1')|int > 0
118118

119-
- k8s_status:
119+
- operator_sdk.util.k8s_status:
120120
api_version: ripsaw.cloudbulldozer.io/v1alpha1
121121
kind: Benchmark
122122
name: "{{ meta.name }}"
@@ -138,7 +138,7 @@
138138
- app = fs-drift-benchmark-{{ trunc_uuid }}
139139
register: client_pods
140140

141-
- k8s_status:
141+
- operator_sdk.util.k8s_status:
142142
api_version: ripsaw.cloudbulldozer.io/v1alpha1
143143
kind: Benchmark
144144
name: "{{ meta.name }}"

roles/iperf3/tasks/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace: '{{ operator_namespace }}'
88
register: resource_state
99

10-
- k8s_status:
10+
- operator_sdk.util.k8s_status:
1111
api_version: ripsaw.cloudbulldozer.io/v1alpha1
1212
kind: Benchmark
1313
name: "{{ meta.name }}"
@@ -33,7 +33,7 @@
3333
with_sequence: start=1 count={{ workload_args.pairs|default('1')|int }}
3434

3535
- name: Update state to Starting Server
36-
k8s_status:
36+
operator_sdk.util.k8s_status:
3737
api_version: ripsaw.cloudbulldozer.io/v1alpha1
3838
kind: Benchmark
3939
name: "{{ meta.name }}"
@@ -55,7 +55,7 @@
5555
register: server_pods
5656

5757
- name: Update state to Starting Clients
58-
k8s_status:
58+
operator_sdk.util.k8s_status:
5959
api_version: ripsaw.cloudbulldozer.io/v1alpha1
6060
kind: Benchmark
6161
name: "{{ meta.name }}"
@@ -83,7 +83,7 @@
8383
with_items: "{{ server_pods.resources }}"
8484

8585
- name: Update state to Waiting for Clients
86-
k8s_status:
86+
operator_sdk.util.k8s_status:
8787
api_version: ripsaw.cloudbulldozer.io/v1alpha1
8888
kind: Benchmark
8989
name: "{{ meta.name }}"
@@ -104,7 +104,7 @@
104104
- app = iperf3-bench-client-{{ trunc_uuid }}
105105
register: client_pods
106106

107-
- k8s_status:
107+
- operator_sdk.util.k8s_status:
108108
api_version: ripsaw.cloudbulldozer.io/v1alpha1
109109
kind: Benchmark
110110
name: "{{ meta.name }}"
@@ -126,7 +126,7 @@
126126
- app = iperf3-bench-client-{{ trunc_uuid }}
127127
register: client_jobs
128128

129-
- k8s_status:
129+
- operator_sdk.util.k8s_status:
130130
api_version: ripsaw.cloudbulldozer.io/v1alpha1
131131
kind: Benchmark
132132
name: "{{ meta.name }}"

0 commit comments

Comments
 (0)