Skip to content

Commit

Permalink
Merge pull request #237 from gthiemonge/custom_flavors
Browse files Browse the repository at this point in the history
Add support for Octavia flavors/flavorprofiles and user-defined nova …
  • Loading branch information
openshift-merge-bot[bot] authored Feb 28, 2024
2 parents 9e1c9e2 + f229d68 commit 2acf2ad
Show file tree
Hide file tree
Showing 10 changed files with 505 additions and 42 deletions.
24 changes: 24 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,30 @@ 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:
type: string
required:
- RAM
- VCPUs
- disk
- name
type: object
type: array
certsPassphraseSecret:
default: octavia-ca-passphrase
description: Name of secret containing passphrase for the CA private
Expand Down
99 changes: 99 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,30 @@ 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:
type: string
required:
- RAM
- VCPUs
- disk
- name
type: object
type: array
certsSecret:
default: octavia-certs-secret
description: LoadBalancerCerts - Secret containing certs for securing
Expand Down Expand Up @@ -434,6 +458,31 @@ 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:
type: string
required:
- RAM
- VCPUs
- disk
- name
type: object
type: array
certsPassphraseSecret:
default: octavia-ca-passphrase
description: Name of secret containing passphrase for the CA private
Expand Down Expand Up @@ -619,6 +668,31 @@ 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:
type: string
required:
- RAM
- VCPUs
- disk
- name
type: object
type: array
certsPassphraseSecret:
default: octavia-ca-passphrase
description: Name of secret containing passphrase for the CA private
Expand Down Expand Up @@ -804,6 +878,31 @@ 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:
type: string
required:
- RAM
- VCPUs
- disk
- name
type: object
type: array
certsPassphraseSecret:
default: octavia-ca-passphrase
description: Name of secret containing passphrase for the CA private
Expand Down
5 changes: 5 additions & 0 deletions api/v1beta1/amphoracontroller_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ type OctaviaAmphoraControllerSpec struct {
// +kubebuilder:validation:Optional
// +kubebuilder:default={manageLbMgmtNetworks: true, subnetIpVersion: 4}
LbMgmtNetworks OctaviaLbMgmtNetworks `json:"lbMgmtNetwork"`

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

// OctaviaAmphoraControllerStatus defines the observed state of the Octavia Amphora Controller
Expand Down
26 changes: 26 additions & 0 deletions api/v1beta1/octavia_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ type OctaviaSpec struct {
// LoadBalancerSSHPrivKey - The name of the secret that will be used to
// store the private key for connecting to amphorae via SSH
LoadBalancerSSHPrivKey string `json:"sshPrivkeySecret,omitempty"`

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

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

// OctaviaAmphoraFlavor Settings for custom Amphora flavors
type OctaviaAmphoraFlavor struct {
// +kubebuilder:validation:Required
Name string `json:"name"`

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

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

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

// +kubebuilder:validation:Required
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,30 @@ 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:
type: string
required:
- RAM
- VCPUs
- disk
- 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 2acf2ad

Please sign in to comment.