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

Added networkpolicy creation for hosted clusters before creating storageclient #10648

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ocs_ci/deployment/hosted_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
get_latest_release_version,
)
from ocs_ci.utility.version import get_semantic_version
from ocs_ci.ocs.resources.storage_client import StorageClient

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -103,6 +104,16 @@ def do_deploy(self, cluster_names=None):
logger.info("Download kubeconfig for all clusters")
kubeconfig_paths = self.download_hosted_clusters_kubeconfig_files()

# Need to create networkpolicy as mentioned in bug 2281536,
# https://bugzilla.redhat.com/show_bug.cgi?id=2281536#c21

# Create Network Policy
storage_client = StorageClient()
for cluster_name in cluster_names:
storage_client.create_network_policy(
namespace_to_create_storage_client=f"clusters-{cluster_name}"
)

# stage 4 deploy ODF on all hosted clusters if not already deployed
for cluster_name in cluster_names:

Expand Down
Loading