Skip to content

Commit

Permalink
Merge pull request #82 from iawia002/externalDependencies
Browse files Browse the repository at this point in the history
Add ExternalDependencies for the ExtensionVersion
  • Loading branch information
iawia002 authored Mar 2, 2024
2 parents 8a2ae61 + f2673b6 commit 83222e3
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions pkg/extension/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,25 @@ var Categories = []string{
type Metadata struct {
APIVersion string `json:"apiVersion" validate:"required"`
// The name of the chart. Required.
Name string `json:"name" validate:"required"`
Version string `json:"version" validate:"required"`
DisplayName corev1alpha1.Locales `json:"displayName" validate:"required"`
Description corev1alpha1.Locales `json:"description" validate:"required"`
Category string `json:"category" validate:"required"`
Keywords []string `json:"keywords,omitempty"`
Home string `json:"home,omitempty"`
Sources []string `json:"sources,omitempty"`
KubeVersion string `json:"kubeVersion,omitempty"`
KSVersion string `json:"ksVersion,omitempty"`
Maintainers []*chart.Maintainer `json:"maintainers,omitempty"`
Provider map[corev1alpha1.LanguageCode]*corev1alpha1.Provider `json:"provider" validate:"required"`
Icon string `json:"icon" validate:"required"`
Screenshots []string `json:"screenshots,omitempty"`
Dependencies []*chart.Dependency `json:"dependencies,omitempty"`
InstallationMode corev1alpha1.InstallationMode `json:"installationMode,omitempty"`
Namespace string `json:"namespace,omitempty"`
Images []string `json:"images,omitempty"`
Name string `json:"name" validate:"required"`
Version string `json:"version" validate:"required"`
DisplayName corev1alpha1.Locales `json:"displayName" validate:"required"`
Description corev1alpha1.Locales `json:"description" validate:"required"`
Category string `json:"category" validate:"required"`
Keywords []string `json:"keywords,omitempty"`
Home string `json:"home,omitempty"`
Sources []string `json:"sources,omitempty"`
KubeVersion string `json:"kubeVersion,omitempty"`
KSVersion string `json:"ksVersion,omitempty"`
Maintainers []*chart.Maintainer `json:"maintainers,omitempty"`
Provider map[corev1alpha1.LanguageCode]*corev1alpha1.Provider `json:"provider" validate:"required"`
Icon string `json:"icon" validate:"required"`
Screenshots []string `json:"screenshots,omitempty"`
Dependencies []*chart.Dependency `json:"dependencies,omitempty"`
InstallationMode corev1alpha1.InstallationMode `json:"installationMode,omitempty"`
Namespace string `json:"namespace,omitempty"`
Images []string `json:"images,omitempty"`
ExternalDependencies []corev1alpha1.ExternalDependency `json:"externalDependencies,omitempty"`
}

func validateLanguageCode(code corev1alpha1.LanguageCode) error {
Expand Down Expand Up @@ -230,15 +231,16 @@ func (ext *Extension) ToKubernetesResources() []runtimeclient.Object {
Provider: ext.Metadata.Provider,
Created: metav1.Now(),
},
Namespace: ext.Metadata.Namespace,
Home: ext.Metadata.Home,
Keywords: ext.Metadata.Keywords,
KSVersion: ext.Metadata.KSVersion,
KubeVersion: ext.Metadata.KubeVersion,
Sources: ext.Metadata.Sources,
Version: ext.Metadata.Version,
Category: ext.Metadata.Category,
Screenshots: ext.Metadata.Screenshots,
Namespace: ext.Metadata.Namespace,
Home: ext.Metadata.Home,
Keywords: ext.Metadata.Keywords,
KSVersion: ext.Metadata.KSVersion,
KubeVersion: ext.Metadata.KubeVersion,
Sources: ext.Metadata.Sources,
Version: ext.Metadata.Version,
Category: ext.Metadata.Category,
Screenshots: ext.Metadata.Screenshots,
ExternalDependencies: ext.Metadata.ExternalDependencies,
},
},
&corev1.ConfigMap{
Expand Down

0 comments on commit 83222e3

Please sign in to comment.