Skip to content

Commit 36b4ff7

Browse files
committed
Merge remote-tracking branch 'odh/release-0.12.0-rc0' into sync/250408_odh_release
2 parents 2a7a323 + e7602df commit 36b4ff7

File tree

17 files changed

+99
-143
lines changed

17 files changed

+99
-143
lines changed

.github/workflows/fvt-base.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,18 @@ jobs:
4141
- name: Setup go
4242
uses: actions/setup-go@v5
4343
with:
44-
go-version: '1.21'
44+
go-version: '1.22'
4545

4646
- name: Start Minikube
47-
uses: medyagh/setup-minikube@v0.0.14
47+
uses: medyagh/setup-minikube@v0.0.19
4848
id: minikube
4949
with:
50-
minikube-version: 1.32.0
50+
minikube-version: 1.35.0
5151
container-runtime: docker
52-
kubernetes-version: v1.26.1
52+
kubernetes-version: v1.32.0
5353
cpus: max
5454
memory: max
55+
addons: storage-provisioner
5556

5657
- name: Check pods
5758
run: |

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
repos:
1515
- repo: https://github.com/golangci/golangci-lint
16-
rev: v1.51.2
16+
rev: v1.60.3
1717
hooks:
1818
- id: golangci-lint
1919
entry: golangci-lint run

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
5252
###############################################################################
5353
# Stage 2: Copy build assets to create the smallest final runtime image
5454
###############################################################################
55-
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest AS runtime
55+
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5 AS runtime
5656

5757
ARG USER=2000
5858
ARG IMAGE_VERSION

Dockerfile.develop

Lines changed: 8 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -21,53 +21,8 @@
2121
###############################################################################
2222
# Create the develop, test, and build environment
2323
###############################################################################
24-
25-
# TODO: replace the "go_toolset" build stage once ubi8/go-toolset:1.21 is available
26-
# the go-toolset 1.21 is based on ubi9, we need to update it in the base image as well.
27-
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest as go-toolset
28-
29-
# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
30-
# We need TARGETOS and TARGETARCH (not BUILDOS and BUILDARCH) since the developer
31-
# image should be built for the OS of the developer using it (this is not a "builder image")
32-
ARG TARGETOS
33-
ARG TARGETARCH
34-
35-
ARG GOLANG_VERSION=1.21.6
36-
37-
USER root
38-
39-
ENV HOME=/root \
40-
PATH=/usr/local/go/bin:$PATH:
41-
42-
WORKDIR /workspace
43-
44-
# install necessary tools that are included in the ubi/go-toolset image that we are temporarily replacing
45-
RUN --mount=type=cache,target=/root/.cache/microdnf:rw \
46-
microdnf --setopt=cachedir=/root/.cache/microdnf --nodocs install \
47-
diffutils \
48-
gcc-c++ \
49-
make \
50-
wget \
51-
tar \
52-
git \
53-
which \
54-
&& microdnf update --nodocs \
55-
&& true
56-
57-
# install go
58-
RUN true \
59-
&& wget -qO go.tgz "https://golang.org/dl/go${GOLANG_VERSION}.${TARGETOS:-linux}-${TARGETARCH:-amd64}.tar.gz" \
60-
&& tar -C /usr/local -xzf go.tgz \
61-
&& go version \
62-
&& rm go.tgz \
63-
&& true
64-
65-
66-
####################################################################################
67-
# TODO: replace "go-toolset" build stage with ubi/go-toolset:1.21 once available #
68-
# and swap `microdnf` commands for `dnf` #
69-
####################################################################################
70-
FROM go-toolset
24+
ARG GOLANG_VERSION=1.22
25+
FROM registry.access.redhat.com/ubi9/go-toolset:$GOLANG_VERSION
7126

7227
# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
7328
# don't provide "default" values (e.g. 'ARG TARGETARCH=amd64') for non-buildx environments,
@@ -88,14 +43,15 @@ ENV HOME=/root
8843
WORKDIR /workspace
8944

9045
# Install build and dev tools
91-
# NOTE: Require python38 to install pre-commit
46+
# NOTE: Require python to install pre-commit
9247
RUN --mount=type=cache,target=/root/.cache/dnf:rw \
93-
microdnf install --setopt=cachedir=/root/.cache/dnf -y --nodocs \
48+
dnf install --setopt=cachedir=/root/.cache/dnf -y --nodocs \
9449
nodejs \
9550
jq \
96-
python38 \
97-
&& ln -sf /usr/bin/python3 /usr/bin/python \
98-
&& ln -sf /usr/bin/pip3 /usr/bin/pip \
51+
python3.11 \
52+
python3.11-pip \
53+
&& alternatives --install /usr/bin/unversioned-python python /usr/bin/python3.11 1 \
54+
&& alternatives --install /usr/bin/pip pip /usr/bin/pip3.11 1 \
9955
&& true
10056

10157
# Install pre-commit

Dockerfile.develop.ci

Lines changed: 8 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -15,52 +15,9 @@
1515
###############################################################################
1616
# Create the develop, test, and build environment
1717
###############################################################################
18+
ARG GOLANG_VERSION=1.22
19+
FROM registry.access.redhat.com/ubi9/go-toolset:$GOLANG_VERSION
1820

19-
# TODO: replace the "go_toolset" build stage once ubi8/go-toolset:1.21 is available
20-
# the go-toolset 1.21 is based on ubi9, we need to update it in the base image as well.
21-
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest as go-toolset
22-
23-
# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
24-
# We need TARGETOS and TARGETARCH (not BUILDOS and BUILDARCH) since the developer
25-
# image should be built for the OS of the developer using it (this is not a "builder image")
26-
ARG TARGETOS
27-
ARG TARGETARCH
28-
29-
ARG GOLANG_VERSION=1.21.6
30-
31-
USER root
32-
33-
ENV HOME=/root \
34-
PATH=/usr/local/go/bin:$PATH:
35-
36-
WORKDIR /workspace
37-
38-
# install necessary tools that are included in the ubi/go-toolset image that we are temporarily replacing
39-
RUN --mount=type=cache,target=/root/.cache/microdnf:rw \
40-
microdnf --setopt=cachedir=/root/.cache/microdnf --nodocs install \
41-
diffutils \
42-
gcc-c++ \
43-
make \
44-
wget \
45-
tar \
46-
git \
47-
which \
48-
&& microdnf update --nodocs \
49-
&& true
50-
51-
# install go
52-
RUN true \
53-
&& wget -qO go.tgz "https://golang.org/dl/go${GOLANG_VERSION}.${TARGETOS:-linux}-${TARGETARCH:-amd64}.tar.gz" \
54-
&& tar -C /usr/local -xzf go.tgz \
55-
&& go version \
56-
&& rm go.tgz \
57-
&& true
58-
59-
####################################################################################
60-
# TODO: replace "go-toolset" build stage with ubi/go-toolset:1.21 once available #
61-
# and swap `microdnf` commands for `dnf` #
62-
####################################################################################
63-
FROM go-toolset
6421

6522
# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
6623
# don't provide "default" values (e.g. 'ARG TARGETARCH=amd64') for non-buildx environments,
@@ -81,14 +38,15 @@ ENV HOME=/go
8138
WORKDIR /go/src/github.com/opendatahub-io/modelmesh-serving/
8239

8340
# Install build and dev tools
84-
# NOTE: Require python38 to install pre-commit
41+
# NOTE: Require python3 to install pre-commit
8542
RUN --mount=type=cache,target=/root/.cache/dnf:rw \
8643
dnf install --setopt=cachedir=/root/.cache/dnf -y --nodocs \
8744
nodejs \
8845
jq \
89-
python38 \
90-
&& ln -sf /usr/bin/python3 /usr/bin/python \
91-
&& ln -sf /usr/bin/pip3 /usr/bin/pip \
46+
python3.11 \
47+
python3.11-pip \
48+
&& alternatives --install /usr/bin/unversioned-python python /usr/bin/python3.11 1 \
49+
&& alternatives --install /usr/bin/pip pip /usr/bin/pip3.11 1 \
9250
&& true
9351

9452
# Install pre-commit
@@ -161,7 +119,7 @@ RUN true \
161119
# Use setup-envtest for kubebuilder to use K8s version 1.23+ for autoscaling/v2 (HPA)
162120
RUN true \
163121
&& go install sigs.k8s.io/controller-runtime/tools/setup-envtest@v0.0.0-20240320141353-395cfc7486e6 \
164-
&& setup-envtest use 1.23 \
122+
&& setup-envtest use 1.26 \
165123
&& true
166124

167125
# For GitHub Action 'lint', work around error "detected dubious ownership in repository at '/workspace'"

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ CONTROLLER_GEN_VERSION ?= "v0.11.4"
3535
# https://github.com/kubernetes-sigs/controller-runtime/tree/main/tools/setup-envtest
3636
# install with `go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest`
3737
# find available versions by running `setup-envtest list`
38-
KUBERNETES_VERSION ?= 1.23
38+
KUBERNETES_VERSION ?= 1.26
3939

4040
CRD_OPTIONS ?= "crd:maxDescLen=0"
4141

@@ -178,7 +178,7 @@ develop: build.develop
178178

179179
.PHONY: run
180180
## Run make target inside developer container (e.g. `make run fmt`)
181-
run: build.develop
181+
run:
182182
./scripts/develop.sh make $(RUN_ARGS)
183183

184184
.PHONY: push

controllers/modelmesh/cluster_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (cc ClusterConfig) Reconcile(ctx context.Context, namespace string, cl clie
7171
return err
7272
}
7373

74-
if cc.SRSpecs == nil || len(cc.SRSpecs) == 0 {
74+
if len(cc.SRSpecs) == 0 {
7575
if !notfound {
7676
return cl.Delete(ctx, m)
7777
}

controllers/modelmesh/modelmesh.go

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,26 @@ const ModelMeshEtcdPrefix = "mm"
3737

3838
// Models a deployment
3939
type Deployment struct {
40-
ServiceName string
41-
ServicePort uint16
42-
Name string
43-
Namespace string
44-
Owner mf.Owner
45-
SRSpec *kserveapi.ServingRuntimeSpec
46-
DefaultVModelOwner string
47-
Log logr.Logger
48-
Metrics bool
49-
PrometheusPort uint16
50-
PrometheusScheme string
51-
PayloadProcessors string
52-
ModelMeshImage string
53-
ModelMeshResources *corev1.ResourceRequirements
54-
RESTProxyEnabled bool
55-
RESTProxyImage string
56-
RESTProxyResources *corev1.ResourceRequirements
57-
RESTProxyPort uint16
58-
PVCs []string
40+
ServiceName string
41+
ServicePort uint16
42+
Name string
43+
Namespace string
44+
Owner mf.Owner
45+
SRSpec *kserveapi.ServingRuntimeSpec
46+
DefaultVModelOwner string
47+
Log logr.Logger
48+
Metrics bool
49+
PrometheusPort uint16
50+
PrometheusScheme string
51+
PayloadProcessors string
52+
ModelMeshImage string
53+
ModelMeshResources *corev1.ResourceRequirements
54+
RESTProxyEnabled bool
55+
RESTProxySkipVerify bool
56+
RESTProxyImage string
57+
RESTProxyResources *corev1.ResourceRequirements
58+
RESTProxyPort uint16
59+
PVCs []string
5960
// internal fields used when templating
6061
AuthNamespace string
6162
ModelMeshLimitCPU string

controllers/modelmesh/proxy.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const (
2626
restProxyGrpcMaxMsgSizeEnvVar = "REST_PROXY_GRPC_MAX_MSG_SIZE_BYTES"
2727
restProxyGrpcPortEnvVar = "REST_PROXY_GRPC_PORT"
2828
restProxyTlsEnvVar = "REST_PROXY_USE_TLS"
29+
restProxySkipVerifyEnvVar = "REST_PROXY_SKIP_VERIFY"
2930
)
3031

3132
func (m *Deployment) addRESTProxyToDeployment(deployment *appsv1.Deployment) error {
@@ -47,6 +48,9 @@ func (m *Deployment) addRESTProxyToDeployment(deployment *appsv1.Deployment) err
4748
}, {
4849
Name: restProxyGrpcMaxMsgSizeEnvVar,
4950
Value: strconv.Itoa(m.GrpcMaxMessageSize),
51+
}, {
52+
Name: restProxySkipVerifyEnvVar,
53+
Value: strconv.FormatBool(m.RESTProxySkipVerify),
5054
},
5155
},
5256
Ports: []corev1.ContainerPort{

controllers/servingruntime_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ func (r *ServingRuntimeReconciler) Reconcile(ctx context.Context, req ctrl.Reque
242242
RESTProxyEnabled: cfg.RESTProxy.Enabled,
243243
RESTProxyImage: cfg.RESTProxy.Image.TaggedImage(),
244244
RESTProxyPort: cfg.RESTProxy.Port,
245+
RESTProxySkipVerify: cfg.RESTProxy.SkipVerify,
245246
RESTProxyResources: cfg.RESTProxy.Resources.ToKubernetesType(),
246247
PullerImage: cfg.StorageHelperImage.TaggedImage(),
247248
PullerImageCommand: cfg.StorageHelperImage.Command,

0 commit comments

Comments
 (0)