Skip to content

Commit 76e17d0

Browse files
author
Sanjay Prabhakar
committed
Merge branch 'stable' into backuprestore-dev
2 parents abc77f0 + 35422f1 commit 76e17d0

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

bin/mas-devops-notify-slack

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ def notifyProvisionRoks(channels: list[str], rc: int, additionalMsg: str = None)
8181
message = [
8282
SlackUtil.buildHeader(f":glyph-ok: Your IBM Cloud ROKS cluster ({name}) is ready"),
8383
SlackUtil.buildSection(f"{url}"),
84-
SlackUtil.buildSection(f"<https://cloud.ibm.com/kubernetes/clusters|IBM Cloud Dashboard>{toolchainLink}")
84+
SlackUtil.buildSection(f"<https://cloud.ibm.com/kubernetes/clusters|IBM Cloud Dashboard> | {toolchainLink}")
8585
]
8686
if additionalMsg is not None:
8787
message.append(SlackUtil.buildSection(additionalMsg))
8888
else:
8989
message = [
9090
SlackUtil.buildHeader(f":glyph-fail: Your IBM Cloud ROKS cluster ({name}) failed to deploy"),
91-
SlackUtil.buildSection(f"<https://cloud.ibm.com/kubernetes/clusters|IBM Cloud Dashboard>{toolchainLink}")
91+
SlackUtil.buildSection(f"<https://cloud.ibm.com/kubernetes/clusters|IBM Cloud Dashboard> | {toolchainLink}")
9292
]
9393

9494
response = SlackUtil.postMessageBlocks(channels, message)

src/mas/devops/ocp.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,12 @@ def listInstances(dynClient: DynamicClient, apiVersion: str, kind: str) -> list:
317317

318318

319319
def waitForPVC(dynClient: DynamicClient, namespace: str, pvcName: str) -> bool:
320+
"""
321+
We will allow up to 10 minutes for a PVC to report a successful binding
322+
"""
320323
pvcAPI = dynClient.resources.get(api_version="v1", kind="PersistentVolumeClaim")
321-
maxRetries = 60
324+
maxRetries = 20
325+
retryDelaySeconds = 30
322326
foundReadyPVC = False
323327
retries = 0
324328
while not foundReadyPVC and retries < maxRetries:
@@ -328,11 +332,11 @@ def waitForPVC(dynClient: DynamicClient, namespace: str, pvcName: str) -> bool:
328332
if pvc.status.phase == "Bound":
329333
foundReadyPVC = True
330334
else:
331-
logger.debug(f"Waiting 5s for PVC {pvcName} to be ready before checking again ...")
332-
sleep(5)
335+
logger.debug(f"Waiting {retryDelaySeconds}s for PVC {pvcName} to be bound before checking again ...")
336+
sleep(retryDelaySeconds)
333337
except NotFoundError:
334-
logger.debug(f"Waiting 5s for PVC {pvcName} to be created before checking again ...")
335-
sleep(5)
338+
logger.debug(f"Waiting {retryDelaySeconds}s for PVC {pvcName} to be created before checking again ...")
339+
sleep(retryDelaySeconds)
336340

337341
return foundReadyPVC
338342

src/mas/devops/templates/pipelinerun-install.yml.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,10 @@ spec:
275275

276276
# Dependencies - SLS
277277
# -------------------------------------------------------------------------
278+
{%- if sls_channel is defined and sls_channel != "" %}
278279
- name: sls_channel
279-
value: '3.x'
280+
value: "{{ sls_channel }}"
281+
{%- endif %}
280282
{%- if sls_entitlement_file is defined and sls_entitlement_file != "" %}
281283
- name: sls_entitlement_file
282284
value: "{{ sls_entitlement_file }}"

0 commit comments

Comments
 (0)