From 41aa3638b7f8e272581f991018da85d3a42d68e2 Mon Sep 17 00:00:00 2001 From: David Grove Date: Fri, 19 Jul 2024 17:27:28 -0400 Subject: [PATCH] Update AppWrappers to v0.22.0 Highlights: + Annotations to mark exit codes as being terminal + Autopilot: auto-injection of Node anti-affinities + Autopilot: Automatic reset/resume of AppWrappers using unhealthy resources + Emit an event when an unhealthy appwrapper is being reset Full Changelog: https://github.com/project-codeflare/appwrapper/compare/v0.21.1...v0.22.0 --- Makefile | 2 +- config/crd/appwrapper/kustomization.yaml | 2 +- config/rbac/role.yaml | 8 ++++++++ go.mod | 4 ++-- go.sum | 4 ++-- pkg/controllers/appwrapper_controller.go | 3 +++ 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index a48170bb..03612e83 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ VERSION ?= v0.0.0-dev BUNDLE_VERSION ?= $(VERSION:v%=%) # APPWRAPPER_VERSION defines the default version of the AppWrapper controller -APPWRAPPER_VERSION ?= v0.21.1 +APPWRAPPER_VERSION ?= v0.22.0 APPWRAPPER_REPO ?= github.com/project-codeflare/appwrapper APPWRAPPER_CRD ?= ${APPWRAPPER_REPO}/config/crd?ref=${APPWRAPPER_VERSION} diff --git a/config/crd/appwrapper/kustomization.yaml b/config/crd/appwrapper/kustomization.yaml index 4a83e2ee..d8c3d2e5 100644 --- a/config/crd/appwrapper/kustomization.yaml +++ b/config/crd/appwrapper/kustomization.yaml @@ -1,4 +1,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- github.com/project-codeflare/appwrapper/config/crd?ref=v0.21.1 +- github.com/project-codeflare/appwrapper/config/crd?ref=v0.22.0 diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 7009a421..879d6bc8 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -14,6 +14,14 @@ rules: - patch - update - watch +- apiGroups: + - "" + resources: + - nodes + verbs: + - get + - list + - watch - apiGroups: - "" resources: diff --git a/go.mod b/go.mod index 3c32d1d8..a36f1c4b 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/opendatahub-io/opendatahub-operator/v2 v2.10.0 github.com/openshift/api v0.0.0-20230823114715-5fdd7511b790 github.com/openshift/client-go v0.0.0-20221019143426-16aed247da5c - github.com/project-codeflare/appwrapper v0.21.1 + github.com/project-codeflare/appwrapper v0.22.0 github.com/project-codeflare/codeflare-common v0.0.0-20240628111341-56c962a09b7e github.com/ray-project/kuberay/ray-operator v1.1.1 go.uber.org/zap v1.27.0 @@ -35,7 +35,7 @@ replace go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp => go.open replace github.com/jackc/pgx/v4 => github.com/jackc/pgx/v5 v5.5.4 // These replace directives support the backlevel go version required by ODH build -replace github.com/project-codeflare/appwrapper v0.21.1 => github.com/project-codeflare/appwrapper v0.21.2-0.20240712173553-5b007c947b37 +replace github.com/project-codeflare/appwrapper v0.22.0 => github.com/project-codeflare/appwrapper v0.22.1-0.20240719212005-aab106b2126e replace sigs.k8s.io/kueue v0.7.1 => github.com/opendatahub-io/kueue v0.7.0-odh-test diff --git a/go.sum b/go.sum index fa550784..33662f83 100644 --- a/go.sum +++ b/go.sum @@ -246,8 +246,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/project-codeflare/appwrapper v0.21.2-0.20240712173553-5b007c947b37 h1:x4qdbN98B9gtaU7pseJWABZzwoDawXLC5QMlx0idXxc= -github.com/project-codeflare/appwrapper v0.21.2-0.20240712173553-5b007c947b37/go.mod h1:gKjO+iRtMIdBvIBYmN+VciL9kzWmkfwgk/+24wCLhSM= +github.com/project-codeflare/appwrapper v0.22.1-0.20240719212005-aab106b2126e h1:cIsCTtAZaT2fsQG/QGUm4/wvJnobYawCPZwTwVE2DGo= +github.com/project-codeflare/appwrapper v0.22.1-0.20240719212005-aab106b2126e/go.mod h1:gKjO+iRtMIdBvIBYmN+VciL9kzWmkfwgk/+24wCLhSM= github.com/project-codeflare/codeflare-common v0.0.0-20240628111341-56c962a09b7e h1:juFd1dQyioeMxbVE6F0YD25ozm/jiqJE+MpDhu8p22k= github.com/project-codeflare/codeflare-common v0.0.0-20240628111341-56c962a09b7e/go.mod h1:unKTw+XoMANTES3WieG016im7rxZ7IR2/ph++L5Vp1Y= github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= diff --git a/pkg/controllers/appwrapper_controller.go b/pkg/controllers/appwrapper_controller.go index cab8ef37..f15a4ef2 100644 --- a/pkg/controllers/appwrapper_controller.go +++ b/pkg/controllers/appwrapper_controller.go @@ -41,3 +41,6 @@ package controllers // +kubebuilder:rbac:groups=kueue.x-k8s.io,resources=workloads/finalizers,verbs=update // +kubebuilder:rbac:groups=kueue.x-k8s.io,resources=resourceflavors,verbs=get;list;watch // +kubebuilder:rbac:groups=kueue.x-k8s.io,resources=workloadpriorityclasses,verbs=get;list;watch + +// permission to watch nodes for Autopilot integration +//+kubebuilder:rbac:groups="",resources=nodes,verbs=get;list;watch