Skip to content

Commit

Permalink
Add support for jobboard/redis
Browse files Browse the repository at this point in the history
  • Loading branch information
gthiemonge committed Feb 12, 2024
1 parent fca0548 commit 725f330
Show file tree
Hide file tree
Showing 18 changed files with 250 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ spec:
from the Secret
type: string
type: object
redisHostIPs:
description: List of Redis Host IP addresses
items:
type: string
type: array
resources:
description: Resources - Compute Resources required by this service
(Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Expand Down
20 changes: 20 additions & 0 deletions api/bases/octavia.openstack.org_octavias.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,11 @@ spec:
from the Secret
type: string
type: object
redisHostIPs:
description: List of Redis Host IP addresses
items:
type: string
type: array
resources:
description: Resources - Compute Resources required by this service
(Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Expand Down Expand Up @@ -695,6 +700,11 @@ spec:
from the Secret
type: string
type: object
redisHostIPs:
description: List of Redis Host IP addresses
items:
type: string
type: array
resources:
description: Resources - Compute Resources required by this service
(Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Expand Down Expand Up @@ -868,6 +878,11 @@ spec:
from the Secret
type: string
type: object
redisHostIPs:
description: List of Redis Host IP addresses
items:
type: string
type: array
resources:
description: Resources - Compute Resources required by this service
(Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Expand Down Expand Up @@ -1058,6 +1073,11 @@ spec:
description: ReadyCount of octavia Housekeeping instances
format: int32
type: integer
redisHostIPs:
description: List of Redis Host IP addresses
items:
type: string
type: array
transportURLSecret:
description: TransportURLSecret - Secret containing RabbitMQ transportURL
type: string
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
// List of Redis Host IP addresses
RedisHostIPs []string `json:"redisHostIPs,omitempty"`
}

// OctaviaAmphoraControllerStatus defines the observed state of the Octavia Amphora Controller
Expand Down
3 changes: 3 additions & 0 deletions api/v1beta1/octavia_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ type OctaviaStatus struct {

// ReadyCount of octavia HealthManager instances
OctaviaHealthManagerReadyCount int32 `json:"healthmanagerreadyCount,omitempty"`

// List of Redis Host IP addresses
RedisHostIPs []string `json:"redisHostIPs,omitempty"`
}

//+kubebuilder:object:root=true
Expand Down
10 changes: 10 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 @@ -138,6 +138,11 @@ spec:
from the Secret
type: string
type: object
redisHostIPs:
description: List of Redis Host IP addresses
items:
type: string
type: array
resources:
description: Resources - Compute Resources required by this service
(Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Expand Down
20 changes: 20 additions & 0 deletions config/crd/bases/octavia.openstack.org_octavias.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,11 @@ spec:
from the Secret
type: string
type: object
redisHostIPs:
description: List of Redis Host IP addresses
items:
type: string
type: array
resources:
description: Resources - Compute Resources required by this service
(Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Expand Down Expand Up @@ -695,6 +700,11 @@ spec:
from the Secret
type: string
type: object
redisHostIPs:
description: List of Redis Host IP addresses
items:
type: string
type: array
resources:
description: Resources - Compute Resources required by this service
(Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Expand Down Expand Up @@ -868,6 +878,11 @@ spec:
from the Secret
type: string
type: object
redisHostIPs:
description: List of Redis Host IP addresses
items:
type: string
type: array
resources:
description: Resources - Compute Resources required by this service
(Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Expand Down Expand Up @@ -1058,6 +1073,11 @@ spec:
description: ReadyCount of octavia Housekeeping instances
format: int32
type: integer
redisHostIPs:
description: List of Redis Host IP addresses
items:
type: string
type: array
transportURLSecret:
description: TransportURLSecret - Secret containing RabbitMQ transportURL
type: string
Expand Down
2 changes: 2 additions & 0 deletions controllers/amphoracontroller_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package controllers
import (
"context"
"fmt"
"strings"
"time"

"github.com/go-logr/logr"
Expand Down Expand Up @@ -473,6 +474,7 @@ func (r *OctaviaAmphoraControllerReconciler) generateServiceConfigMaps(
}
// TODO(gthiemonge) store keys/passwords/passphrases in a specific config file stored in a secret
templateParameters["HeartbeatKey"] = string(ospSecret.Data["OctaviaHeartbeatKey"])
templateParameters["JobboardBackendHosts"] = strings.Join(spec.RedisHostIPs[:], ",")

// TODO(beagles): populate the template parameters
cms := []util.Template{
Expand Down
Loading

0 comments on commit 725f330

Please sign in to comment.