-
Couldn't load subscription status.
- Fork 15
Description
What happened
Upgraded SpannerAutoscaler from v0.2.1 to v0.4.3. I then applied the v1alpha1 changes and got the following error.
The SpannerAutoscaler "spanner-autoscaler" is invalid: spec.serviceAccountSecretRef: Invalid value: "null": spec.serviceAccountSecretRef in body must be of type object: "null"
The v1alpha1 manifest uses single ServiceAccount with Workload Identity as follows. ref
---
apiVersion: spanner.mercari.com/v1alpha1
kind: SpannerAutoscaler
metadata:
name: spannerautoscaler-sample-alpha
namespace: test
spec:
scaleTargetRef:
projectId: test-project
instanceId: test-instance
minNodes: 1
maxNodes: 4
maxScaleDownNodes: 2
targetCPUUtilization:
highPriority: 80
What you expected to happen
I expect that even v1alpha1 that uses WorkloadIdentity and one ServiceAccount will convert correctly.
When convert from v1alpha1 using single ServiceAccount with Workload Identity to v1beta1, I think that this is due to the fact that AuthTypeADC is not set in spec.authentication.type during conversion, and have made the following fixes.
Please check it and if it looks OK, I will create a Pull Request.
How to reproduce it
apply v1alpha1 using single ServiceAccount with Workload Identity in env spanner-autoscaler v0.4.3
Environment
- GKE
- SpannerAutoscaler: v0.4.3