Skip to content

Commit 54fb11e

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 f2ec7fd commit 54fb11e

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

ci/cloudkitty-pre_deploy-install_loki.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,38 @@
1414
github.com/openstack-k8s-operators/telemetry-operator:
1515
src_dir: "{{ telemetry_operator_dir | default('telemetry-operator/') }}"
1616

17+
# NOTE: The value doesn't get used unless the deploy-loki-for-ck is converted into a template and rendered.
18+
# TODO: Update the yaml to a template
19+
- name: Set the loki-operator version to pin the version
20+
ansible.builtin.set_fact:
21+
loki_operator_version: "v6.3.0"
22+
1723
- name: Deploy loki operator
1824
ansible.builtin.shell:
1925
cmd: |
2026
oc apply -f {{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/deploy-loki-for-ck.yaml
2127
28+
- name: Get and approve the installplan when the version is pinned
29+
when: loki_operator_version is defined
30+
block:
31+
- name: Get the installplan from the loki-operator subscription
32+
ansible.builtin.shell:
33+
cmd: |
34+
oc get installplan -n openshift-operators-redhat | grep "loki-operator.{{ loki_operator_version }}" | awk '{print $1}'
35+
retries: 10
36+
delay: 10
37+
register: loki_installplan
38+
until: loki_installplan.stdout_lines | length != 0
39+
40+
- name: Show the loki_installplan from oc get installplan
41+
ansible.builtin.debug:
42+
var: loki_installplan
43+
44+
- name: Approve the installation
45+
ansible.builtin.shell:
46+
cmd: |
47+
oc patch -n openshift-operators-redhat installplan {{ loki_installplan.stdout }} --type='json' -p='[{"op": "replace", "path": "/spec/approved", "value":true}]'
48+
2249
- name: Wait up to 5 minutes until the Loki CSV is Succeeded
2350
ansible.builtin.shell:
2451
cmd: |

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)