Skip to content

Commit 95c6247

Browse files
Merge pull request #479 from openshift-bot/synchronize-upstream
NO-ISSUE: Synchronize From Upstream Repositories
2 parents ea34b70 + 634735c commit 95c6247

File tree

12 files changed

+97
-75
lines changed

12 files changed

+97
-75
lines changed

api/v1/clustercatalog_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ type ClusterCatalogStatus struct {
182182
// +listType=map
183183
// +listMapKey=type
184184
// +optional
185-
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
185+
Conditions []metav1.Condition `json:"conditions,omitempty"`
186186
// resolvedSource contains information about the resolved source based on the source type.
187187
// +optional
188188
ResolvedSource *ResolvedCatalogSource `json:"resolvedSource,omitempty"`

api/v1/clusterextension_types.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,12 +485,10 @@ type ClusterExtensionStatus struct {
485485
// PackageDeprecated is set if the requested package is marked deprecated in the catalog.
486486
// Deprecated is a rollup condition that is present when any of the deprecated conditions are present.
487487
//
488-
// +patchMergeKey=type
489-
// +patchStrategy=merge
490488
// +listType=map
491489
// +listMapKey=type
492490
// +optional
493-
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
491+
Conditions []metav1.Condition `json:"conditions,omitempty"`
494492

495493
// install is a representation of the current installation status for this ClusterExtension.
496494
//

api/v1/clusterextensionrevision_types.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ type ClusterExtensionRevisionSpec struct {
5959
//
6060
// +kubebuilder:validation:Required
6161
// +kubebuilder:validation:XValidation:rule="self == oldSelf || oldSelf.size() == 0", message="phases is immutable"
62-
// +patchMergeKey=name
63-
// +patchStrategy=merge
6462
// +listType=map
6563
// +listMapKey=name
6664
Phases []ClusterExtensionRevisionPhase `json:"phases"`
@@ -135,12 +133,10 @@ type ClusterExtensionRevisionPrevious struct {
135133

136134
// ClusterExtensionRevisionStatus defines the observed state of a ClusterExtensionRevision.
137135
type ClusterExtensionRevisionStatus struct {
138-
// +patchMergeKey=type
139-
// +patchStrategy=merge
140136
// +listType=map
141137
// +listMapKey=type
142138
// +optional
143-
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
139+
Conditions []metav1.Condition `json:"conditions,omitempty"`
144140
}
145141

146142
// +kubebuilder:object:root=true

commitchecker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
expectedMergeBase: 27b05e75acd012f98e92adefe374303d13d5218d
1+
expectedMergeBase: 8016fbd7d7cfffa14fdc62e1a7e930c7fc3d4fe8
22
upstreamBranch: main
33
upstreamOrg: operator-framework
44
upstreamRepo: operator-controller

docs/draft/howto/single-ownnamespace-install.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ apiVersion: olm.operatorframework.io/v1
9191
kind: ClusterExtension
9292
metadata:
9393
name: argocd
94-
annotations:
95-
olm.operatorframework.io/watch-namespace: argocd
9694
spec:
9795
namespace: argocd
9896
serviceAccount:

hack/demo/own-namespace-demo-script.sh

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@
33
#
44
# Welcome to the OwnNamespace install mode demo
55
#
6-
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
6+
set -e
7+
trap 'echo "Demo ran into error"; trap - SIGTERM && kill -- -$$; exit 1' ERR SIGINT SIGTERM EXIT
8+
9+
# install experimental CRDs with config field support
10+
kubectl apply -f "$(dirname "${BASH_SOURCE[0]}")/../../manifests/experimental.yaml"
11+
12+
# wait for experimental CRDs to be available
13+
kubectl wait --for condition=established --timeout=60s crd/clusterextensions.olm.operatorframework.io
714

815
# enable 'SingleOwnNamespaceInstallSupport' feature gate
916
kubectl patch deployment -n olmv1-system operator-controller-controller-manager --type='json' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--feature-gates=SingleOwnNamespaceInstallSupport=true"}]'
@@ -41,3 +48,27 @@ kubectl get deployments -n argocd-system argocd-operator-controller-manager -o j
4148
# check service account for role binding is the same as controller service-account
4249
rolebinding=$(kubectl get rolebindings -n argocd-system -o name | grep 'argocd-operator' | head -n 1)
4350
kubectl get -n argocd-system $rolebinding -o jsonpath='{.subjects}' | jq .[0]
51+
52+
echo "Demo completed successfully!"
53+
54+
# cleanup resources
55+
echo "Cleaning up demo resources..."
56+
kubectl delete clusterextension argocd-operator --ignore-not-found=true
57+
kubectl delete namespace argocd-system --ignore-not-found=true
58+
kubectl delete clusterrolebinding argocd-installer-crb --ignore-not-found=true
59+
60+
# remove feature gate from deployment
61+
echo "Removing feature gate from operator-controller..."
62+
kubectl patch deployment -n olmv1-system operator-controller-controller-manager --type='json' -p='[{"op": "remove", "path": "/spec/template/spec/containers/0/args", "value": "--feature-gates=SingleOwnNamespaceInstallSupport=true"}]' || true
63+
64+
# restore standard CRDs
65+
echo "Restoring standard CRDs..."
66+
kubectl apply -f "$(dirname "${BASH_SOURCE[0]}")/../../manifests/base.yaml"
67+
68+
# wait for standard CRDs to be available
69+
kubectl wait --for condition=established --timeout=60s crd/clusterextensions.olm.operatorframework.io
70+
71+
# wait for operator-controller to become available with standard config
72+
kubectl rollout status -n olmv1-system deployment/operator-controller-controller-manager
73+
74+
echo "Demo cleanup completed!"

hack/demo/resources/own-namespace-demo.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ apiVersion: olm.operatorframework.io/v1
22
kind: ClusterExtension
33
metadata:
44
name: argocd-operator
5-
annotations:
6-
# watch namespace is the same as intall namespace
7-
olm.operatorframework.io/watch-namespace: argocd-system
85
spec:
96
namespace: argocd-system
107
serviceAccount:

hack/demo/resources/single-namespace-demo.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ apiVersion: olm.operatorframework.io/v1
22
kind: ClusterExtension
33
metadata:
44
name: argocd-operator
5-
annotations:
6-
# watch-namespace is different from install namespace
7-
olm.operatorframework.io/watch-namespace: argocd
85
spec:
96
namespace: argocd-system
107
serviceAccount:
118
name: argocd-installer
9+
config:
10+
configType: Inline
11+
inline:
12+
watchNamespace: argocd
1213
source:
1314
sourceType: Catalog
1415
catalog:

hack/demo/single-own-namespace-demo-script.sh renamed to hack/demo/single-namespace-demo-script.sh

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@
33
#
44
# Welcome to the SingleNamespace install mode demo
55
#
6-
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
6+
set -e
7+
trap 'echo "Demo ran into error"; trap - SIGTERM && kill -- -$$; exit 1' ERR SIGINT SIGTERM EXIT
8+
9+
# install experimental CRDs with config field support
10+
kubectl apply -f "$(dirname "${BASH_SOURCE[0]}")/../../manifests/experimental.yaml"
11+
12+
# wait for experimental CRDs to be available
13+
kubectl wait --for condition=established --timeout=60s crd/clusterextensions.olm.operatorframework.io
714

815
# enable 'SingleOwnNamespaceInstallSupport' feature gate
916
kubectl patch deployment -n olmv1-system operator-controller-controller-manager --type='json' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--feature-gates=SingleOwnNamespaceInstallSupport=true"}]'
@@ -44,3 +51,27 @@ kubectl get deployments -n argocd-system argocd-operator-controller-manager -o j
4451
# check service account for role binding is the controller deployment service account
4552
rolebinding=$(kubectl get rolebindings -n argocd -o name | grep 'argocd-operator' | head -n 1)
4653
kubectl get -n argocd $rolebinding -o jsonpath='{.subjects}' | jq .[0]
54+
55+
echo "Demo completed successfully!"
56+
57+
# cleanup resources
58+
echo "Cleaning up demo resources..."
59+
kubectl delete clusterextension argocd-operator --ignore-not-found=true
60+
kubectl delete namespace argocd-system argocd --ignore-not-found=true
61+
kubectl delete clusterrolebinding argocd-installer-crb --ignore-not-found=true
62+
63+
# remove feature gate from deployment
64+
echo "Removing feature gate from operator-controller..."
65+
kubectl patch deployment -n olmv1-system operator-controller-controller-manager --type='json' -p='[{"op": "remove", "path": "/spec/template/spec/containers/0/args", "value": "--feature-gates=SingleOwnNamespaceInstallSupport=true"}]' || true
66+
67+
# restore standard CRDs
68+
echo "Restoring standard CRDs..."
69+
kubectl apply -f "$(dirname "${BASH_SOURCE[0]}")/../../manifests/base.yaml"
70+
71+
# wait for standard CRDs to be available
72+
kubectl wait --for condition=established --timeout=60s crd/clusterextensions.olm.operatorframework.io
73+
74+
# wait for operator-controller to become available with standard config
75+
kubectl rollout status -n olmv1-system deployment/operator-controller-controller-manager
76+
77+
echo "Demo cleanup completed!"

hack/tools/crd-generator/testdata/api/v1/clusterextension_types.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,12 +457,10 @@ type ClusterExtensionStatus struct {
457457
// PackageDeprecated is set if the requested package is marked deprecated in the catalog.
458458
// Deprecated is a rollup condition that is present when any of the deprecated conditions are present.
459459
//
460-
// +patchMergeKey=type
461-
// +patchStrategy=merge
462460
// +listType=map
463461
// +listMapKey=type
464462
// +optional
465-
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
463+
Conditions []metav1.Condition `json:"conditions,omitempty"`
466464

467465
// install is a representation of the current installation status for this ClusterExtension.
468466
//

0 commit comments

Comments
 (0)