Skip to content

Commit a15517d

Browse files
Merge pull request #519 from tmshort/synchronize
OCPBUGS-62517: Synchronize from upstream
2 parents 04ee415 + 9e15bf3 commit a15517d

34 files changed

+991
-484
lines changed

api/v1/clusterextensionrevision_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const (
3939
ClusterExtensionRevisionReasonProbeFailure = "ProbeFailure"
4040
ClusterExtensionRevisionReasonIncomplete = "Incomplete"
4141
ClusterExtensionRevisionReasonProgressing = "Progressing"
42+
ClusterExtensionRevisionReasonArchived = "Archived"
4243
)
4344

4445
// ClusterExtensionRevisionSpec defines the desired state of ClusterExtensionRevision.
@@ -148,6 +149,8 @@ type ClusterExtensionRevisionStatus struct {
148149
// +kubebuilder:subresource:status
149150

150151
// ClusterExtensionRevision is the Schema for the clusterextensionrevisions API
152+
// +kubebuilder:printcolumn:name="Available",type=string,JSONPath=`.status.conditions[?(@.type=='Available')].status`
153+
// +kubebuilder:printcolumn:name=Age,type=date,JSONPath=`.metadata.creationTimestamp`
151154
type ClusterExtensionRevision struct {
152155
metav1.TypeMeta `json:",inline"`
153156
metav1.ObjectMeta `json:"metadata,omitempty"`

cmd/operator-controller/main.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ type config struct {
107107
globalPullSecret string
108108
}
109109

110-
const authFilePrefix = "operator-controller-global-pull-secrets"
110+
const (
111+
authFilePrefix = "operator-controller-global-pull-secrets"
112+
fieldOwnerPrefix = "olm.operatorframework.io"
113+
)
111114

112115
// podNamespace checks whether the controller is running in a Pod vs.
113116
// being run locally by inspecting the namespace file that gets mounted
@@ -560,6 +563,7 @@ func setupBoxcutter(
560563
Scheme: mgr.GetScheme(),
561564
RevisionGenerator: rg,
562565
Preflights: preflights,
566+
FieldOwner: fmt.Sprintf("%s/clusterextension-controller", fieldOwnerPrefix),
563567
}
564568
ceReconciler.RevisionStatesGetter = &controllers.BoxcutterRevisionStatesGetter{Reader: mgr.GetClient()}
565569
ceReconciler.StorageMigrator = &applier.BoxcutterStorageMigrator{
@@ -568,11 +572,6 @@ func setupBoxcutter(
568572
RevisionGenerator: rg,
569573
}
570574

571-
// Boxcutter
572-
const (
573-
boxcutterSystemPrefixFieldOwner = "olm.operatorframework.io"
574-
)
575-
576575
discoveryClient, err := discovery.NewDiscoveryClientForConfig(mgr.GetConfig())
577576
if err != nil {
578577
return fmt.Errorf("unable to create discovery client: %w", err)
@@ -599,8 +598,8 @@ func setupBoxcutter(
599598
machinery.NewObjectEngine(
600599
mgr.GetScheme(), trackingCache, mgr.GetClient(),
601600
ownerhandling.NewNative(mgr.GetScheme()),
602-
machinery.NewComparator(ownerhandling.NewNative(mgr.GetScheme()), discoveryClient, mgr.GetScheme(), boxcutterSystemPrefixFieldOwner),
603-
boxcutterSystemPrefixFieldOwner, boxcutterSystemPrefixFieldOwner,
601+
machinery.NewComparator(ownerhandling.NewNative(mgr.GetScheme()), discoveryClient, mgr.GetScheme(), fieldOwnerPrefix),
602+
fieldOwnerPrefix, fieldOwnerPrefix,
604603
),
605604
validation.NewClusterPhaseValidator(mgr.GetRESTMapper(), mgr.GetClient()),
606605
),

commitchecker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
expectedMergeBase: 95c5934cb8dd30f4035074cda16b2f8f6f544c03
1+
expectedMergeBase: 9eac616c61b5da3314b273a058d13fee4b62f58e
22
upstreamBranch: main
33
upstreamOrg: operator-framework
44
upstreamRepo: operator-controller

helm/olmv1/base/operator-controller/crd/experimental/olm.operatorframework.io_clusterextensionrevisions.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ spec:
1515
singular: clusterextensionrevision
1616
scope: Cluster
1717
versions:
18-
- name: v1
18+
- additionalPrinterColumns:
19+
- jsonPath: .status.conditions[?(@.type=='Available')].status
20+
name: Available
21+
type: string
22+
- jsonPath: .metadata.creationTimestamp
23+
name: Age
24+
type: date
25+
name: v1
1926
schema:
2027
openAPIV3Schema:
2128
description: ClusterExtensionRevision is the Schema for the clusterextensionrevisions

helm/olmv1/templates/deployment-olmv1-system-catalogd-controller-manager.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ metadata:
1313
spec:
1414
minReadySeconds: 5
1515
replicas: 1
16+
strategy:
17+
type: RollingUpdate
18+
rollingUpdate:
19+
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
20+
maxUnavailable: 0 # Never allow pods to be unavailable during updates
1621
selector:
1722
matchLabels:
1823
control-plane: catalogd-controller-manager

helm/olmv1/templates/deployment-olmv1-system-operator-controller-controller-manager.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ metadata:
1212
namespace: {{ .Values.namespaces.olmv1.name }}
1313
spec:
1414
replicas: 1
15+
strategy:
16+
type: RollingUpdate
17+
rollingUpdate:
18+
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
19+
maxUnavailable: 0 # Never allow pods to be unavailable during updates
1520
selector:
1621
matchLabels:
1722
control-plane: operator-controller-controller-manager

helm/olmv1/templates/openshift-catalogs/clustercatalog-openshift-certified-operators.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ spec:
99
type: Image
1010
image:
1111
pollIntervalMinutes: 10
12-
ref: registry.redhat.io/redhat/certified-operator-index:v4.20
12+
ref: registry.redhat.io/redhat/certified-operator-index:{{- .Values.options.openshift.catalogs.version }}
1313
{{- end -}}

helm/olmv1/templates/openshift-catalogs/clustercatalog-openshift-community-operators.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ spec:
99
type: Image
1010
image:
1111
pollIntervalMinutes: 10
12-
ref: registry.redhat.io/redhat/community-operator-index:v4.20
12+
ref: registry.redhat.io/redhat/community-operator-index:{{- .Values.options.openshift.catalogs.version }}
1313
{{- end -}}

helm/olmv1/templates/openshift-catalogs/clustercatalog-openshift-redhat-marketplace.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ spec:
99
type: Image
1010
image:
1111
pollIntervalMinutes: 10
12-
ref: registry.redhat.io/redhat/redhat-marketplace-index:v4.20
12+
ref: registry.redhat.io/redhat/redhat-marketplace-index:{{- .Values.options.openshift.catalogs.version }}
1313
{{- end -}}

helm/olmv1/templates/openshift-catalogs/clustercatalog-openshift-redhat-operators.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ spec:
99
type: Image
1010
image:
1111
pollIntervalMinutes: 10
12-
ref: registry.redhat.io/redhat/redhat-operator-index:v4.20
12+
ref: registry.redhat.io/redhat/redhat-operator-index:{{ .Values.options.openshift.catalogs.version }}
1313
{{- end -}}

0 commit comments

Comments
 (0)