Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making powervc-certificate optional #86

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

irapandey
Copy link

This PR is resolving issue #85
Made changes in documentation as well as powervc-certificate is optional

@ppc64le-cloud-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: irapandey
Once this PR has been reviewed and has the lgtm label, please assign yussufsh for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ppc64le-cloud-bot
Copy link
Contributor

Welcome @irapandey! It looks like this is your first PR to ocp-power-automation/ocp4-playbooks-extras 🎉

@ppc64le-cloud-bot ppc64le-cloud-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 21, 2024
@irapandey irapandey force-pushed the powervc-cert-optional branch from bd85cfb to 41c3eac Compare October 21, 2024 07:36
@varad-ahirwadkar
Copy link
Contributor

/lgtm

@ppc64le-cloud-bot ppc64le-cloud-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 21, 2024
@yussufsh
Copy link
Contributor

/hold

@ppc64le-cloud-bot ppc64le-cloud-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 21, 2024
msg: "PowerVC certificate secret is not present!"
when: powervc_certificate.resources | length == 0

- fail:
- name: If powervc-certificate is empty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This task will fail if the above condition is true.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran it on a cluster - it just gives a message

TASK [ocp-csi-driver : Check if the PowerVC certificate's secret is exists] *************************************************************************************************************************************************************************
ok: [localhost]

TASK [ocp-csi-driver : If the powervc-certificate does not exists in default namespace] *************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "PowerVC certificate secret is not present!"
}

TASK [ocp-csi-driver : If powervc-certificate is empty] *********************************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "PowerVC certificate is empty! Please check the certificate's secret."
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the name parameters and replaces fail with debug

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TASK [ocp-csi-driver : Check if the PowerVC certificate's secret is exists] *************************************************************************************************************************************************************************
ok: [localhost]

TASK [ocp-csi-driver : If the powervc-certificate does not exists in default namespace] *************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "PowerVC certificate secret is not present!"
}

TASK [ocp-csi-driver : debug] ***********************************************************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "PowerVC certificate is empty! Please check the certificate's secret."
}

TASK [ocp-csi-driver : Create namespace for CSI driver validation] **********************************************************************************************************************************************************************************
ok: [localhost]

@ppc64le-cloud-bot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@ppc64le-cloud-bot ppc64le-cloud-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 21, 2024
@irapandey irapandey force-pushed the powervc-cert-optional branch from 58e8be6 to e0743c8 Compare October 21, 2024 09:32
@irapandey irapandey requested a review from yussufsh October 21, 2024 09:41
@irapandey
Copy link
Author

@varad-ahirwadkar - can you take a look?

msg: "PowerVC certificate secret is not present!"
when: powervc_certificate.resources | length == 0

- fail:
- debug:
msg: "PowerVC certificate is empty! Please check the certificate's secret."
when: >
(powervc_certificate.resources[0].data.certificate is not defined) or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add one more condition to validate only if the certificate is exists powervc_certificate.resources | length != 0 ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made the changes - can you review and let me know if that looks good

@irapandey irapandey force-pushed the powervc-cert-optional branch from e0743c8 to caf33f2 Compare December 2, 2024 11:05
Signed-off-by: ira-pandey1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants