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

bug: --source-kubernetes-version flag is needed in directory-mode #39

Open
skoenig opened this issue Mar 23, 2024 · 0 comments
Open

bug: --source-kubernetes-version flag is needed in directory-mode #39

skoenig opened this issue Mar 23, 2024 · 0 comments

Comments

@skoenig
Copy link

skoenig commented Mar 23, 2024

I can reproduce the error mentioned in #5 with kubedd built from 6de142b452f36d0114b87c666a858f0812d78651 (v0.1.2). I have following outdated HPA manifest in fixtures/:

kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta1
metadata:
  labels:
    app.kubernetes.io/instance: cross-products-currency-service
  name: cross-products-currency-service-hpa
  namespace: example
spec:
  maxReplicas: 10
  metrics:
  - resource:
      name: memory
      target:
        averageUtilization: 70
        type: Utilization
    type: Resource
  - resource:
      name: cpu
      target:
        averageUtilization: 70
        type: Utilization
    type: Resource
  minReplicas: 2
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: cross-products-currency-service-deployment

If I omit --source-kubernetes-version flag like so:

./bin/kubedd --target-kubernetes-version 1.29 -d fixtures/

I also get the mentioned unmarshall error without any further output.

In contrast to this, adding the --source-kubernetes-version flag (although the help text states: "In case of directory defaults to same as target-kubernetes-version." ) yields the expected output:

./bin/kubedd --source-kubernetes-version 1.29 --target-kubernetes-version 1.29 -d fixtures

Results for file fixtures/hpa.yaml
-------------------------------------------
>>>> Newer Versions available <<<<
 Namespace   Name                                  Kind                      API Version (Current Available)   Replace With API Version (Latest Available)   Migration Status                             
 example     cross-products-currency-service-hpa   HorizontalPodAutoscaler   autoscaling/v2beta1               autoscaling/v2                                can be migrated with just apiVersion change  

@pghildiyal To me, this looks like a bug, should I open a new issue?

Originally posted by @skoenig in #5 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant