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

kctrl kubernetesVersionSelection constraint #1431

Open
imusmanmalik opened this issue Dec 20, 2023 · 0 comments
Open

kctrl kubernetesVersionSelection constraint #1431

imusmanmalik opened this issue Dec 20, 2023 · 0 comments
Labels
bug This issue describes a defect or unexpected behavior carvel-accepted This issue should be considered for future work and that the triage process has been completed cli Issue for kapp-controller cli priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@imusmanmalik
Copy link
Contributor

What steps did you take:

Using kctrl dev -f package-resources.yml -l to test a Package locally.

What happened:

apiVersion: data.packaging.carvel.dev/v1alpha1
kind: Package
metadata:
  creationTimestamp: null
  name: keycloak-operator.0.0.0
spec:
  refName: keycloak-operator
  releasedAt: null
  kubernetesVersionSelection:
    constraints: ">=1.23.0 <1.28.0"
    spec:
      deploy:
        - kapp: {}
      fetch:
        - git: {}
      template:
        - ytt:
            paths:
              - ./manifests
              - ./config
        - kbld: {}
  valuesSchema:
    openAPIv3: null
  version: 0.0.0

spec.kubernetesVersionSelection.constraints as per documentation

When spec.kubernetesVersionSelection.constraints is removed it works.

Unfortunately this fails with a stack trace:

panic: Not implemented

goroutine 1 [running]:
github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/local.(*MinCoreClient).Discovery(0x1101313)
	github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/local/min_core_client.go:94 +0x25
github.com/vmware-tanzu/carvel-kapp-controller/pkg/componentinfo.(*ComponentInfo).KubernetesVersion(0xc00062c810, {0xc00059f830?, 0x0?}, 0x0?, 0x0?)
	github.com/vmware-tanzu/carvel-kapp-controller@v0.46.0/pkg/componentinfo/component_info.go:46 +0x658
github.com/vmware-tanzu/carvel-kapp-controller/pkg/packageinstall.(*PackageInstallCR).referencedPkgVersion(_)
	github.com/vmware-tanzu/carvel-kapp-controller@v0.46.0/pkg/packageinstall/packageinstall.go:304 +0x6c3
github.com/vmware-tanzu/carvel-kapp-controller/pkg/packageinstall.(*PackageInstallCR).reconcile(0xc000123810, 0xc0006c34c8)
	github.com/vmware-tanzu/carvel-kapp-controller@v0.46.0/pkg/packageinstall/packageinstall.go:113 +0x47f
github.com/vmware-tanzu/carvel-kapp-controller/pkg/packageinstall.(*PackageInstallCR).Reconcile(0xc000123810)
	github.com/vmware-tanzu/carvel-kapp-controller@v0.46.0/pkg/packageinstall/packageinstall.go:79 +0x128
github.com/vmware-tanzu/carvel-kapp-controller/pkg/packageinstall.(*Reconciler).Reconcile(0xc000133b60, {0x2998308, 0x3757640}, {{{0x7ff7bfefdcce, 0x1a}, {0xc0001218a8, 0x11}}})
	github.com/vmware-tanzu/carvel-kapp-controller@v0.46.0/pkg/packageinstall/reconciler.go:88 +0x312
github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/local.(*Reconciler).Reconcile(0xc0006c39c8, {{0x0, 0x0, 0x0}, {0xc00032d500, 0x1, 0x1}, {0xc00045ad20, 0x1, 0x1}, ...}, ...)
	github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/local/reconciler.go:134 +0x7b2
github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/cmd/dev.(*DevOptions).Run(0xc000133680)
	github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/cmd/dev/cmd.go:74 +0x319
github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/cmd/dev.NewCmd.func1(0xc00024ee10?, {0x2715a31?, 0xa?, 0x24cd040?})
	github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/cmd/dev/cmd.go:46 +0x17
github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/cmd.configureGlobalFlags.func1.1(0xc000217be8?, {0xc0004e51d0, 0x0, 0x5})
	github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/cmd/kctrl.go:141 +0xc3
github.com/cppforlife/cobrautil.DisallowExtraArgs.WrapRunEForCmd.func2.1(0xc000217c90?, {0xc0004e51d0, 0x0, 0x5})
	github.com/cppforlife/cobrautil@v0.0.0-20221130162803-acdfead391ef/misc.go:45 +0x62
github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/cmd.configureGlobalFlags.WrapRunEForCmd.func3.1(0x11c4b3b?, {0xc0004e51d0, 0x0, 0x5})
	github.com/cppforlife/cobrautil@v0.0.0-20221130162803-acdfead391ef/misc.go:45 +0x62
github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/cmd.configureGlobalFlags.WrapRunEForCmd.func6.1(0x5?, {0xc0004e51d0, 0x0, 0x5})
	github.com/cppforlife/cobrautil@v0.0.0-20221130162803-acdfead391ef/misc.go:45 +0x62
github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/cmd.configureTTY.func1.WrapRunEForCmd.func2.1(0xc00014a600?, {0xc0004e51d0, 0x0, 0x5})
	github.com/cppforlife/cobrautil@v0.0.0-20221130162803-acdfead391ef/misc.go:45 +0x62
github.com/spf13/cobra.(*Command).execute(0xc00047d080, {0xc0004e5180, 0x5, 0x5})
	github.com/spf13/cobra@v1.6.1/command.go:850 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0xc00032b080)
	github.com/spf13/cobra@v1.6.1/command.go:958 +0x389
github.com/spf13/cobra.(*Command).Execute(0xc00017cd00?)
	github.com/spf13/cobra@v1.6.1/command.go:895 +0x13
main.nonExitingMain()
	github.com/vmware-tanzu/carvel-kapp-controller/cli/cmd/kctrl/kctrl.go:39 +0x145
main.main()
	github.com/vmware-tanzu/carvel-kapp-controller/cli/cmd/kctrl/kctrl.go:21 +0x13                                                                                                                                                

What did you expect:

I am able to deploy the Package successfully locally without any errors.

Environment:

  • kctrl version 0.44.11 (Works on this version and not any version above)
  • kctrl version 0.49.0

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

@imusmanmalik imusmanmalik added bug This issue describes a defect or unexpected behavior carvel-triage This issue has not yet been reviewed for validity labels Dec 20, 2023
@imusmanmalik imusmanmalik changed the title kctrl kubernetesVersionSelection contraint kctrl kubernetesVersionSelection constraint Dec 20, 2023
@renuy renuy added carvel-accepted This issue should be considered for future work and that the triage process has been completed cli Issue for kapp-controller cli priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed carvel-triage This issue has not yet been reviewed for validity labels Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes a defect or unexpected behavior carvel-accepted This issue should be considered for future work and that the triage process has been completed cli Issue for kapp-controller cli priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
Status: Prioritized Backlog
Development

No branches or pull requests

2 participants