kubepack / chartify

📈 Generate Helm Charts from Kubernetes objects
Apache License 2.0
227 stars 25 forks source link

Fixes for some more scenarios not working #24

Closed yadavnikhil closed 7 years ago

yadavnikhil commented 7 years ago
  1. Fix values string for parameters starting with "." in its name in ifCondition
  2. Service Selector were not maching the MatchLabels from Deployment due to modifyLabelSelector function Added modifySvcLabelSelector function to generate name as per deployment matchLabels for K8s setup to work correctly
  3. The secret ex. ImagePullSecret in deployment was not mapped to new name generated by generateSafeKey() for corresponding secret. Added code to match the secret name as generated generateSafeKey() by in function generateTemplateForPodSpec()

Issue: Issue still exists as i raised last week: #17

tamalsaha commented 7 years ago

@yadavnikhil , can you add some tests or modify the existing ones to check for these cases?

yadavnikhil commented 7 years ago

@TamalSaha Added Required test Cases. For pull secret test will fail as per #17

tamalsaha commented 7 years ago

@yadavnikhil I have migrated Chartify to use Client-go and merged that into master. Please rebase.

yadavnikhil commented 7 years ago

I took your latest code & merged mine into it. I also fixed an issue in kube_objects.go. Can you review it?

yadavnikhil commented 7 years ago

@TamalSaha Latest Code failing for me:

github.com/appscode/chartify/pkg

pkg/kube_objects.go:107: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:135: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:163: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:191: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:218: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:245: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:272: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:299: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:326: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:354: undefined: "k8s.io/client-go/pkg/api/v1".GetReference

tamalsaha commented 7 years ago

Hi, can you pull master and build the code using ./hack/make.py?

tamalsaha commented 7 years ago

I have vendored last released version of client-go https://github.com/kubernetes/client-go/tree/v3.0.0-beta.0

That version does not have client-go/pk/api/v1/ref package.

yadavnikhil commented 7 years ago

Still fails:

Ungrouping imports of dir: pkg Ungrouping imports of file: main.go goimports -w pkg main.go gofmt -s -w main.go pkg GO15VENDOREXPERIMENT=1 go install .

github.com/appscode/chartify/pkg

pkg/kube_objects.go:107: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:135: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:163: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:191: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:218: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:245: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:272: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:299: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:326: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:354: undefined: "k8s.io/client-go/pkg/api/v1".GetReference pkg/kube_objects.go:354: too many errors

That is why i added this import in my previous commit: apiv1ref "k8s.io/client-go/pkg/api/v1/ref"

& used apiv1ref.GetReference -- This worked for me

Let me check what version i have.

tamalsaha commented 7 years ago

@yadavnikhil , can you pull master and try one for time. Please let me know if it worked or not.

yadavnikhil commented 7 years ago

@TamalSaha Yes, getting to correct client-go tag worked now. Thanks.

yadavnikhil commented 7 years ago

I'm still struggling with Secrets :( The secret name changes everytime i deploy it separately in different Chart & i need to update the name accordingly in deployment values.yaml.

tamalsaha commented 7 years ago

@yadavnikhil , can you join our slack https://slack.appscode.com/? We can chat and see if there is a better solution for you.

yadavnikhil commented 7 years ago

I cannot open your slack URL. is it appscode.slack.com? If yes, can you invite me there so i can join?

On Thu, Jun 1, 2017 at 8:32 AM, Tamal Saha notifications@github.com wrote:

@yadavnikhil https://github.com/yadavnikhil , can you join our slack https://slack.appscode.com/? We can chat and see if there is a better solution for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/appscode/chartify/pull/24#issuecomment-305376176, or mute the thread https://github.com/notifications/unsubscribe-auth/AKcr9nz46K15cLwBs6reg2gfMPzXT0Adks5r_im5gaJpZM4Np9_T .

tamalsaha commented 7 years ago

https://slack.appscode.com is our slack invitation address. This seems to be working for me.

If you are having trouble, can you email me your email address? Then I can send you an invite. You can find my email on my profile page https://github.com/TamalSaha .