Skip to content

Commit

Permalink
Added missing properties to catalogues
Browse files Browse the repository at this point in the history
* added bond_xmit_hash_policy property to network catalogues
* added sourceRef chart property to versions catalogues
* corrected code typos

Change-Id: Idda5e7628df3631688b84e4d62749ab173c9933f
  • Loading branch information
pallavgupta authored and aostapenko committed May 13, 2021
1 parent 93d9967 commit 7cfffde
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ spec:
type: integer
bond_mode:
type: string
bond_xmit_hash_policy:
type: string
id:
type: string
mtu:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,22 @@ spec:
charts:
additionalProperties:
description: ChartProperties defines the properties of the chart
like Chart and vesrion
like Chart and version
properties:
chart:
type: string
sourceRef:
description: ChartSourceRef defines the properties of the Chart
SourceRef like Kind and Name
properties:
kind:
type: string
name:
type: string
required:
- kind
- name
type: object
version:
type: string
required:
Expand Down Expand Up @@ -215,9 +227,6 @@ spec:
description: Allows for the specification of the kubernetes version
being used.
type: string
required:
- capi_images
- images
type: object
type: object
served: true
Expand Down
21 changes: 11 additions & 10 deletions pkg/api/v1alpha1/networkcatalogue_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,17 @@ type HostNetworkingSpec struct {

// Link defines the properties of the network link
type Link struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
MTU string `json:"mtu,omitempty"`
BondLinks []string `json:"bond_links,omitempty"`
BondMode string `json:"bond_mode,omitempty"`
BondMiimon int `json:"bond_miimon,omitempty"`
VlanLink string `json:"vlan_link,omitempty"`
VlanID int `json:"vlan_id,omitempty"`
VlanMacAddress string `json:"vlan_mac_address,omitempty"`
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
MTU string `json:"mtu,omitempty"`
BondLinks []string `json:"bond_links,omitempty"`
BondMode string `json:"bond_mode,omitempty"`
BondMiimon int `json:"bond_miimon,omitempty"`
BondXmitHashPolicy string `json:"bond_xmit_hash_policy,omitempty"`
VlanLink string `json:"vlan_link,omitempty"`
VlanID int `json:"vlan_id,omitempty"`
VlanMacAddress string `json:"vlan_mac_address,omitempty"`
}

// IPFormat Regex to support both IPV4 and IPV6 format
Expand Down
17 changes: 12 additions & 5 deletions pkg/api/v1alpha1/versionscatalogue_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@ type RepoProperties struct {
// RepositorySpec defines the additional properties for repository
type RepositorySpec map[string]RepoProperties

// ChartProperties defines the properties of the chart like Chart and vesrion
// ChartSourceRef defines the properties of the Chart SourceRef like Kind and Name
type ChartSourceRef struct {
Kind string `json:"kind"`
Name string `json:"name"`
}

// ChartProperties defines the properties of the chart like Chart and version
type ChartProperties struct {
Chart string `json:"chart"`
Version string `json:"version"`
Chart string `json:"chart"`
Version string `json:"version"`
SourceRef ChartSourceRef `json:"sourceRef,omitempty"`
}

// ChartSpec defines the spec for charts
Expand Down Expand Up @@ -140,13 +147,13 @@ type VersionsCatalogueSpec struct {
// "repository" and "tag" properties defined. capi_images may also include an
// optional "ipam-manager" object, which must also have "repository" and "tag"
// properties defined.
CAPIImages CAPIImageSpec `json:"capi_images,omtiempty"`
CAPIImages CAPIImageSpec `json:"capi_images,omitempty"`

// images defines collections of images that are declared as complete
// URLs rather than as a collection of discrete parts, such as "repository" and
// "tag" or "sha". This section of the catalog is organized by
// airshipctl function -> Deployments in function -> images in Deployment.
Images ImageSpec `json:"images,omtiempty"`
Images ImageSpec `json:"images,omitempty"`

// image_components defines images that are declared using the Helm-style
// format that breaks image URLs into discrete parts, such as "repository" and "tag".
Expand Down
16 changes: 16 additions & 0 deletions pkg/api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7cfffde

Please sign in to comment.