Skip to content

Commit

Permalink
Rename operator deployment
Browse files Browse the repository at this point in the history
Commit 7fa448a added additional labels
to the operator deployment and its selector field.

Unfortunately the selector field is immutable, and when OLM tries to patch
the deployment while upgrading, Kubernetes will reject this update.

A workaround is to rename the deployment, as suggested here:
operator-framework/operator-lifecycle-manager#952

Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
  • Loading branch information
andreasgerstmayr committed Jun 1, 2023
1 parent b8cb438 commit 67f8a9f
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 11 deletions.
16 changes: 16 additions & 0 deletions .chloggen/rename_operator_deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
component: operator

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Rename operator deployment to enable upgrading from 0.1.0

# One or more tracking issues related to the change
issues: [432]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ spec:
app.kubernetes.io/name: tempo-operator
app.kubernetes.io/part-of: tempo-operator
control-plane: controller-manager
name: tempo-operator-controller-manager
name: tempo-operator-controller-manager-v2
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -805,7 +805,7 @@ spec:
- admissionReviewVersions:
- v1
containerPort: 443
deploymentName: tempo-operator-controller-manager
deploymentName: tempo-operator-controller-manager-v2
failurePolicy: Fail
generateName: mtempostack.tempo.grafana.com
rules:
Expand All @@ -825,7 +825,7 @@ spec:
- admissionReviewVersions:
- v1
containerPort: 443
deploymentName: tempo-operator-controller-manager
deploymentName: tempo-operator-controller-manager-v2
failurePolicy: Fail
generateName: vtempostack.tempo.grafana.com
rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ spec:
app.kubernetes.io/name: tempo-operator
app.kubernetes.io/part-of: tempo-operator
control-plane: controller-manager
name: tempo-operator-controller-manager
name: tempo-operator-controller-manager-v2
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -816,7 +816,7 @@ spec:
- admissionReviewVersions:
- v1
containerPort: 443
deploymentName: tempo-operator-controller-manager
deploymentName: tempo-operator-controller-manager-v2
failurePolicy: Fail
generateName: mtempostack.tempo.grafana.com
rules:
Expand All @@ -836,7 +836,7 @@ spec:
- admissionReviewVersions:
- v1
containerPort: 443
deploymentName: tempo-operator-controller-manager
deploymentName: tempo-operator-controller-manager-v2
failurePolicy: Fail
generateName: vtempostack.tempo.grafana.com
rules:
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-manager-v2
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-manager-v2
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-manager-v2
namespace: system
spec:
template:
Expand Down
2 changes: 1 addition & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: controller-manager-v2
namespace: system
labels:
control-plane: controller-manager
Expand Down
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-manager-v2
namespace: system
spec:
template:
Expand Down

0 comments on commit 67f8a9f

Please sign in to comment.