knative / operator

Combined operator for Knative.
Apache License 2.0
187 stars 98 forks source link

change to generate kustomize base files from helm chart #1546

Closed hhk7734 closed 7 months ago

hhk7734 commented 1 year ago

Problem The current chart is generated by hack/generate-helm.sh, which makes it difficult to modify the Helm template.

Therefore, I propose generating the base files used for Kustomize from the chart, in the opposite way of the current method.

Persona: System Operator

Exit Criteria Pass existing CI tests using helm chart and kustomize

Time Estimate (optional): 1 developer, 1~2 days

After changes

./
├── config/
│   ├── charts/
│   │   ├── knative-operator/
│   │   │   ├── Chart.yaml
│   │   │   ├── templates/
│   │   │   │   ├── crd/
│   │   │   │   │   └── bases/
│   │   │   │   │       ├── operator.knative.dev_knativeeventings.yaml
│   │   │   │   │       └── operator.knative.dev_knativeservings.yaml
│   │   │   │   ├── manager/
│   │   │   │   │   ├── config-logging-configmap.yaml
│   │   │   │   │   ├── config-observability-configmap.yaml
│   │   │   │   │   └── operator.yaml
│   │   │   │   ├── rbac/
│   │   │   │   │   ├── clusterrole_aggregated.yaml
│   │   │   │   │   ├── clusterrole_aggregated_binding.yaml
│   │   │   │   │   ├── fake_clusterrole_aggregated_binding.yaml
│   │   │   │   │   ├── fake_service_account.yaml
│   │   │   │   │   ├── role.yaml
│   │   │   │   │   ├── role_binding.yaml
│   │   │   │   │   ├── service_account.yaml
│   │   │   │   │   ├── webhook_role.yaml
│   │   │   │   │   ├── webhook_role_binding.yaml
│   │   │   │   │   └── webhook_service_account.yaml
│   │   │   │   ├──  webhook/
│   │   │   │   │   ├── webhook-secret.yaml
│   │   │   │   │   ├── webhook-service.yaml
│   │   │   │   │   └── webhook.yaml
│   │   │   │   └──  ...
│   │   │   └── values.yaml
│   │   └──  ...
│   ├── crd/
│   │   └──  ...
│   ├── manager/
│   │   └──  ...
│   ├── rbac/
│   │   └──  ...
│   ├── webhook/
│   │   └──  ...
│   └──  ...
├── hack/
│   ├── generate-kustomize.sh
│   └──  ...
└──  ...
houshengbo commented 12 months ago

@hhk7734 Knative operator now has to publish the artifacts in three ways: general yaml on the release page, operatorhub and the helm charts. The current structure is crucial for https://github.com/knative/operator/blob/main/hack/generate-bundle.sh, which is to generate the bundle to publish in operatorhub. I am wondering if you can take this into account as well to optimize the structure of the yamls.

hhk7734 commented 11 months ago

I expect the generate-bundle.sh script to work just fine, since I'm aiming to create config/** from config/charts as is. I'll work on it as soon as I have time and make a PR, so please review again then.

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.