Skip to content

Commit

Permalink
Addesupport for user-defined flavors
Browse files Browse the repository at this point in the history
  • Loading branch information
gthiemonge committed Jan 22, 2024
1 parent c220c5e commit ddac215
Show file tree
Hide file tree
Showing 8 changed files with 310 additions and 10 deletions.
22 changes: 22 additions & 0 deletions api/bases/octavia.openstack.org_octaviaamphoracontrollers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,28 @@ spec:
description: OctaviaAmphoraControllerSpec defines common state for all
Octavia Amphora Controllers
properties:
amphoraCustomFlavors:
description: AmphoraCustomFlavors - User-defined flavors for Octavia
items:
description: OctaviaAmphoraFlavor Settings for custom Amphora flavors
properties:
RAM:
type: integer
RxTxFactor:
type: string
VCPUs:
type: integer
description:
type: string
disk:
type: integer
name:
pattern: ^octavia-
type: string
required:
- name
type: object
type: array
certspassphrasesecret:
default: octavia-ca-passphrase
description: Name of secret containing passphrase for the CA private
Expand Down
91 changes: 91 additions & 0 deletions api/bases/octavia.openstack.org_octavias.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,28 @@ spec:
spec:
description: OctaviaSpec defines the desired state of Octavia
properties:
amphoraCustomFlavors:
description: AmphoraCustomFlavors - User-defined flavors for Octavia
items:
description: OctaviaAmphoraFlavor Settings for custom Amphora flavors
properties:
RAM:
type: integer
RxTxFactor:
type: string
VCPUs:
type: integer
description:
type: string
disk:
type: integer
name:
pattern: ^octavia-
type: string
required:
- name
type: object
type: array
certssecret:
default: octavia-certs-secret
description: LoadBalancerCerts - Secret containing certs for securing
Expand Down Expand Up @@ -461,6 +483,29 @@ spec:
description: OctaviaHousekeeping - Spec definition for the Octavia
Housekeeping agent for the Octavia deployment
properties:
amphoraCustomFlavors:
description: AmphoraCustomFlavors - User-defined flavors for Octavia
items:
description: OctaviaAmphoraFlavor Settings for custom Amphora
flavors
properties:
RAM:
type: integer
RxTxFactor:
type: string
VCPUs:
type: integer
description:
type: string
disk:
type: integer
name:
pattern: ^octavia-
type: string
required:
- name
type: object
type: array
certspassphrasesecret:
default: octavia-ca-passphrase
description: Name of secret containing passphrase for the CA private
Expand Down Expand Up @@ -634,6 +679,29 @@ spec:
description: OctaviaHousekeeping - Spec definition for the Octavia
Housekeeping agent for the Octavia deployment
properties:
amphoraCustomFlavors:
description: AmphoraCustomFlavors - User-defined flavors for Octavia
items:
description: OctaviaAmphoraFlavor Settings for custom Amphora
flavors
properties:
RAM:
type: integer
RxTxFactor:
type: string
VCPUs:
type: integer
description:
type: string
disk:
type: integer
name:
pattern: ^octavia-
type: string
required:
- name
type: object
type: array
certspassphrasesecret:
default: octavia-ca-passphrase
description: Name of secret containing passphrase for the CA private
Expand Down Expand Up @@ -807,6 +875,29 @@ spec:
description: OctaviaHousekeeping - Spec definition for the Octavia
Housekeeping agent for the Octavia deployment
properties:
amphoraCustomFlavors:
description: AmphoraCustomFlavors - User-defined flavors for Octavia
items:
description: OctaviaAmphoraFlavor Settings for custom Amphora
flavors
properties:
RAM:
type: integer
RxTxFactor:
type: string
VCPUs:
type: integer
description:
type: string
disk:
type: integer
name:
pattern: ^octavia-
type: string
required:
- name
type: object
type: array
certspassphrasesecret:
default: octavia-ca-passphrase
description: Name of secret containing passphrase for the CA private
Expand Down
4 changes: 4 additions & 0 deletions api/v1beta1/amphoracontroller_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ type OctaviaAmphoraControllerSpec struct {
// +kubebuilder:validation:Optional
// +kubebuilder:default={manageLbMgmtNetworks: true, subnetIpVersion: 4}
LbMgmtNetworks OctaviaLbMgmtNetworks `json:"lbMgmtNetwork"`

// +kubebuilder:validation:Optional
// AmphoraCustomFlavors - User-defined flavors for Octavia
AmphoraCustomFlavors []OctaviaAmphoraFlavor `json:"amphoraCustomFlavors"`
}

// OctaviaAmphoraControllerStatus defines the observed state of the Octavia Amphora Controller
Expand Down
25 changes: 25 additions & 0 deletions api/v1beta1/octavia_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ type OctaviaSpec struct {
// +kubebuilder:default=octavia-certs-secret
// LoadBalancerCerts - Secret containing certs for securing communication with amphora based Load Balancers
LoadBalancerCerts string `json:"certssecret"`

// +kubebuilder:validation:Optional
// AmphoraCustomFlavors - User-defined flavors for Octavia
AmphoraCustomFlavors []OctaviaAmphoraFlavor `json:"amphoraCustomFlavors"`
}

// PasswordSelector to identify the DB and AdminUser password from the Secret
Expand Down Expand Up @@ -153,6 +157,27 @@ type OctaviaLbMgmtNetworks struct {
SubnetIPVersion int `json:"subnetIpVersion,omitempty"`
}

// OctaviaAmphoraFlavor Settings for custom Amphora flavors
type OctaviaAmphoraFlavor struct {
// +kubebuilder:validation:Pattern=`^octavia-`
Name string `json:"name"`

// +kubebuilder:validation:Optional
Description string `json:"description"`

// +kubebuilder:validation:Optional
VCPUs int `json:"VCPUs"`

// +kubebuilder:validation:Optional
RAM int `json:"RAM"`

// +kubebuilder:validation:Optional
Disk int `json:"disk"`

// +kubebuilder:validation:Optional
RxTxFactor string `json:"RxTxFactor"`
}

// OctaviaStatus defines the observed state of Octavia
type OctaviaStatus struct {

Expand Down
25 changes: 25 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,28 @@ spec:
description: OctaviaAmphoraControllerSpec defines common state for all
Octavia Amphora Controllers
properties:
amphoraCustomFlavors:
description: AmphoraCustomFlavors - User-defined flavors for Octavia
items:
description: OctaviaAmphoraFlavor Settings for custom Amphora flavors
properties:
RAM:
type: integer
RxTxFactor:
type: string
VCPUs:
type: integer
description:
type: string
disk:
type: integer
name:
pattern: ^octavia-
type: string
required:
- name
type: object
type: array
certspassphrasesecret:
default: octavia-ca-passphrase
description: Name of secret containing passphrase for the CA private
Expand Down
91 changes: 91 additions & 0 deletions config/crd/bases/octavia.openstack.org_octavias.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,28 @@ spec:
spec:
description: OctaviaSpec defines the desired state of Octavia
properties:
amphoraCustomFlavors:
description: AmphoraCustomFlavors - User-defined flavors for Octavia
items:
description: OctaviaAmphoraFlavor Settings for custom Amphora flavors
properties:
RAM:
type: integer
RxTxFactor:
type: string
VCPUs:
type: integer
description:
type: string
disk:
type: integer
name:
pattern: ^octavia-
type: string
required:
- name
type: object
type: array
certssecret:
default: octavia-certs-secret
description: LoadBalancerCerts - Secret containing certs for securing
Expand Down Expand Up @@ -461,6 +483,29 @@ spec:
description: OctaviaHousekeeping - Spec definition for the Octavia
Housekeeping agent for the Octavia deployment
properties:
amphoraCustomFlavors:
description: AmphoraCustomFlavors - User-defined flavors for Octavia
items:
description: OctaviaAmphoraFlavor Settings for custom Amphora
flavors
properties:
RAM:
type: integer
RxTxFactor:
type: string
VCPUs:
type: integer
description:
type: string
disk:
type: integer
name:
pattern: ^octavia-
type: string
required:
- name
type: object
type: array
certspassphrasesecret:
default: octavia-ca-passphrase
description: Name of secret containing passphrase for the CA private
Expand Down Expand Up @@ -634,6 +679,29 @@ spec:
description: OctaviaHousekeeping - Spec definition for the Octavia
Housekeeping agent for the Octavia deployment
properties:
amphoraCustomFlavors:
description: AmphoraCustomFlavors - User-defined flavors for Octavia
items:
description: OctaviaAmphoraFlavor Settings for custom Amphora
flavors
properties:
RAM:
type: integer
RxTxFactor:
type: string
VCPUs:
type: integer
description:
type: string
disk:
type: integer
name:
pattern: ^octavia-
type: string
required:
- name
type: object
type: array
certspassphrasesecret:
default: octavia-ca-passphrase
description: Name of secret containing passphrase for the CA private
Expand Down Expand Up @@ -807,6 +875,29 @@ spec:
description: OctaviaHousekeeping - Spec definition for the Octavia
Housekeeping agent for the Octavia deployment
properties:
amphoraCustomFlavors:
description: AmphoraCustomFlavors - User-defined flavors for Octavia
items:
description: OctaviaAmphoraFlavor Settings for custom Amphora
flavors
properties:
RAM:
type: integer
RxTxFactor:
type: string
VCPUs:
type: integer
description:
type: string
disk:
type: integer
name:
pattern: ^octavia-
type: string
required:
- name
type: object
type: array
certspassphrasesecret:
default: octavia-ca-passphrase
description: Name of secret containing passphrase for the CA private
Expand Down
Loading

0 comments on commit ddac215

Please sign in to comment.