Skip to content

Commit e5da837

Browse files
authored
Registry Pod Controller Flag (#2928)
Sets the marketplace pod's ownerreference to have `controller: true` to remove need for forceful node drain. Signed-off-by: Daniel Franz <[email protected]>
1 parent dac8182 commit e5da837

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pkg/controller/operators/catalog/operator_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,7 @@ func toManifest(t *testing.T, obj runtime.Object) string {
18081808

18091809
func pod(s v1alpha1.CatalogSource) *corev1.Pod {
18101810
pod := reconciler.Pod(&s, "registry-server", s.Spec.Image, s.GetName(), s.GetLabels(), s.GetAnnotations(), 5, 10, 1001)
1811-
ownerutil.AddOwner(pod, &s, false, false)
1811+
ownerutil.AddOwner(pod, &s, false, true)
18121812
return pod
18131813
}
18141814

pkg/controller/registry/reconciler/configmap.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func (s *configMapCatalogSourceDecorator) Pod(image string) *corev1.Pod {
105105
pod := Pod(s.CatalogSource, "configmap-registry-server", image, "", s.Labels(), s.Annotations(), 5, 5, s.runAsUser)
106106
pod.Spec.ServiceAccountName = s.GetName() + ConfigMapServerPostfix
107107
pod.Spec.Containers[0].Command = []string{"configmap-server", "-c", s.Spec.ConfigMap, "-n", s.GetNamespace()}
108-
ownerutil.AddOwner(pod, s.CatalogSource, false, false)
108+
ownerutil.AddOwner(pod, s.CatalogSource, false, true)
109109
return pod
110110
}
111111

pkg/controller/registry/reconciler/grpc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func (s *grpcCatalogSourceDecorator) ServiceAccount() *corev1.ServiceAccount {
124124

125125
func (s *grpcCatalogSourceDecorator) Pod(saName string) *corev1.Pod {
126126
pod := Pod(s.CatalogSource, "registry-server", s.Spec.Image, saName, s.Labels(), s.Annotations(), 5, 10, s.createPodAsUser)
127-
ownerutil.AddOwner(pod, s.CatalogSource, false, false)
127+
ownerutil.AddOwner(pod, s.CatalogSource, false, true)
128128
return pod
129129
}
130130

0 commit comments

Comments
 (0)