deckhouse / deckhouse

Kubernetes platform from Flant
https://deckhouse.io
Other
1.08k stars 111 forks source link

Symlinks and code generator #2217

Open kvaps opened 2 years ago

kvaps commented 2 years ago

Preflight Checklist

Use case. Why is this important?

I purpose to get rid of /deckhouse symlink and move symlinks management to specific generator.

Better DX:

Proposed Solution

We need to put specific anchor file into root of the project, eg: .deckhouse_root and write a new go generator.

There are a few places which might have an automatic update:

For the last ones I suggest using go/parser and go/ast to automatically manage relative path for deckhouse. Each file should include a new constant which will be generated automatically:

// +deckhouse-gen:root
const deckhouseRoot = "../../.."

then it can be used as usual:

var _ = ensure_crds.RegisterEnsureCRDsHook(deckhouseRoot + "/modules/101-cert-manager/crds/*.yaml")

Additional Information

No response

stale[bot] commented 1 year ago

This issue has been automatically put in the triage queue because it has not had recent activity. The team will reconsider the status of this issue. Thank you for your contributions.

EvgenySamoylov commented 1 year ago

We are working on the 3rd party modules, which will reduce the number of symlinks.