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

OPRUN-3558: Add hostPath mount for /var/lib/kubelet #71

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

anik120
Copy link
Contributor

@anik120 anik120 commented Sep 26, 2024

MCO makes the global pull secrets available in /var/lib/kubelet. Catalogd will look for these secrets in /etc/catalogd folder, ref catalogd:416.

This PR hostPath mounts the /var/lib/kublet directory from the host to the /etc/catalogd directory in the container's filesystem.

RFC: OLMv1 Private registry support

@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 26, 2024

@anik120: This pull request references OPRUN-3558 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

MCO makes the global pull secrets available in /var/lib/kubelet. Catalogd will look for these secrets in /etc/catalogd folder, ref catalogd:416.

This PR hostPath mounts the /var/lib/kublet directory from the host to the /etc/catalogd directory in the container's filesystem.

RFC: OLMv1 Private registry support

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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 26, 2024
Comment on lines 34 to 48
##################################################
# Determine if using gsed (for macOS) or sed
##################################################

if [[ "$OSTYPE" == "darwin"* ]]; then
if command -v gsed >/dev/null 2>&1; then
SED_CMD="gsed"
else
echo "gsed is not installed. Please install it using 'brew install gnu-sed'."
exit 1
fi
else
SED_CMD="sed"
fi

Copy link
Contributor

Choose a reason for hiding this comment

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

Same issue as with the operator-controller, you just need to add an extension to the -i argument.

@@ -52,7 +67,7 @@ mkdir -p "${TMP_ROOT}/openshift"
cp -a "${REPO_ROOT}/openshift/kustomize" "${TMP_ROOT}/openshift/kustomize"

# Override OPENSHIFT-NAMESPACE to ${NAMESPACE}
find "${TMP_ROOT}" -name "*.yaml" -exec sed -i "s/OPENSHIFT-NAMESPACE/${NAMESPACE}/g" {} \;
find "${TMP_ROOT}" -name "*.yaml" -exec "$SED_CMD" -i "s/OPENSHIFT-NAMESPACE/${NAMESPACE}/g" {} \;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
find "${TMP_ROOT}" -name "*.yaml" -exec "$SED_CMD" -i "s/OPENSHIFT-NAMESPACE/${NAMESPACE}/g" {} \;
find "${TMP_ROOT}" -name "*.yaml" -exec sed -i.tmp "s/OPENSHIFT-NAMESPACE/${NAMESPACE}/g" {} \;

Copy link
Contributor

@tmshort tmshort left a comment

Choose a reason for hiding this comment

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

The macOS compatibility fix is a lot easier than presented.

MCO makes the global pull secrets available in `/var/lib/kubelet`.
Catalogd will look for these secrets in `/etc/catalogd`
folder, ref [catalogd:416](operator-framework/catalogd#416).

This PR hostPath mounts the `/var/lib/kublet` directory from the host to the
`/etc/catalogd` directory in the container's filesystem.

RFC: [OLMv1 Private registry support](https://docs.google.com/document/d/1BXD6kj5zXHcGiqvJOikU2xs8kV26TPnzEKp6n7TKD4M/edit?usp=sharing)
Signed-off-by: Anik Bhattacharjee <anbhatta@redhat.com>
Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

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

openshift-ci bot commented Sep 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anik120, everettraven

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 Sep 26, 2024
Copy link
Contributor

openshift-ci bot commented Sep 26, 2024

@anik120: 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 89e207c into openshift:main Sep 26, 2024
9 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: ose-olm-catalogd
This PR has been included in build ose-olm-catalogd-container-v4.18.0-202409262111.p0.g89e207c.assembly.stream.el9.
All builds following this will include this PR.

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.

5 participants