After creating an ECS Service, I am unable to change the initially set desiredCount in the provisioned resource.
It appears changes to desiredCount field do not trigger a new deployment or alter the existing deployment.
Initial Service:
apiVersion: ecs.aws.crossplane.io/v1alpha1
kind: Service
metadata:
labels:
testing.upbound.io/example-name: sample-app-service
name: sample-app-service
spec:
forProvider:
desiredCount: 1
deploymentController:
type_: ECS
deploymentConfiguration:
maximumPercent: 200
minimumHealthyPercent: 0
launchType: FARGATE
region: us-east-1
schedulingStrategy: REPLICA
platformVersion: 1.4.0
clusterSelector:
matchLabels:
testing.upbound.io/example-name: sample-app-cluster
loadBalancers:
- containerName: sample-app-container
containerPort: 80
targetGroupARNSelector:
matchLabels:
testing.upbound.io/example-name: sample-app-target-group
networkConfiguration:
awsvpcConfiguration:
assignPublicIP: ENABLED
securityGroupSelector:
matchLabels:
testing.upbound.io/example-name: sg-us-east-1
subnetSelector:
matchLabels:
all-subnets: included
taskDefinitionSelector:
matchLabels:
testing.upbound.io/example-name: sample-app-task
Once this is up and running, I change desiredCount to 2 and apply.
I can see the change reflected in the object's Spec section on the cluster:
But the object's Status section shows that no new deployment has been rolled out and displays the old deployment's config:
The object's events section clearly shows only 1 deployment has ever been attempted:
At this point, to get another deployment, I have to delete the service and create a new one...
How can I redeploy a service with a new desiredCount value without deleting and re-creating it?
In the console, there is a "force new deployment" option that allows this when you hit "Update Service" :
Is this functionality available in Crossplane?
You can apply all yaml in this repo to lay down a network, ALB, and ECS Fargate cluster, task, service, and role.
When you change desiredCount to 2 and apply, you will see no new deployment occuring.
Crossplane version: v1.11.0
Kubectl client version: v1.25.0
Kubectl server version: v1.25.3
OS: Pop!_OS 22.04 LTS
KinD: 0.17.0