Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to apply v1alpha1 using single ServiceAccount with Workload Identity. #98

Open
w1mvy opened this issue Jun 6, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@w1mvy
Copy link
Contributor

w1mvy commented Jun 6, 2023

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.

https://github.com/mercari/spanner-autoscaler/compare/master...w1mvy:fix/convertfrom-v1alpha-when-single-sa?expand=1

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
@w1mvy w1mvy added the bug Something isn't working label Jun 6, 2023
@tkuchiki
Copy link
Contributor

@w1mvy Thank you for opening the issue, and we apologize for the late reply.
We will check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants