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

Helmify Repo Contribution #64

Open
jsitu777 opened this issue Dec 13, 2022 · 5 comments
Open

Helmify Repo Contribution #64

jsitu777 opened this issue Dec 13, 2022 · 5 comments

Comments

@jsitu777
Copy link

Hi,

I'm a developer in AWS working on k8s ML platform/toolings. I recently came across your helmify tool that seems to solve the same problem we had a while ago.

At first we were deploying our program with kustomize but in our recent release we are supporting both helm and terraform. You can check out our repo: https://github.com/awslabs/kubeflow-manifests

I wonder if we can contribute back to the repo instead of solving the same thing.

It will be helpful if you can:

  • Give a brief introduction about yourself
  • Who is maintaining the repo? I see there are 13 contributors so far and it seems to be pretty well maintained (last commit was 7 hours ago), but it seems like you do the majority of the commits.
  • I see that it's under MIT license, are there other licensing issues you want us to be aware of?
@arttor
Copy link
Owner

arttor commented Dec 13, 2022

Hi, i am really happy to hear that helmify can be used in such a big and important project, and very welcome to contributions!

  • I started this project when I was working on gardener onmetal project to convert kustomize to helm.
  • the project is maintained by me but now I do mostly bugfixes and code reviews. It's hard to find time to work on big feature requests.
  • I see no problems with the current MIT license but can change it to any other more open license if needed.

If you have any other questions, we can continue the discussion here or you can email me at [email protected]

@jsitu777
Copy link
Author

Sounds good,

I'll be discussing with my team tomorrow. I was just trying out the tool today with command like kustomize build <kustomize_dir> | helmify mychart and I notice a few things:

  • Seems like the current version does not support a namespace only chart? For example, one of my path should produce a small namespace yaml such as:
apiVersion: v1
kind: Namespace
metadata:
  labels:
    istio-injection: disabled
    istio-operator-managed: Reconcile
  name: istio-system

But when I run the program it produces nothing in the templates. I guess this should be fine I can just bypass it with kubectl apply -f.

From your README you says so far it supports:

  • deployment
  • daemonset
  • service, Ingress
  • PersistentVolumeClaim
  • RBAC (serviceaccount, (cluster-)role, (cluster-)rolebinding)
  • configs (configmap, secret)
  • webhooks (cert, issuer, ValidatingWebhookConfiguration)
  • custom resource definitions

Is this still up-to-date?

Also in one of my charts knative-serving, it has crds dependencies and seems like the program will not create a crds folder and put the crds yaml files inside it as recommended

I create a crds folder manually and move all the crds.yaml inside. When I run helm install it's complaining Error: INSTALLATION FAILED: failed to install CRD crds/certificate-crd.yaml: error parsing : error converting YAML to JSON: yaml: line 9: could not find expected ':'
I guess it has to do with the added {{- include "knative-serving.labels" . | nindent 4 }} after running helmify.

Interestingly I don't see this issue for another chart if the crds.yaml are not inside a crds folder. Is this a known issue? Or how do you deal with crds in the program?

It will be helpful if you can point me to other documentations beside the README.

@arttor
Copy link
Owner

arttor commented Dec 13, 2022

Hi, generated chart utilized to use helm namespace options. So helmify trims namespaces from input manifests and expects that all resources are in the same namespace or global. Then you can set and create an arbitrary namespace for a chart with helm install ... -n <my-namespace> --create-namespace.

To put crds in a separate dir, you can run helmify with -crd-dir option (see help command or readme). This option is disabled by default for backward compatibility.

Unfortunately, all docs for this project are in the readme or in helmify -h command. Please tell me if something missing.

List of supported resources is up-to-date.

@jsitu777
Copy link
Author

How does the tool handle the manifest that the kind is not listed:
deployment
daemonset
service, Ingress
PersistentVolumeClaim
RBAC (serviceaccount, (cluster-)role, (cluster-)rolebinding)
configs (configmap, secret)
webhooks (cert, issuer, ValidatingWebhookConfiguration)
custom resource definitions

I see sometimes a single yaml file will contain two files in there, and when you run helm install, the pod error out

example of one of the generated template file

apiVersion: v1
kind: Service
metadata:
  name: {{ include "knative-serving.fullname" . }}-activator-service
  labels:
    app: activator
    app.kubernetes.io/component: activator
    serving.knative.dev/release: v1.2.5
  {{- include "knative-serving.labels" . | nindent 4 }}
spec:
  type: {{ .Values.activatorService.type }}
  selector:
    app: activator
  {{- include "knative-serving.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.activatorService.ports | toYaml | nindent 2 -}}
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  name: {{ include "knative-serving.fullname" . }}-activator-service
  labels:
  {{- include "knative-serving.labels" . | nindent 4 }}
spec:
  action: ALLOW
  rules:
  - {}
  selector:
    matchLabels:
      app: activator

it might be due to the fact that the kind is not listed.

@arttor
Copy link
Owner

arttor commented Dec 14, 2022

yes, for not listed kinds helmify only processes metadata with default processor.

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

2 participants