You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a label to an existing operator deployment is not currently supported by our operator. It appears that adding a label, has been deemed restricted by the operator, reason this fails. Adding labels should not be considered a restricted op, however, according to the logs, this is forbidden:
spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden
Steps to replicate:
The cluster below was deployed using the default operator and example.yml file. The additionalLabels line was present initially when the cluster was first deployed, so the label is applied correctly. Snippet below shows the line for the label and it is correctly applied:
..
...
....
..... snip ....
image:
name: cockroachdb/cockroach:v21.2.8
# nodes refers to the number of crdb pods that are created
# via the statefulset
nodes: 3
additionalLabels:
crdb: test-operator-deployment
pod details, label is applied as expected and pods are ready
As you can see above, all pods are running and the default labels were applied as expected.
I then modified the CrdbCluster definition in the file example.yml to include a new label, snippet of the pertaining section below:
image:
name: cockroachdb/cockroach:v22.1.0
# nodes refers to the number of crdb pods that are created
# via the statefulset
maxUnavailable: 1
minAvailable: 2
nodes: 3
additionalLabels:
daniel: custom-test-lab-operator-deployment
I then went ahead and commented out the line from the example.yml that configures the label, snippet shown below:
image:
name: cockroachdb/cockroach:v22.1.0
# nodes refers to the number of crdb pods that are created
# via the statefulset
maxUnavailable: 1
minAvailable: 2
nodes: 3
# additionalLabels:
# daniel: custom-test-lab-operator-deployment
Adding a label to an existing operator deployment is not currently supported by our operator. It appears that adding a label, has been deemed restricted by the operator, reason this fails. Adding labels should not be considered a restricted op, however, according to the logs, this is forbidden:
Steps to replicate:
The cluster below was deployed using the default operator and
example.yml
file. TheadditionalLabels
line was present initially when the cluster was first deployed, so the label is applied correctly. Snippet below shows the line for the label and it is correctly applied:pod details, label is applied as expected and pods are ready
I then destroyed the cluster and commented out the section where the label is defined, so the pods would only have the standard default labels:
As you can see above, all pods are running and the default labels were applied as expected.
I then modified the
CrdbCluster
definition in the fileexample.yml
to include a new label, snippet of the pertaining section below:I then applied the
example.yml
file:The pods still running at this point:
Now I do a rolling restart:
and monitor the status, which will show the 3rd pod restarting and getting stuck as shown below and will not proceed:
Notice the new label was not applied yet and the pod status showing it is stuck:
I then went ahead and commented out the line from the
example.yml
that configures the label, snippet shown below:I then applied the changed file:
I waited a few seconds after the new file was applied above and the pods proceeded to restart successfully. Notice full output below:
and now the final output, no custom label applied since the line with the new label has been commented out, but the all pods are running:
The text was updated successfully, but these errors were encountered: