openshift / cluster-node-tuning-operator

Manage node-level tuning by orchestrating the tuned daemon.
Apache License 2.0
102 stars 105 forks source link

OKD-40: Unify OKD and OCP Dockerfiles #1058

Closed jupierce closed 6 months ago

jupierce commented 6 months ago

In order to support build OKD images on SCOS, the OKD team needs either (a) the same dockerfile to build successfully on CentOS and RHEL or (b) a separate file that builds on CentoS with the same number of layers as used by the OCP Dockerfile built by ART. This approach unifies the NTO Dockerfile.rhel9 to support model (a).

The Dockerfile.rhel9 OKD image size is ~495MiB vs a 453MB Dockerfile build.

jmencak commented 6 months ago

Thank you for the PR, Justin. I probably shouldn't be doing reviews Friday evening, so only a few initial thoughts.

I'll try to do a more thorough review next week. PTO Monday. Thank you.

Prashanth684 commented 6 months ago

/test okd-scos-images

jmencak commented 6 months ago

/lgtm cancel

jmencak commented 6 months ago

/approve

openshift-ci[bot] commented 6 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmencak, jupierce

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: - ~~[OWNERS](https://github.com/openshift/cluster-node-tuning-operator/blob/master/OWNERS)~~ [jmencak] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci-robot commented 6 months ago

@jupierce: This pull request references OKD-40 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.16.0" version, but no target version was set.

In response to [this](https://github.com/openshift/cluster-node-tuning-operator/pull/1058): >In order to support build OKD images on SCOS, the OKD team needs either (a) the same dockerfile to build successfully on CentOS and RHEL or (b) a separate file that builds on CentoS with the same number of layers as used by the OCP Dockerfile built by ART. >This approach unifies the NTO Dockerfile.rhel9 to support model (a). > >The Dockerfile.rhel9 OKD image size is ~495MiB vs a 453MB Dockerfile build. Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fcluster-node-tuning-operator). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
jupierce commented 6 months ago

As this is one of the last images we need to get OKD building again and the changes should be a no-op to OCP. /label acknowledge-critical-fixes-only

jmencak commented 6 months ago

Thank you for the changes, Justin. I thought we could get rid of the second "RUN" completely in both Dockerfiles, i.e. moving:

dnf clean all
rm -rf /var/cache/yum ~/patches /root/rpms
useradd -r -u 499 cluster-node-tuning-operator

too. But I don't think this is a blocker but we can clean this up later on.

So /lgtm

openshift-ci[bot] commented 6 months ago

@jupierce: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
openshift-bot commented 6 months ago

[ART PR BUILD NOTIFIER]

This PR has been included in build cluster-node-tuning-operator-container-v4.17.0-202405151441.p0.gf7fcf8c.assembly.stream.el9 for distgit cluster-node-tuning-operator. All builds following this will include this PR.