Define v3 dogu specification type in new library - #2
Conversation
This package provides some types used for the specification of v3 dogus
jelemux
left a comment
There was a problem hiding this comment.
Looks pretty good to me. Just a few small things I found.
| // Categories the categories under which the dogu should be listed in the Warp menu. Usually this is just one, but | ||
| // dogus are free to declare entries for different categories if it fits their applications. | ||
| // Commonly used categories are "Development Apps", "Administration Apps", or "Documentation", but | ||
| // other categories can be declared as needed. | ||
| Categories string `json:"Categories"` |
There was a problem hiding this comment.
If this can be multiple, should it be a slice?
There was a problem hiding this comment.
Ups, you are completely right, i meant to make it a slice...
| Images []string `json:"Images"` | ||
|
|
||
| // DoguApis a list of dogu related APIs and their versions, which are used by this dogu. This information is | ||
| // gathered from the resources of the dogu's Helm chart. | ||
| // Each API is listed in the format <kind>.<group>/<version>. | ||
| // Examples: | ||
| // - "ServiceAccountRequest.k8s.cloudogu.com/v1" | ||
| // - "Exposition.k8s.cloudogu.com/v1" | ||
| DoguApis []string `json:"DoguApis"` | ||
|
|
||
| // ServiceAccounts a list of all required or provided service accounts for this dogu. This information is collected | ||
| // from the ServiceAccountRequest.k8s.cloudogu.com and ServiceAccountProvider.k8s.cloudogu.com resources contained | ||
| // in the dogu's Helm chart. | ||
| ServiceAccounts ServiceAccounts `json:"ServiceAccounts"` | ||
|
|
||
| // ExposedPorts is a list of [ExposedPort], describing additional ports, this dogu wants to expose. This information | ||
| // is collected from any Exposition.k8s.cloudogu.com resources contained in the dogu's Helm chart. | ||
| // Dogus can expose ports if the dogu provides services to a consumer | ||
| // (f.i. if it wants to provide an API for a CLI tool). | ||
| ExposedPorts []ExposedPort `json:"ExposedPorts"` | ||
|
|
||
| // ConfigurableKeys a list of common configuration keys supported by this dogu. The list is taken from the | ||
| // dogu-values-metadata.yaml of the dogu's Helm chart. | ||
| // Example: "logging/root" | ||
| ConfigurableKeys []string `json:"ConfigurableKeys"` | ||
|
|
||
| // Upgrades a list of possible upgrade paths this dogu supports. This information is taken from the upgrade-api.yaml | ||
| // of the dogu's Helm chart. | ||
| Upgrades []Upgrade `json:"Upgrades"` |
There was a problem hiding this comment.
Hm, I thought we could use the API of the OCI registry to retrieve the information without having to pull and extract the Helm chart, since all the info of the Chart.yaml is also included as OCI metadata with Helm charts. But since all these fields are not included in the Chart.yaml, I guess we can't avoid unpacking the Helm chart. This is not critique of this PR, just some thoughts.
There was a problem hiding this comment.
The exact location and format of the update information is left somewhat vague by the ADR - I think we have to wait how this finds actually being implemented. But DCC (or any other tool doing this) has to unpack the chart anyway, as there are several things defined inside, that must end up in this data structure.
No description provided.