# Review of Airshipctl functions for new structure refactoring From the 11/12 Design call, there was a discussion around refactoring our functions to consistently identify upstream sources from downstream as well as downstream modifcations made to an upstream base. Here is the list of functions which may be impacted by refactoring to the new structure. Each function should be analyzed base on the following criteria: **HomeGrown:** If a function is home-grown & uses no copied upstream base, leave out `[function]/upstream/` **UpstreamOnly:** If a function is *only* an upstream based, put it under `[function]/upstream/` and have a thin passthrough in `[function]/kustomization.yaml` **Customized:** If a function utilizes an ***upstream*** base but is then patched downstream, then the structure should look something like this: ```plantuml @startsalt { {T / + manifests/ ++ function/ +++ capi/ ++++ vx.y.z/ +++++ upstream/ | < Put upstream code here (skip if homegrown) +++++ replacements/ +++++ patches1..n.yaml | < Airship specific patches (skip if upstream only) +++++ kustomization.yaml | < Apply our patches on top of upstream +++ flux | Group or Category of functions name ++++ base +++++ vx.y.z/ ++++++ upstream/ | < Put upstream code here (skip if homegrown) ++++++ replacements/ ++++++ patches1..n.yaml | < Airship specific patches (skip if upstream only) ++++++ kustomization.yaml | < Apply our patches on top of upstream ++++ source controller +++++ vx.y.z/ ++++++ upstream/ | < Put upstream code here (skip if homegrown) ++++++ replacements/ ++++++ patches1..n.yaml | < Airship specific patches (skip if upstream only) ++++++ kustomization.yaml | < Apply our patches on top of upstream } } @endsalt ``` --- Please review the following and indicate in which category the function should be placed ## [airshipctl/manifests/function](https://github.com/airshipit/airshipctl/tree/master/manifests/function) | Function | HomeGrown | UpstreamOnly | Customized | |:----------------------- |:---------:|:------------:|:-----:| | airship-base-catalogues | X | | | | baremetal-operator | | | X | | cabpk | | X | | | cacpk | | X | | | capd | | X | | | capg | | X | | | capi | | X | | | capm3 | | X | | | capo | | X | | | capz | | X | | | certmanager | | X | | | clusterctl | | | X | | cni/calico | | | X | | ephemeral | X | | | | flux/base | | | X | | flux/helm-controller | | | X | | flux/source-controller | | | X | | hardwareprofile-example | X | | | ** DEPRECATED| helm-operator | | | | | hostgenerator-m3 | X | | | | hwcc | | X | | | k8scontrol | X | | | | k8scontrol-capd | X | | | | k8scontrol-capg | X | | | | k8scontrol-capo | X | | | | k8scontrol-capz | X | | | | workers-capd | X | | | | workers-capg | X | | | | workers-capo | X | | | ## [treasuremap/manifests/function](https://github.com/airshipit/treasuremap/tree/v2/manifests/function) | Function | HomeGrown | UpstreamOnly | Customized | | ----------------------- | --------- | ------------ | ---------- | | clusterctl | X | | | | hostconfig-operator | X | | | | ingress | X | | |