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

skip-cli-download and change default case repository #840

Merged
merged 3 commits into from
Dec 8, 2024

Conversation

argeiger
Copy link
Member

Add a new option called skip-cli-downloads to skip the download of utilities. Useful in an air-gapped environment where you don't need to install them or if they are contained in your image.

Also, change the CASE repository from github to OCI

remove task calls for openshift-download-client

Remove openshift client download task

skip cli downloads when option set to true
Copy link

gitguardian bot commented Nov 22, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
10070264 Triggered Generic Password d1114fc automation-roles/50-install-cloud-pak/cp4ba/cp4ba-cluster/tasks/main.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link
Collaborator

@fketelaars fketelaars left a comment

Choose a reason for hiding this comment

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

Please review comments and change.

@@ -3,5 +3,7 @@ setup-instance-topology \
--cpd_operator_ns={{ current_cp4d_cluster.operators_project }} \
--cpd_instance_ns={{ current_cp4d_cluster.project }} \
--release={{ current_cp4d_cluster.cp4d_version }} \
--case_download=true \
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the --case_download and --from_oci should only be used with non-airgapped clusters. setup-instance-topology will not download the images if they are already in the case directory and that is how it should work.

@@ -1,6 +1,7 @@
/opt/ansible/bin/apply-olm \
--release={{ _p_current_cp4d_cluster.cp4d_version }} \
--case_download={%- if cpd_airgap | default(False) | bool -%}false{%- else -%}true{%- endif %} \
--from_oci=true \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also make --from_oci dependent on cpd_airgap

@@ -1,3 +1,4 @@
case-download \
--release={{ _p_current_cp4d_cluster.cp4d_version }} \
--from_oci=true \
Copy link
Collaborator

Choose a reason for hiding this comment

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

make --from_oci dependent on cpd_airgap

@@ -5,6 +5,7 @@ set -o pipefail
apply-cluster-components \
--release={{ _p_cp4d_version }} \
--license_acceptance=true \
--from_oci=true \
Copy link
Collaborator

Choose a reason for hiding this comment

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

make --from_oci dependent on cpd_airgap

extra_opts:
- --strip-components=1

when: not (cpd_skip_cli_downloads | default(False) | bool)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The unpack of cpd-cli should still be done if downloads are skipped.

retries: 5
delay: 10

- name: Unpack OpenJDK 9 package
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unpacking and installing Java should still be done if download skipped

@@ -1,50 +0,0 @@
---
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would like to keep the openshift-download-client role, just in case it is useful in the future

- name: Unpack OpenShift installer
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unpack of installer should be done even if download skipped

address comments from review

address comments from review

address comments from review

address comments from review

address comments from review
@fketelaars fketelaars marked this pull request as draft December 5, 2024 07:10
@fketelaars fketelaars changed the base branch from main to roks-airgapped December 8, 2024 16:33
@fketelaars fketelaars marked this pull request as ready for review December 8, 2024 16:33
@fketelaars fketelaars merged commit 80e4449 into IBM:roks-airgapped Dec 8, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants