Skip to content

Commit

Permalink
Merge pull request #108 from appuio/update-deps
Browse files Browse the repository at this point in the history
Update OpenShift API dependency to v4.15
  • Loading branch information
bastjan authored Oct 3, 2024
2 parents fab637d + d72c5ba commit 82dd9a6
Show file tree
Hide file tree
Showing 14 changed files with 471 additions and 47 deletions.
18 changes: 18 additions & 0 deletions api/v1beta1/upstream_cv_spec_copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,24 @@ type ConfigV1ClusterVersionSpec struct {
// +optional
Capabilities *configv1.ClusterVersionCapabilitiesSpec `json:"capabilities,omitempty"`

// signatureStores contains the upstream URIs to verify release signatures and optional
// reference to a config map by name containing the PEM-encoded CA bundle.
//
// By default, CVO will use existing signature stores if this property is empty.
// The CVO will check the release signatures in the local ConfigMaps first. It will search for a valid signature
// in these stores in parallel only when local ConfigMaps did not include a valid signature.
// Validation will fail if none of the signature stores reply with valid signature before timeout.
// Setting signatureStores will replace the default signature stores with custom signature stores.
// Default stores can be used with custom signature stores by adding them manually.
//
// A maximum of 32 signature stores may be configured.
// +kubebuilder:validation:MaxItems=32
// +openshift:enable:FeatureSets=CustomNoUpgrade;TechPreviewNoUpgrade
// +listType=map
// +listMapKey=url
// +optional
SignatureStores []configv1.SignatureStore `json:"signatureStores"`

// overrides is list of overides for components that are managed by
// cluster version operator. Marking a component unmanaged will prevent
// the operator from creating or updating the object.
Expand Down
5 changes: 5 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

435 changes: 409 additions & 26 deletions config/crd/bases/managedupgrade.appuio.io_clusterversions.yaml

Large diffs are not rendered by default.

33 changes: 28 additions & 5 deletions config/crd/bases/managedupgrade.appuio.io_upgradejobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,20 @@ spec:
DesiredVersion defines the desired version to upgrade to.
Can be empty if the upgrade job was created when there was no new version available.
properties:
architecture:
description: |-
architecture is an optional field that indicates the desired
value of the cluster architecture. In this context cluster
architecture means either a single architecture or a multi
architecture. architecture can only be set to Multi thereby
only allowing updates from single to multi architecture. If
architecture is set, image cannot be set and version must be
set.
Valid values are 'Multi' and empty.
enum:
- Multi
- ""
type: string
force:
description: |-
force allows an administrator to update to an image that has failed
Expand All @@ -181,16 +195,25 @@ spec:
type: boolean
image:
description: |-
image is a container image location that contains the update. When this
field is part of spec, image is optional if version is specified and the
availableUpdates field contains a matching version.
image is a container image location that contains the update.
image should be used when the desired version does not exist in availableUpdates or history.
When image is set, version is ignored. When image is set, version should be empty.
When image is set, architecture cannot be specified.
type: string
version:
description: |-
version is a semantic versioning identifying the update version. When this
field is part of spec, version is optional if image is specified.
version is a semantic version identifying the update version.
version is ignored if image is specified and required if
architecture is specified.
type: string
type: object
x-kubernetes-validations:
- message: cannot set both Architecture and Image
rule: 'has(self.architecture) && has(self.image) ? (self.architecture
== '''' || self.image == '''') : true'
- message: Version must be set if Architecture is set
rule: 'has(self.architecture) && self.architecture != '''' ? self.version
!= '''' : true'
startAfter:
description: StartAfter defines the time after which the upgrade job
should start
Expand Down
2 changes: 1 addition & 1 deletion controllers/upgrade_information_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

configv1 "github.com/openshift/api/config/v1"
machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1"
"github.com/prometheus/client_golang/prometheus"
apimeta "k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion controllers/upgrade_information_collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

managedupgradev1beta1 "github.com/appuio/openshift-upgrade-controller/api/v1beta1"
configv1 "github.com/openshift/api/config/v1"
machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1"
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion controllers/upgradejob_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"time"

configv1 "github.com/openshift/api/config/v1"
machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1"
"go.uber.org/multierr"
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
Expand Down
2 changes: 1 addition & 1 deletion controllers/upgradejob_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"time"

configv1 "github.com/openshift/api/config/v1"
machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1"
"github.com/stretchr/testify/require"
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
Expand Down
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ go 1.23

toolchain go1.23.2

require (
github.com/openshift/api v0.0.0-20230213134911-7ba313770556 // release-4.11
github.com/openshift/machine-config-operator v0.0.1-0.20230508173032-8f952d7fd139 // release-4.11
)
require github.com/openshift/api v0.0.0-20240729140855-0a58f8c30a8c // release-4.15

require (
dario.cat/mergo v1.0.1
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,8 @@ github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA
github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8=
github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc=
github.com/openshift/api v0.0.0-20230213134911-7ba313770556 h1:7W2fOhJicyEff24VaF7ASNzPtYvr+iSCVft4SIBAzaE=
github.com/openshift/api v0.0.0-20230213134911-7ba313770556/go.mod h1:aQ6LDasvHMvHZXqLHnX2GRmnfTWCF/iIwz8EMTTIE9A=
github.com/openshift/machine-config-operator v0.0.1-0.20230508173032-8f952d7fd139 h1:p3TcFJMyt3ohtmS0AXufStzMf4O4pyQ4aGmlaPZQUc8=
github.com/openshift/machine-config-operator v0.0.1-0.20230508173032-8f952d7fd139/go.mod h1:9eRuG/8WREpSZ6+pHqYFxXRK4v+w0GAZaUGp/SUaUWs=
github.com/openshift/api v0.0.0-20240729140855-0a58f8c30a8c h1:lm1Suv8hNuOCTpO0iEDtdGk6jVuS37/xgW+aV0Ze4oc=
github.com/openshift/api v0.0.0-20240729140855-0a58f8c30a8c/go.mod h1:qNtV0315F+f8ld52TLtPvrfivZpdimOzTi3kn9IVbtU=
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/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
_ "k8s.io/client-go/plugin/pkg/client/auth"

configv1 "github.com/openshift/api/config/v1"
machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1"
batchv1 "k8s.io/api/batch/v1"
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
Expand Down
2 changes: 1 addition & 1 deletion pkg/healthcheck/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

configv1 "github.com/openshift/api/config/v1"
machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1"
)

// IsOperatorDegraded returns whether an operator is degraded in the cluster
Expand Down
2 changes: 1 addition & 1 deletion pkg/healthcheck/healthcheck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion sim/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

"github.com/Masterminds/semver/v3"
configv1 "github.com/openshift/api/config/v1"
machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1"
"go.uber.org/multierr"
batchv1 "k8s.io/api/batch/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down

0 comments on commit 82dd9a6

Please sign in to comment.