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 task to wait for GitOps plugin activation #473

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nsilla
Copy link
Contributor

@nsilla nsilla commented Oct 18, 2024

SUMMARY

In order to run ZTP spoke cluster deployments, the OpenShift GitOps operator must be complemented with the ztp site generator plugin.

The plugin is enabled through the argocd CR in the hub cluster.

Upon updating the CR, the openshift-gitops-repo-server deployment is updated with the mounted volume containing the new kustomize configuration.

This task involves pulling two images to run as initContainers to the repo server pod.

The problem is the pulling of the images may take too much time in disconnected networks, causing the job to time out while waiting for the deployment to start.

This PR adds a tasks that waits for the repo server container to be updated before the role creates the GitOps applications, so once the application is created the job may move directly to the deployment stage.

ISSUE TYPE
  • Bug
Tests
  • [] TestBos2

TestBos2: bevo/acm-hub bevo/ztp-spoke-4.15

@nsilla nsilla requested a review from a team as a code owner October 18, 2024 13:25
@nsilla nsilla requested a review from ramperher October 18, 2024 13:25
Copy link

@dcibot
Copy link
Collaborator

dcibot commented Oct 18, 2024

Copy link

@dcibot
Copy link
Collaborator

dcibot commented Oct 18, 2024

@ramperher
Copy link
Contributor

I think you need to take a look at the condition you're defining in the new task because it's not working fine:

fatal: [localhost -> jumpbox]: FAILED! => {"msg": "The conditional check 'repo_server_pod.resources[-1] | community.general.json_query(\"status.conditions[?type=='Ready'].status\") == [\"True\"]' failed. The error was: Error in jmespath.search in json_query filter plugin:
list object has no element -1"}

Copy link

@dcibot
Copy link
Collaborator

dcibot commented Oct 21, 2024

@@ -208,6 +208,22 @@
.dockerconfigjson: "{{ _czga_encoded_pull_secret['content'] }}"
no_log: true

- name: Wait for the GitOps ZTP plugin activation
community.kubernetes.k8s_info:
api_version: v0
Copy link
Contributor

Choose a reason for hiding this comment

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

v1 instead of v0?

Copy link

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.

3 participants