Skip to content

Commit

Permalink
fix(olm): rename deployment to handle immutable selector (backport #943
Browse files Browse the repository at this point in the history
…) (#944)

* fix(olm): rename deployment to handle immutable selector (#943)

(cherry picked from commit 07403b0)

# Conflicts:
#	bundle/manifests/cryostat-operator.clusterserviceversion.yaml

* Fix conflicts

---------

Co-authored-by: Elliott Baron <ebaron@redhat.com>
  • Loading branch information
mergify[bot] and ebaron authored Sep 11, 2024
1 parent e89bc55 commit fc21fab
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ deploy: check_cert_manager manifests kustomize predeploy undeploy ## Deploy cont
$(KUSTOMIZE) build $(KUSTOMIZE_DIR) | $(CLUSTER_CLIENT) create -f -
ifeq ($(DISABLE_SERVICE_TLS), true)
@echo "Disabling TLS for in-cluster communication between Services"
@$(CLUSTER_CLIENT) -n $(DEPLOY_NAMESPACE) set env deployment/cryostat-operator-controller-manager DISABLE_SERVICE_TLS=true
@$(CLUSTER_CLIENT) -n $(DEPLOY_NAMESPACE) set env deployment/cryostat-operator-controller DISABLE_SERVICE_TLS=true
endif

.PHONY: undeploy
Expand Down
10 changes: 5 additions & 5 deletions bundle/manifests/cryostat-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ metadata:
capabilities: Seamless Upgrades
categories: Monitoring, Developer Tools
containerImage: quay.io/cryostat/cryostat-operator:3.0.1-dev
createdAt: "2024-08-07T21:05:35Z"
createdAt: "2024-09-11T17:20:54Z"
description: JVM monitoring and profiling tool
operatorframework.io/initialization-resource: |-
{
Expand Down Expand Up @@ -972,7 +972,7 @@ spec:
- label:
app.kubernetes.io/name: cryostat-operator
control-plane: controller-manager
name: cryostat-operator-controller-manager
name: cryostat-operator-controller
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -1186,7 +1186,7 @@ spec:
containerPort: 443
conversionCRDs:
- cryostats.operator.cryostat.io
deploymentName: cryostat-operator-controller-manager
deploymentName: cryostat-operator-controller
generateName: ccryostats.kb.io
sideEffects: None
targetPort: 9443
Expand All @@ -1195,7 +1195,7 @@ spec:
- admissionReviewVersions:
- v1
containerPort: 443
deploymentName: cryostat-operator-controller-manager
deploymentName: cryostat-operator-controller
failurePolicy: Fail
generateName: mcryostat.kb.io
rules:
Expand All @@ -1215,7 +1215,7 @@ spec:
- admissionReviewVersions:
- v1
containerPort: 443
deploymentName: cryostat-operator-controller-manager
deploymentName: cryostat-operator-controller
failurePolicy: Fail
generateName: vcryostat.kb.io
rules:
Expand Down
2 changes: 1 addition & 1 deletion config/default/image_pull_patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: controller
namespace: system
spec:
template:
Expand Down
2 changes: 1 addition & 1 deletion config/default/image_tag_patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: controller
namespace: system
spec:
template:
Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: controller
namespace: system
spec:
template:
Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_config_patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: controller
namespace: system
spec:
template:
Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_webhook_patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: controller
namespace: system
spec:
template:
Expand Down
2 changes: 1 addition & 1 deletion config/insights/insights_patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: controller
namespace: system
spec:
template:
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ generatorOptions:
# target:
# group: apps
# kind: Deployment
# name: controller-manager
# name: controller
# namespace: system
# version: v1

Expand Down
2 changes: 1 addition & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: controller
namespace: system
labels:
control-plane: controller-manager
Expand Down
2 changes: 1 addition & 1 deletion config/manifests/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ patchesJson6902:
group: apps
version: v1
kind: Deployment
name: controller-manager
name: controller
namespace: system
patch: |-
# Remove the manager container's "cert" volumeMount, since OLM will create and mount a set of certs.
Expand Down
2 changes: 1 addition & 1 deletion hack/image_pull_patch.yaml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: controller
namespace: system
spec:
template:
Expand Down
2 changes: 1 addition & 1 deletion hack/image_tag_patch.yaml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: controller
namespace: system
spec:
template:
Expand Down
2 changes: 1 addition & 1 deletion hack/insights_patch.yaml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: controller
namespace: system
spec:
template:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func NewDeploymentForCR(cr *model.CryostatInstance, specs *ServiceSpecs, imageTa
"app.kubernetes.io/name": "cryostat",
}
defaultDeploymentAnnotations := map[string]string{
"app.openshift.io/connects-to": "cryostat-operator-controller-manager",
"app.openshift.io/connects-to": constants.OperatorDeploymentName,
}
defaultPodLabels := map[string]string{
"app": cr.Name,
Expand Down
2 changes: 1 addition & 1 deletion internal/controllers/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
DatabasePort int32 = 5432
LoopbackAddress string = "127.0.0.1"
OperatorNamePrefix string = "cryostat-operator-"
OperatorDeploymentName string = "cryostat-operator-controller-manager"
OperatorDeploymentName string = "cryostat-operator-controller"
HttpPortName string = "http"
// CAKey is the key for a CA certificate within a TLS secret
CAKey = certMeta.TLSCAKey
Expand Down
6 changes: 3 additions & 3 deletions internal/controllers/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func (c *controllerTest) commonTests() {
Expect(err).ToNot(HaveOccurred())

Expect(deploy.Annotations).To(Equal(map[string]string{
"app.openshift.io/connects-to": "cryostat-operator-controller-manager",
"app.openshift.io/connects-to": "cryostat-operator-controller",
"other": "annotation",
}))
Expect(deploy.Labels).To(Equal(map[string]string{
Expand Down Expand Up @@ -2563,7 +2563,7 @@ func (t *cryostatTestInput) expectMainDeployment() {
Expect(deployment.Name).To(Equal(t.Name))
Expect(deployment.Namespace).To(Equal(t.Namespace))
Expect(deployment.Annotations).To(Equal(map[string]string{
"app.openshift.io/connects-to": "cryostat-operator-controller-manager",
"app.openshift.io/connects-to": "cryostat-operator-controller",
}))
Expect(deployment.Labels).To(Equal(map[string]string{
"app": t.Name,
Expand All @@ -2589,7 +2589,7 @@ func (t *cryostatTestInput) expectMainDeploymentHasExtraMetadata() {
cr := t.getCryostatInstance()

Expect(deployment.Annotations).To(Equal(map[string]string{
"app.openshift.io/connects-to": "cryostat-operator-controller-manager",
"app.openshift.io/connects-to": "cryostat-operator-controller",
"myDeploymentExtraAnnotation": "myDeploymentAnnotation",
"mySecondDeploymentExtraAnnotation": "mySecondDeploymentAnnotation",
}))
Expand Down
2 changes: 1 addition & 1 deletion internal/test/scorecard/common_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
)

const (
operatorDeploymentName string = "cryostat-operator-controller-manager"
operatorDeploymentName string = "cryostat-operator-controller"
testTimeout time.Duration = time.Minute * 10
)

Expand Down

0 comments on commit fc21fab

Please sign in to comment.