Currently, when BatchRelease patches the pods of a deployment, it removes the ReplicaSet's pod-template-hash label before calculating the Pod Hash, and compares it with the update revision calculated based on the Deployment to decide whether to apply labels. If the deployment itself carries the pod-template-hash, it will cause inconsistency between the two hash values, thus skipping the labeling process and ultimately getting stuck in the Verifying stage unable to proceed.
For example, the Deployment below will always get stuck:
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-deployment
spec:
replicas: 3
selector:
matchLabels:
app: example
template:
metadata:
labels:
app: example
pod-template-hash: abc123
spec:
containers:
- name: example-container
image: nginx:latest
ports:
- containerPort: 80
Currently, when BatchRelease patches the pods of a deployment, it removes the ReplicaSet's pod-template-hash label before calculating the Pod Hash, and compares it with the update revision calculated based on the Deployment to decide whether to apply labels. If the deployment itself carries the pod-template-hash, it will cause inconsistency between the two hash values, thus skipping the labeling process and ultimately getting stuck in the Verifying stage unable to proceed.
For example, the Deployment below will always get stuck: