bakdata / kpops

Deploy Kafka pipelines to Kubernetes
https://bakdata.github.io/kpops
MIT License
12 stars 1 forks source link

Rename generic `app` config to something more specific #502

Open philipp94831 opened 1 week ago

philipp94831 commented 1 week ago

Currently, most components use app to specify its config. We should consider renaming it to something more specific so that the purpose becomes more clear. Suggestions:

raminqaf commented 1 week ago

I don't even understand what the config for Kubernetes does

@philipp94831 model_config is Paydantic's base model field for configuring your model. The [allow_extra](https://docs.pydantic.dev/latest/api/config/#pydantic.config.ConfigDict.extra) is defined as:

Whether to ignore, allow, or forbid extra attributes during model initialization.

disrupted commented 1 week ago

I don't even understand what the config for Kubernetes does

@philipp94831 model_config is Paydantic's base model field for configuring your model. The [allow_extra](https://docs.pydantic.dev/latest/api/config/#pydantic.config.ConfigDict.extra) is defined as:

Whether to ignore, allow, or forbid extra attributes during model initialization.

I don't see how this is related to the issue

philipp94831 commented 2 days ago

I linked to the wrong thing above. This is what I meant https://github.com/bakdata/kpops/blob/main/kpops/components/base_components/kubernetes_app.py#L42. Why does KubernetesApp has an app field if it is not used (or I don't see it). It makes sense to have it for HelmApp

disrupted commented 2 days ago

but a plain Kubernetes app (which is not managed by a Helm chart) can also have values, e.g.

kubernetes-app:
  app:  # rename: values
    labels:
      foo: foo
philipp94831 commented 2 days ago

How are these used for deploying the app? Because there is no manifest template they are used for

disrupted commented 1 day ago

true, this is not implemented as of yet. So far we're only using it for the enrichment for components inheriting from KubernetesApp, e.g. HelmApp and Cleaner/Resetter. In the future we would like to support standalone KubernetesApps, i.e. deploying them using the Kubernetes API.