Skip to content

Commit 91c0771

Browse files
committed
[ci] Pin loki-operator version to 6.3.0
Loki-operator needs to be pinned to 6.3.0, because 6.3.1 has this issue: https://issues.redhat.com/browse/LOG-7752
1 parent 5d5dd2d commit 91c0771

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

ci/cloudkitty-pre_deploy-install_loki.yml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,42 @@
66
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
77
PATH: "{{ cifmw_path }}"
88
tasks:
9+
- name: Set the loki-operator version to pin the version
10+
ansible.builtin.set_fact:
11+
loki_operator_version: "v6.3.0"
12+
913
- name: Deploy loki operator
1014
ansible.builtin.shell:
1115
cmd: |
1216
oc apply -f {{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/deploy-loki-for-ck.yaml
1317
14-
- name: Wait up to 5 minutes until the Loki CSV is Succeeded
18+
- name: Get and approve the installplan when the version is pinned
19+
when: loki_operator_version is defined
20+
block:
21+
- name: Get the installplan from the loki-operator subscription
22+
ansible.builtin.shell:
23+
cmd: |
24+
oc get installplan -n openshift-operators-redhat | grep "loki-operator.{{ loki_operator_version }}" | awk '{print $1}'
25+
retries: 10
26+
delay: 10
27+
register: loki_installplan
28+
until: loki_installplan.stdout_lines | length != 0
29+
30+
- name: Show the loki_installplan from oc get installplan
31+
ansible.builtin.debug:
32+
var: loki_installplan
33+
34+
- name: Approve the installation
35+
ansible.builtin.shell:
36+
cmd: |
37+
oc patch -n openshift-operators-redhat installplan {{ loki_installplan.stdout }} --type='json' -p='[{"op": "replace", "path": "/spec/approved", "value":true}]'
38+
39+
- name: Wait for the resources to be available
1540
ansible.builtin.shell:
16-
cmd:
17-
oc get csv | grep loki-operator | grep Succeeded
41+
cmd: |
42+
oc get csv | grep loki-operator
1843
ignore_errors: true
1944
register: output
20-
until: output.stdout_lines | length == 1
45+
until: output.stdout_lines | length == 1 and "Succeeded" in output.stdout
2146
retries: 30
2247
delay: 10

ci/deploy-loki-for-ck.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ metadata:
2121
namespace: openshift-operators-redhat
2222
spec:
2323
channel: stable-6.3
24+
installPlanApproval: Manual
25+
startingCSV: loki-operator.v6.3.0
2426
name: loki-operator
2527
source: redhat-operators
2628
sourceNamespace: openshift-marketplace

0 commit comments

Comments
 (0)