diff --git a/buildconfigs/03-forked-dockerfiles.yaml b/buildconfigs/03-forked-dockerfiles.yaml index 1d951f4..f23cca1 100644 --- a/buildconfigs/03-forked-dockerfiles.yaml +++ b/buildconfigs/03-forked-dockerfiles.yaml @@ -2,6 +2,9 @@ apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: forked-dockerfiles + labels: + skip-release-branch: "true" + skip-replace-cli: "true" spec: source: type: Git diff --git a/buildconfigs/04-builder.yaml b/buildconfigs/04-builder.yaml index 718cab8..6a1a2bb 100644 --- a/buildconfigs/04-builder.yaml +++ b/buildconfigs/04-builder.yaml @@ -4,19 +4,21 @@ metadata: name: builder labels: builder-replacement: skip + skip-release-branch: "true" + skip-replace-cli: "true" spec: source: type: Git git: uri: 'https://github.com/okd-project/images' ref: main - contextDir: . + contextDir: builder images: [] strategy: type: Docker dockerStrategy: imageOptimizationPolicy: SkipLayers - dockerfilePath: okd-builder.Dockerfile + dockerfilePath: Dockerfile from: kind: "ImageStreamTag" name: "tools:centos9" diff --git a/buildconfigs/05-base.yaml b/buildconfigs/05-base.yaml index d7fc31e..b1e8412 100644 --- a/buildconfigs/05-base.yaml +++ b/buildconfigs/05-base.yaml @@ -2,29 +2,26 @@ apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: base + labels: + # TODO: do we need branch cut for this? + skip-release-branch: "true" + skip-replace-cli: "true" spec: source: type: Git git: - uri: 'https://github.com/openshift/images' - ref: release-4.12 + uri: 'https://github.com/okd-project/images' + ref: main contextDir: base - images: - - from: - kind: ImageStreamTag - name: 'release:forked-dockerfiles' - paths: - - sourcePath: /code/base/Dockerfile.centos9 - destinationDir: "./base" + images: [] strategy: type: Docker dockerStrategy: imageOptimizationPolicy: SkipLayers - dockerfilePath: Dockerfile.centos9 + dockerfilePath: Dockerfile from: kind: "ImageStreamTag" - name: "release:builder" - + name: "tools:centos9" output: to: kind: ImageStreamTag diff --git a/buildconfigs/10-cli.yaml b/buildconfigs/06-cli.yaml similarity index 97% rename from buildconfigs/10-cli.yaml rename to buildconfigs/06-cli.yaml index ef23abe..3f0ad60 100644 --- a/buildconfigs/10-cli.yaml +++ b/buildconfigs/06-cli.yaml @@ -2,6 +2,8 @@ apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: cli + labels: + skip-replace-cli: "true" spec: source: type: Git diff --git a/buildconfigs/10-branding.yaml b/buildconfigs/10-branding.yaml index 6c9b133..a8b5fbb 100644 --- a/buildconfigs/10-branding.yaml +++ b/buildconfigs/10-branding.yaml @@ -2,6 +2,8 @@ apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: branding + labels: + skip-release-branch: "true" spec: source: type: Git diff --git a/buildconfigs/10-cloud-credential-operator.yaml b/buildconfigs/10-cloud-credential-operator.yaml index c95a8fc..59eda63 100644 --- a/buildconfigs/10-cloud-credential-operator.yaml +++ b/buildconfigs/10-cloud-credential-operator.yaml @@ -2,6 +2,8 @@ apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: cloud-credential-operator + labels: + resources-profile: high spec: source: type: Git diff --git a/buildconfigs/10-console.yaml b/buildconfigs/10-console.yaml index 1dfed1c..a119d95 100644 --- a/buildconfigs/10-console.yaml +++ b/buildconfigs/10-console.yaml @@ -2,6 +2,8 @@ apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: console + labels: + resources-profile: high spec: source: type: Git diff --git a/buildconfigs/10-etcd.yaml b/buildconfigs/10-etcd.yaml index 9701786..e778e50 100644 --- a/buildconfigs/10-etcd.yaml +++ b/buildconfigs/10-etcd.yaml @@ -2,6 +2,8 @@ apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: etcd + labels: + skip-release-branch: "true" spec: source: type: Git diff --git a/buildconfigs/10-machine-config-operator.yaml b/buildconfigs/10-machine-config-operator.yaml index 17f7e09..d1c9280 100644 --- a/buildconfigs/10-machine-config-operator.yaml +++ b/buildconfigs/10-machine-config-operator.yaml @@ -17,6 +17,9 @@ spec: dockerStrategy: imageOptimizationPolicy: SkipLayers dockerfilePath: Dockerfile + buildArgs: + - name: "TAGS" + value: "okd" from: kind: "ImageStreamTag" name: "release:base" diff --git a/buildconfigs/10-sdn.yaml b/buildconfigs/10-sdn.yaml index 5a849db..e52cbe6 100644 --- a/buildconfigs/10-sdn.yaml +++ b/buildconfigs/10-sdn.yaml @@ -9,21 +9,18 @@ spec: uri: 'https://github.com/openshift/sdn' ref: release-4.12 contextDir: . - images: - - from: - kind: ImageStreamTag - name: 'release:forked-dockerfiles' - paths: - - sourcePath: /code/sdn/Dockerfile.centos9 - destinationDir: "./images/sdn" + images: [] strategy: type: Docker dockerStrategy: imageOptimizationPolicy: SkipLayers - dockerfilePath: images/sdn/Dockerfile.centos9 + dockerfilePath: images/sdn/Dockerfile.rhel from: kind: "ImageStreamTag" name: "release:base" + buildArgs: + - name: ovsver + value: "2.17" output: to: kind: ImageStreamTag diff --git a/buildconfigs/20-artifacts.yaml b/buildconfigs/20-artifacts.yaml index ea2ee4f..ca5dd69 100644 --- a/buildconfigs/20-artifacts.yaml +++ b/buildconfigs/20-artifacts.yaml @@ -2,6 +2,8 @@ apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: artifacts + labels: + skip-release-branch: "true" spec: source: contextDir: . diff --git a/buildconfigs/20-ovn-kubernetes-base.yaml b/buildconfigs/20-ovn-kubernetes-base.yaml index 90d87cc..2db2ae8 100644 --- a/buildconfigs/20-ovn-kubernetes-base.yaml +++ b/buildconfigs/20-ovn-kubernetes-base.yaml @@ -14,15 +14,15 @@ spec: type: Docker dockerStrategy: imageOptimizationPolicy: SkipLayers - dockerfilePath: Dockerfile.base + dockerfilePath: Dockerfile.base.rhel9 from: kind: "ImageStreamTag" name: "release:base" buildArgs: - name: ovsver - value: 2.17.0-31.el9s + value: 3.1.0-17.el9s - name: ovnver - value: 22.06.0-16.el9s + value: 22.03.0-22.el9s output: to: kind: ImageStreamTag diff --git a/buildconfigs/30-network-tools.yaml b/buildconfigs/30-network-tools.yaml index 8e0906f..beab78f 100644 --- a/buildconfigs/30-network-tools.yaml +++ b/buildconfigs/30-network-tools.yaml @@ -14,7 +14,7 @@ spec: kind: ImageStreamTag name: 'release:ovn-kubernetes' as: - - 'registry.ci.openshift.org/ocp/4.12:ovn-kubernetes' + - registry.ci.openshift.org/ocp/4.13:ovn-kubernetes-rhel-9 strategy: type: Docker dockerStrategy: diff --git a/buildconfigs/20-ovn-kubernetes.yaml b/buildconfigs/30-ovn-kubernetes.yaml similarity index 61% rename from buildconfigs/20-ovn-kubernetes.yaml rename to buildconfigs/30-ovn-kubernetes.yaml index bde83ea..35abceb 100644 --- a/buildconfigs/20-ovn-kubernetes.yaml +++ b/buildconfigs/30-ovn-kubernetes.yaml @@ -9,21 +9,15 @@ spec: uri: 'https://github.com/openshift/ovn-kubernetes' ref: release-4.12 contextDir: . - images: - - from: - kind: ImageStreamTag - name: 'release:forked-dockerfiles' - paths: - - sourcePath: /code/ovn-kubernetes/Dockerfile.centos9 - destinationDir: "." + images: [] strategy: type: Docker dockerStrategy: imageOptimizationPolicy: SkipLayers - dockerfilePath: Dockerfile.centos9 + dockerfilePath: Dockerfile.rhel9 from: kind: "ImageStreamTag" - name: "release:base" + name: "release:ovn-kubernetes-base" output: to: kind: ImageStreamTag diff --git a/buildconfigs/kustomization.yaml b/buildconfigs/kustomization.yaml index c4f724e..1595d15 100644 --- a/buildconfigs/kustomization.yaml +++ b/buildconfigs/kustomization.yaml @@ -4,6 +4,20 @@ kind: Kustomization namespace: okd patches: + - patch: |- + - op: replace + path: "/spec/source/git/ref" + value: release-4.13 + target: + kind: BuildConfig + labelSelector: "skip-release-branch!=true" + - patch: |- + - op: replace + path: "/spec/source/git/ref" + value: openshift-4.13 + target: + kind: BuildConfig + name: etcd # The next patch will replace the build-stage images used by the upstream repositories' Dockerfiles with the okd builder one. # In particular, each stage extending from an image contained in the `as` array below will start from the ImageStreamTag release:builder # In the future, we may change this to be more specific to the builder image features. E.g., we may need one builder image per golang version. @@ -15,6 +29,10 @@ patches: kind: "ImageStreamTag" name: "release:builder" as: + - 'registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.20-openshift-4.13' + - 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.20-openshift-4.13' + - 'registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.19-openshift-4.13' + - 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.13' - 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.12' - 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.18-openshift-4.12' - 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.18-openshift-4.11' @@ -22,8 +40,16 @@ patches: - 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.17-openshift-4.10' - 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.10' - 'registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.9' + - 'registry.ci.openshift.org/ocp/builder:rhel-8-base-nodejs-openshift-4.13' - 'registry.ci.openshift.org/ocp/builder:rhel-8-etcd-golang-1.16' - 'registry.ci.openshift.org/openshift/release:golang-1.17' + - 'registry.ci.openshift.org/openshift/release:golang-1.18' + - 'registry.ci.openshift.org/openshift/release:golang-1.19' + - 'registry.ci.openshift.org/openshift/release:golang-1.20' + target: + kind: BuildConfig + labelSelector: "builder-replacement!=skip" + - patch: |- - op: add path: "/spec/source/images/-" value: @@ -33,9 +59,10 @@ patches: as: - 'registry.ci.openshift.org/ocp/4.11:cli' - 'registry.ci.openshift.org/ocp/4.12:cli' + - 'registry.ci.openshift.org/ocp/4.13:cli' target: kind: BuildConfig - labelSelector: "builder-replacement!=skip" + labelSelector: "skip-replace-cli!=true" # TODO: tune resources req/lim - patch: |- - op: add @@ -82,6 +109,7 @@ resources: - 03-forked-dockerfiles.yaml - 04-builder.yaml - 05-base.yaml + - 06-cli.yaml - 10-agent-installer-node-agent.yaml - 10-agent-installer-orchestrator.yaml - 10-alibaba-cloud-controller-manager.yaml @@ -109,7 +137,6 @@ resources: - 10-baremetal-runtimecfg.yaml - 10-branding.yaml - 10-cli-artifacts.yaml - - 10-cli.yaml - 10-cloud-credential-operator.yaml - 10-cloud-network-config-controller.yaml - 10-cluster-authentication-operator.yaml @@ -257,12 +284,12 @@ resources: - 20-deployer.yaml - 20-haproxy-router.yaml - 20-machine-os-images.yaml - - 20-ovn-kubernetes.yaml - 20-ovn-kubernetes-base.yaml - 20-tools.yaml - 30-fedora-coreos.yaml - 30-network-tools.yaml - 30-ovn-kubernetes-microshift.yaml + - 30-ovn-kubernetes.yaml - 30-tests.yaml - failing-20-kuryr-cni-base.yaml - failing-20-kuryr-cni.yaml diff --git a/forks/base/Dockerfile.centos9 b/forks/base/Dockerfile.centos9 deleted file mode 100644 index d6b8197..0000000 --- a/forks/base/Dockerfile.centos9 +++ /dev/null @@ -1,20 +0,0 @@ -# -# This is the rhel7 base image from which all rhel7 based Atomic OpenShift images -# inherit. Only packages common to all downstream images should be here. -# -# The standard name for this image is openshift/ose-base -# -FROM rhel7 - -RUN INSTALL_PKGS=" \ - which tar wget hostname util-linux iputils \ - socat tree findutils lsof bind-utils file shadow-utils \ - iproute centos-release-nfv-openvswitch \ - " && \ - echo 'skip_missing_names_on_install=0' >> /etc/yum.conf && \ - yum --disablerepo=origin-local-release install -y $INSTALL_PKGS && \ - yum clean all && \ - mkdir -p /var/lib/origin - -LABEL io.k8s.display-name="Atomic OpenShift RHEL 7 Base" \ - io.k8s.description="This is the base image from which all Atomic OpenShift images inherit." diff --git a/forks/ovn-kubernetes/Dockerfile.centos9 b/forks/ovn-kubernetes/Dockerfile.centos9 deleted file mode 100644 index f0b8cea..0000000 --- a/forks/ovn-kubernetes/Dockerfile.centos9 +++ /dev/null @@ -1,94 +0,0 @@ -# -# This is the OpenShift ovn overlay network image. -# it provides an overlay network using ovs/ovn/ovn-kube -# -# The standard name for this image is ovn-kube - -# Notes: -# This is for a build where the ovn-kubernetes utilities -# are built in this Dockerfile and included in the image (instead of the rpm) -# - -FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.18-openshift-4.12 AS builder - -WORKDIR /go/src/github.com/openshift/ovn-kubernetes -COPY . . - -# build the binaries -RUN cd go-controller; CGO_ENABLED=0 make -RUN cd go-controller; CGO_ENABLED=0 make windows - -FROM registry.ci.openshift.org/ocp/4.12:cli AS cli - -FROM registry.ci.openshift.org/ocp/4.12:base - -USER root - -ENV PYTHONDONTWRITEBYTECODE yes - -# install needed rpms - openvswitch must be 2.10.4 or higher -# install selinux-policy first to avoid a race -RUN yum install -y \ - selinux-policy && \ - yum clean all - -ARG ovsver=2.17.0-31.el9s -ARG ovnver=22.06.0-16.el9s - -RUN INSTALL_PKGS=" \ - openssl firewalld-filesystem \ - libpcap iproute iproute-tc strace \ - containernetworking-plugins \ - tcpdump iputils \ - libreswan \ - ethtool conntrack-tools \ - centos-release-nfv-openvswitch \ - " && \ - yum install -y --setopt=tsflags=nodocs --setopt=skip_missing_names_on_install=False $INSTALL_PKGS && \ - yum install -y --setopt=tsflags=nodocs --setopt=skip_missing_names_on_install=False "openvswitch2.17 = $ovsver" "openvswitch2.17-devel = $ovsver" "python3-openvswitch2.17 = $ovsver" "openvswitch2.17-ipsec = $ovsver" && \ - yum install -y --setopt=tsflags=nodocs --setopt=skip_missing_names_on_install=False "ovn22.06 = $ovnver" "ovn22.06-central = $ovnver" "ovn22.06-host = $ovnver" "ovn22.06-vtep = $ovnver" && \ - yum clean all && rm -rf /var/cache/* - -RUN mkdir -p /var/run/openvswitch && \ - mkdir -p /var/run/ovn && \ - mkdir -p /etc/cni/net.d && \ - mkdir -p /opt/cni/bin && \ - mkdir -p /usr/libexec/cni/ && \ - mkdir -p /root/windows/ - -COPY --from=builder /go/src/github.com/openshift/ovn-kubernetes/go-controller/_output/go/bin/ovnkube /usr/bin/ -COPY --from=builder /go/src/github.com/openshift/ovn-kubernetes/go-controller/_output/go/bin/ovn-kube-util /usr/bin/ -COPY --from=builder /go/src/github.com/openshift/ovn-kubernetes/go-controller/_output/go/bin/ovn-k8s-cni-overlay /usr/libexec/cni/ -COPY --from=builder /go/src/github.com/openshift/ovn-kubernetes/go-controller/_output/go/bin/windows/hybrid-overlay-node.exe /root/windows/ -COPY --from=builder /go/src/github.com/openshift/ovn-kubernetes/go-controller/_output/go/bin/ovndbchecker /usr/bin/ -COPY --from=builder /go/src/github.com/openshift/ovn-kubernetes/go-controller/_output/go/bin/ovnkube-trace /usr/bin/ - -COPY --from=cli /usr/bin/oc /usr/bin/ -RUN ln -s /usr/bin/oc /usr/bin/kubectl -RUN stat /usr/bin/oc - -# copy git commit number into image -COPY .git/HEAD /root/.git/HEAD -COPY .git/refs/heads/ /root/.git/refs/heads/ - -# ovnkube.sh is the entry point. This script examines environment -# variables to direct operation and configure ovn -COPY dist/images/ovnkube.sh /root/ - -# iptables wrappers -COPY ./dist/images/iptables-scripts/iptables /usr/sbin/ -COPY ./dist/images/iptables-scripts/iptables-save /usr/sbin/ -COPY ./dist/images/iptables-scripts/iptables-restore /usr/sbin/ -COPY ./dist/images/iptables-scripts/ip6tables /usr/sbin/ -COPY ./dist/images/iptables-scripts/ip6tables-save /usr/sbin/ -COPY ./dist/images/iptables-scripts/ip6tables-restore /usr/sbin/ -COPY ./dist/images/iptables-scripts/iptables /usr/sbin/ - -LABEL io.k8s.display-name="ovn kubernetes" \ - io.k8s.description="This is a component of OpenShift Container Platform that provides an overlay network using ovn." \ - summary="This is a component of OpenShift Container Platform that provides an overlay network using ovn." \ - io.openshift.tags="openshift" \ - maintainer="Tim Rozet " - -WORKDIR /root -ENTRYPOINT /root/ovnkube.sh diff --git a/forks/sdn/Dockerfile.centos9 b/forks/sdn/Dockerfile.centos9 deleted file mode 100644 index c6c5910..0000000 --- a/forks/sdn/Dockerfile.centos9 +++ /dev/null @@ -1,33 +0,0 @@ -FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.18-openshift-4.11 AS builder -WORKDIR /go/src/github.com/openshift/sdn -COPY . . -RUN make build --warn-undefined-variables -RUN CGO_ENABLED=0 GO_BUILD_FLAGS="-tags no_openssl" make build GO_BUILD_PACKAGES="github.com/openshift/sdn/cmd/openshift-sdn-cni" --warn-undefined-variables - -FROM registry.ci.openshift.org/ocp/4.11:base -COPY --from=builder /go/src/github.com/openshift/sdn/openshift-sdn-node /usr/bin/ -COPY --from=builder /go/src/github.com/openshift/sdn/openshift-sdn-controller /usr/bin/ -COPY --from=builder /go/src/github.com/openshift/sdn/openshift-sdn-cni /opt/cni/bin/openshift-sdn -COPY --from=builder /go/src/github.com/openshift/sdn/host-local /usr/bin/cni/osdn-host-local - -RUN yum install -y centos-release-nfv-openvswitch && \ - INSTALL_PKGS=" \ - openvswitch2.15 container-selinux socat ethtool nmap-ncat \ - libmnl libnetfilter_conntrack conntrack-tools \ - libnfnetlink iproute procps-ng openssl \ - iputils binutils xz util-linux dbus nftables \ - tcpdump" && \ - yum install -y --setopt=tsflags=nodocs --setopt=skip_missing_names_on_install=False $INSTALL_PKGS && \ - mkdir -p /etc/sysconfig/cni/net.d && \ - yum clean all && rm -rf /var/cache/* - -COPY ./images/iptables-scripts/iptables /usr/sbin/ -COPY ./images/iptables-scripts/iptables-save /usr/sbin/ -COPY ./images/iptables-scripts/iptables-restore /usr/sbin/ -COPY ./images/iptables-scripts/ip6tables /usr/sbin/ -COPY ./images/iptables-scripts/ip6tables-save /usr/sbin/ -COPY ./images/iptables-scripts/ip6tables-restore /usr/sbin/ - -LABEL io.k8s.display-name="OpenShift SDN" \ - io.k8s.description="This is a component of OpenShift and contains the default SDN implementation." \ - io.openshift.tags="openshift,sdn,sdn-controller" diff --git a/pipelines/build-from-scratch.yaml b/pipelines/build-from-scratch.yaml index ef27db4..497e5a2 100644 --- a/pipelines/build-from-scratch.yaml +++ b/pipelines/build-from-scratch.yaml @@ -33,6 +33,7 @@ spec: - builder - forked-dockerfiles - base + - cli - name: batch-01 timeout: "4h0m0s" runAfter: @@ -165,7 +166,6 @@ spec: - oauth-proxy - oauth-server - oc-mirror - - cli - cli-artifacts - openshift-apiserver - openshift-controller-manager