Skip to content

Define v3 dogu specification type in new library - #2

Open
pmoerchen wants to merge 24 commits into
developfrom
feature/1-define-v3-dogu-specification-type-in-new-library
Open

Define v3 dogu specification type in new library#2
pmoerchen wants to merge 24 commits into
developfrom
feature/1-define-v3-dogu-specification-type-in-new-library

Conversation

@pmoerchen

Copy link
Copy Markdown
Collaborator

No description provided.

@jelemux jelemux left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me. Just a few small things I found.

Comment thread doguv3/doguSpec.go Outdated
Comment on lines +122 to +126
// 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"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this can be multiple, should it be a slice?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ups, you are completely right, i meant to make it a slice...

Comment thread doguv3/doguSpec.go
Comment on lines +155 to +183
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"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread doguv3/doguSpec.go Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants