Skip to content

Conversation

praveenkumar
Copy link
Contributor

This pr update readme and respective files to build flannel rpm and consume it as part of microshift multibuild container.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 10, 2024
@openshift-ci-robot
Copy link

@praveenkumar: This pull request explicitly references no jira issue.

In response to this:

This pr update readme and respective files to build flannel rpm and consume it as part of microshift multibuild container.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from copejon and ggiguash October 10, 2024 09:32
@praveenkumar
Copy link
Contributor Author

/hold

Looks like only changing the release info json in case of optional assets doesn't really update the image, this image is part of kustomization ?

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 10, 2024
@praveenkumar
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 10, 2024
@praveenkumar
Copy link
Contributor Author

Put changes directly kustomization.${arch}.yaml for flannel payload.

@eslutsky
Copy link
Contributor

/test verify

kube_proxy_okd_image_name="${kube_proxy_okd_image_with_hash%%@*}"
echo "kube-proxy image name ${kube_proxy_okd_image_name}"
kube_proxy_okd_image_hash="${kube_proxy_okd_image_with_hash##*@}"
echo "kube-proxy image hash ${kube_proxy_okd_image_hash}"
Copy link
Contributor

Choose a reason for hiding this comment

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

What are we trying to do with the name manipulation? Maybe expanding on it in the comment would be helpful.
Can we remove the echo's?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I will put comment why it is required.

@@ -43,6 +43,14 @@ replace_assets(){
# update the infra pods for crio
sed -i 's,pause_image .*,pause_image = '"\"${pod_image}\""',' "packaging/crio.conf.d/10-microshift_${UNAME_TO_GOARCH_MAP[${arch}]}.conf"

# kube proxy is required for flannel
kube_proxy_okd_image_with_hash=$(oc adm release info --image-for="kube-proxy" "${okd_url}:${okd_releaseTag}")
echo "kube-proxy ${kube_proxy_okd_image}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Getting a linter warning here:

./okd/src/use_okd_assets.sh:48:22: warning: kube_proxy_okd_image is referenced but not assigned. [SC2154]

Comment on lines 46 to 57
# kube proxy is required for flannel
kube_proxy_okd_image_with_hash=$(oc adm release info --image-for="kube-proxy" "${okd_url}:${okd_releaseTag}")
echo "kube-proxy ${kube_proxy_okd_image_with_hash}"
# The OKD image we retrieve is in the format quay.io/okd/scos-content@sha256:<hash>,
# where the image name and digest (hash) are combined in a single string.
# However, in the kustomization.${arch}.yaml file, we need the image name (newName) and
# the digest in separate fields. To achieve this, we first extract the image name and digest
# using parameter expansion, then use the sed command to insert these values into the
# appropriate places within the YAML file.
kube_proxy_okd_image_name="${kube_proxy_okd_image_with_hash%%@*}"
kube_proxy_okd_image_hash="${kube_proxy_okd_image_with_hash##*@}"
sed -i "s|newName:.*|newName: ${kube_proxy_okd_image_name}|; s|digest:.*|digest: ${kube_proxy_okd_image_hash}|" "${MICROSHIFT_ROOT}/assets/optional/kube-proxy/kustomization.${arch}.yaml"
Copy link
Contributor

@ggiguash ggiguash Oct 11, 2024

Choose a reason for hiding this comment

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

Sorry for being so picky about this, but can we use yq to edit yaml files?
Something like the following (not tested):

yq eval '.images[] |= select(.name == "kube-proxy") | .newName = "${kube_proxy_okd_image_name}" | .digest = "${kube_proxy_okd_image_hash}"' -i "${MICROSHIFT_ROOT}/assets/optional/kube-proxy/kustomization.${arch}.yaml"

We can have yq installed using ./scripts/fetch_tools.sh yq

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also prefer yq but it means adding another dep and that's the reason I went with sed.

Copy link
Contributor

@ggiguash ggiguash Oct 11, 2024

Choose a reason for hiding this comment

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

It should not be a problem since we have a standard way of installing yq.
We can call ./scripts/fetch_tools.sh yq in the script.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Older version of yq have issue when try to replace string it also remove
empty line which is required.
This pr update readme and respective files to build flannel rpm and
consume it as part of microshift multibuild container.
@praveenkumar
Copy link
Contributor Author

/test e2e-aws-tests-bootc-arm

@eslutsky
Copy link
Contributor

/lgtm

@eslutsky
Copy link
Contributor

/override e2e-aws-tests-bootc-arm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 16, 2024
Copy link
Contributor

openshift-ci bot commented Oct 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eslutsky, praveenkumar

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 16, 2024
Copy link
Contributor

openshift-ci bot commented Oct 16, 2024

@eslutsky: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • e2e-aws-tests-bootc-arm

Only the following failed contexts/checkruns were expected:

  • ci/prow/e2e-aws-tests
  • ci/prow/e2e-aws-tests-arm
  • ci/prow/e2e-aws-tests-bootc
  • ci/prow/e2e-aws-tests-bootc-arm
  • ci/prow/images
  • ci/prow/test-unit
  • ci/prow/verify
  • pull-ci-openshift-microshift-main-e2e-aws-tests
  • pull-ci-openshift-microshift-main-e2e-aws-tests-arm
  • pull-ci-openshift-microshift-main-e2e-aws-tests-bootc
  • pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-arm
  • pull-ci-openshift-microshift-main-images
  • pull-ci-openshift-microshift-main-test-unit
  • pull-ci-openshift-microshift-main-verify
  • tide

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

In response to this:

/override e2e-aws-tests-bootc-arm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@eslutsky
Copy link
Contributor

/override ci/prow/e2e-aws-tests-bootc-arm

Copy link
Contributor

openshift-ci bot commented Oct 16, 2024

@eslutsky: Overrode contexts on behalf of eslutsky: ci/prow/e2e-aws-tests-bootc-arm

In response to this:

/override ci/prow/e2e-aws-tests-bootc-arm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Contributor

openshift-ci bot commented Oct 16, 2024

@praveenkumar: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 6a8f4fd into openshift:main Oct 16, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants