From bb7d0d425e251d1c30a1cbec45a09f0fe111f46f Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Wed, 10 Apr 2024 14:38:10 +0200 Subject: [PATCH] [wip] RedisInstance --- ...enstack.org_octaviaamphoracontrollers.yaml | 10 +-- api/bases/octavia.openstack.org_octavias.yaml | 35 ++++----- api/v1beta1/amphoracontroller_types.go | 9 ++- api/v1beta1/octavia_types.go | 3 - api/v1beta1/zz_generated.deepcopy.go | 10 --- ...enstack.org_octaviaamphoracontrollers.yaml | 10 +-- .../bases/octavia.openstack.org_octavias.yaml | 35 ++++----- controllers/amphoracontroller_controller.go | 73 ++++++++++++++++++- controllers/octavia_controller.go | 58 --------------- go.mod | 28 ++++--- go.sum | 52 ++++++------- .../config/octavia.conf | 4 + 12 files changed, 162 insertions(+), 165 deletions(-) diff --git a/api/bases/octavia.openstack.org_octaviaamphoracontrollers.yaml b/api/bases/octavia.openstack.org_octaviaamphoracontrollers.yaml index 403b8ecd..c13fbaa0 100644 --- a/api/bases/octavia.openstack.org_octaviaamphoracontrollers.yaml +++ b/api/bases/octavia.openstack.org_octaviaamphoracontrollers.yaml @@ -147,11 +147,10 @@ spec: description: PersistenceDatabaseAccount - name of MariaDBAccount which will be used to connect for the persistence database type: string - redisHostIPs: - description: List of Redis Host IP addresses - items: - type: string - type: array + redisInstance: + default: redis + description: Redis instance name. + type: string resources: description: Resources - Compute Resources required by this service (Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ @@ -236,6 +235,7 @@ spec: type: string required: - databaseInstance + - redisInstance - role - secret - serviceAccount diff --git a/api/bases/octavia.openstack.org_octavias.yaml b/api/bases/octavia.openstack.org_octavias.yaml index 9f1331cf..39d00bda 100644 --- a/api/bases/octavia.openstack.org_octavias.yaml +++ b/api/bases/octavia.openstack.org_octavias.yaml @@ -590,11 +590,10 @@ spec: description: PersistenceDatabaseAccount - name of MariaDBAccount which will be used to connect for the persistence database type: string - redisHostIPs: - description: List of Redis Host IP addresses - items: - type: string - type: array + redisInstance: + default: redis + description: Redis instance name. + type: string resources: description: Resources - Compute Resources required by this service (Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ @@ -680,6 +679,7 @@ spec: type: string required: - databaseInstance + - redisInstance - role - secret - serviceAccount @@ -787,11 +787,10 @@ spec: description: PersistenceDatabaseAccount - name of MariaDBAccount which will be used to connect for the persistence database type: string - redisHostIPs: - description: List of Redis Host IP addresses - items: - type: string - type: array + redisInstance: + default: redis + description: Redis instance name. + type: string resources: description: Resources - Compute Resources required by this service (Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ @@ -877,6 +876,7 @@ spec: type: string required: - databaseInstance + - redisInstance - role - secret - serviceAccount @@ -984,11 +984,10 @@ spec: description: PersistenceDatabaseAccount - name of MariaDBAccount which will be used to connect for the persistence database type: string - redisHostIPs: - description: List of Redis Host IP addresses - items: - type: string - type: array + redisInstance: + default: redis + description: Redis instance name. + type: string resources: description: Resources - Compute Resources required by this service (Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ @@ -1074,6 +1073,7 @@ spec: type: string required: - databaseInstance + - redisInstance - role - secret - serviceAccount @@ -1265,11 +1265,6 @@ spec: ContainerImage) format: int64 type: integer - redisHostIPs: - description: List of Redis Host IP addresses - items: - type: string - type: array transportURLSecret: description: TransportURLSecret - Secret containing RabbitMQ transportURL type: string diff --git a/api/v1beta1/amphoracontroller_types.go b/api/v1beta1/amphoracontroller_types.go index 367948b5..c97e7b64 100644 --- a/api/v1beta1/amphoracontroller_types.go +++ b/api/v1beta1/amphoracontroller_types.go @@ -136,10 +136,11 @@ type OctaviaAmphoraControllerSpecCore struct { // AmphoraCustomFlavors - User-defined flavors for Octavia AmphoraCustomFlavors []OctaviaAmphoraFlavor `json:"amphoraCustomFlavors,omitempty"` - // +kubebuilder:validation:Optional - // +kubebuilder:default={} - // List of Redis Host IP addresses - RedisHostIPs []string `json:"redisHostIPs,omitempty"` + // +kubebuilder:validation:Required + // +kubebuilder:default=redis + // Redis instance name. + RedisInstance string `json:"redisInstance"` + // +operator-sdk:csv:customresourcedefinitions:type=spec // TLS - Parameters related to the TLS TLS tls.Ca `json:"tls,omitempty"` diff --git a/api/v1beta1/octavia_types.go b/api/v1beta1/octavia_types.go index 3a033d3e..37acc5b2 100644 --- a/api/v1beta1/octavia_types.go +++ b/api/v1beta1/octavia_types.go @@ -267,9 +267,6 @@ type OctaviaStatus struct { // ReadyCount of octavia HealthManager instances OctaviaHealthManagerReadyCount int32 `json:"healthmanagerreadyCount,omitempty"` - // List of Redis Host IP addresses - RedisHostIPs []string `json:"redisHostIPs,omitempty"` - // ObservedGeneration - the most recent generation observed for this // service. If the observed generation is less than the spec generation, // then the controller has not processed the latest changes injected by diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index dee6925c..2eb8fcea 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -342,11 +342,6 @@ func (in *OctaviaAmphoraControllerSpecCore) DeepCopyInto(out *OctaviaAmphoraCont *out = make([]OctaviaAmphoraFlavor, len(*in)) copy(*out, *in) } - if in.RedisHostIPs != nil { - in, out := &in.RedisHostIPs, &out.RedisHostIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } out.TLS = in.TLS } @@ -575,11 +570,6 @@ func (in *OctaviaStatus) DeepCopyInto(out *OctaviaStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.RedisHostIPs != nil { - in, out := &in.RedisHostIPs, &out.RedisHostIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OctaviaStatus. diff --git a/config/crd/bases/octavia.openstack.org_octaviaamphoracontrollers.yaml b/config/crd/bases/octavia.openstack.org_octaviaamphoracontrollers.yaml index 403b8ecd..c13fbaa0 100644 --- a/config/crd/bases/octavia.openstack.org_octaviaamphoracontrollers.yaml +++ b/config/crd/bases/octavia.openstack.org_octaviaamphoracontrollers.yaml @@ -147,11 +147,10 @@ spec: description: PersistenceDatabaseAccount - name of MariaDBAccount which will be used to connect for the persistence database type: string - redisHostIPs: - description: List of Redis Host IP addresses - items: - type: string - type: array + redisInstance: + default: redis + description: Redis instance name. + type: string resources: description: Resources - Compute Resources required by this service (Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ @@ -236,6 +235,7 @@ spec: type: string required: - databaseInstance + - redisInstance - role - secret - serviceAccount diff --git a/config/crd/bases/octavia.openstack.org_octavias.yaml b/config/crd/bases/octavia.openstack.org_octavias.yaml index 9f1331cf..39d00bda 100644 --- a/config/crd/bases/octavia.openstack.org_octavias.yaml +++ b/config/crd/bases/octavia.openstack.org_octavias.yaml @@ -590,11 +590,10 @@ spec: description: PersistenceDatabaseAccount - name of MariaDBAccount which will be used to connect for the persistence database type: string - redisHostIPs: - description: List of Redis Host IP addresses - items: - type: string - type: array + redisInstance: + default: redis + description: Redis instance name. + type: string resources: description: Resources - Compute Resources required by this service (Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ @@ -680,6 +679,7 @@ spec: type: string required: - databaseInstance + - redisInstance - role - secret - serviceAccount @@ -787,11 +787,10 @@ spec: description: PersistenceDatabaseAccount - name of MariaDBAccount which will be used to connect for the persistence database type: string - redisHostIPs: - description: List of Redis Host IP addresses - items: - type: string - type: array + redisInstance: + default: redis + description: Redis instance name. + type: string resources: description: Resources - Compute Resources required by this service (Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ @@ -877,6 +876,7 @@ spec: type: string required: - databaseInstance + - redisInstance - role - secret - serviceAccount @@ -984,11 +984,10 @@ spec: description: PersistenceDatabaseAccount - name of MariaDBAccount which will be used to connect for the persistence database type: string - redisHostIPs: - description: List of Redis Host IP addresses - items: - type: string - type: array + redisInstance: + default: redis + description: Redis instance name. + type: string resources: description: Resources - Compute Resources required by this service (Limits/Requests). https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ @@ -1074,6 +1073,7 @@ spec: type: string required: - databaseInstance + - redisInstance - role - secret - serviceAccount @@ -1265,11 +1265,6 @@ spec: ContainerImage) format: int64 type: integer - redisHostIPs: - description: List of Redis Host IP addresses - items: - type: string - type: array transportURLSecret: description: TransportURLSecret - Secret containing RabbitMQ transportURL type: string diff --git a/controllers/amphoracontroller_controller.go b/controllers/amphoracontroller_controller.go index 2fe402fc..560cad91 100644 --- a/controllers/amphoracontroller_controller.go +++ b/controllers/amphoracontroller_controller.go @@ -24,6 +24,7 @@ import ( "time" "github.com/go-logr/logr" + redisv1 "github.com/openstack-k8s-operators/infra-operator/apis/redis/v1beta1" "github.com/openstack-k8s-operators/lib-common/modules/common" "github.com/openstack-k8s-operators/lib-common/modules/common/condition" "github.com/openstack-k8s-operators/lib-common/modules/common/daemonset" @@ -159,6 +160,7 @@ func (r *OctaviaAmphoraControllerReconciler) Reconcile(ctx context.Context, req condition.UnknownCondition(condition.DeploymentReadyCondition, condition.InitReason, condition.DeploymentReadyInitMessage), condition.UnknownCondition(condition.NetworkAttachmentsReadyCondition, condition.InitReason, condition.NetworkAttachmentsReadyInitMessage), condition.UnknownCondition(condition.TLSInputReadyCondition, condition.InitReason, condition.InputReadyInitMessage), + condition.UnknownCondition(condition.RedisReadyCondition, condition.InitReason, condition.RedisReadyInitMessage), ) instance.Status.Conditions.Init(&cl) @@ -219,6 +221,21 @@ func (r *OctaviaAmphoraControllerReconciler) reconcileDelete(ctx context.Context Log := r.GetLogger(ctx) Log.Info("Reconciling Service delete") + // Remove our finalizer from redis + redis, err := redisv1.GetRedisByName(ctx, helper, instance.Spec.RedisInstance, instance.Namespace) + if err != nil && !k8s_errors.IsNotFound(err) { + return ctrl.Result{}, err + } + + if !k8s_errors.IsNotFound(err) && redis != nil { + if controllerutil.RemoveFinalizer(redis, helper.GetFinalizer()) { + err := r.Update(ctx, redis) + if err != nil { + return ctrl.Result{}, err + } + } + } + controllerutil.RemoveFinalizer(instance, helper.GetFinalizer()) if err := r.Update(ctx, instance); err != nil && !k8s_errors.IsNotFound(err) { @@ -304,6 +321,56 @@ func (r *OctaviaAmphoraControllerReconciler) reconcileNormal(ctx context.Context common.AppSelector: instance.ObjectMeta.Name, } + // + // Check for required redis + // + redis, err := redisv1.GetRedisByName(ctx, helper, instance.Spec.RedisInstance, instance.Namespace) + if err != nil { + if k8s_errors.IsNotFound(err) { + instance.Status.Conditions.Set(condition.FalseCondition( + condition.RedisReadyCondition, + condition.RequestedReason, + condition.SeverityInfo, + condition.RedisReadyWaitingMessage)) + return ctrl.Result{RequeueAfter: 10 * time.Second}, fmt.Errorf("redis %s not found", instance.Spec.RedisInstance) + } + instance.Status.Conditions.Set(condition.FalseCondition( + condition.RedisReadyCondition, + condition.ErrorReason, + condition.SeverityWarning, + condition.RedisReadyErrorMessage, + err.Error())) + return ctrl.Result{}, err + } + + // Add finalizer to redis to prevent it from being deleted now that we're using it + if controllerutil.AddFinalizer(redis, helper.GetFinalizer()) { + err := r.Update(ctx, redis) + if err != nil { + instance.Status.Conditions.Set(condition.FalseCondition( + condition.RedisReadyCondition, + condition.ErrorReason, + condition.SeverityWarning, + condition.RedisReadyErrorMessage, + err.Error())) + return ctrl.Result{}, err + } + } + + if !redis.IsReady() { + instance.Status.Conditions.Set(condition.FalseCondition( + condition.RedisReadyCondition, + condition.RequestedReason, + condition.SeverityInfo, + condition.RedisReadyWaitingMessage)) + return ctrl.Result{RequeueAfter: 10 * time.Second}, fmt.Errorf("redis %s is not ready", redis.Name) + } + + // Mark the Redis Service as Ready if we get to this point with no errors + instance.Status.Conditions.MarkTrue( + condition.RedisReadyCondition, condition.MemcachedReadyMessage) + // run check redis - end + // Handle config map configMapVars := make(map[string]env.Setter) @@ -359,7 +426,7 @@ func (r *OctaviaAmphoraControllerReconciler) reconcileNormal(ctx context.Context LbSecurityGroupID: instance.Spec.LbSecurityGroupID, } - err = r.generateServiceConfigMaps(ctx, instance, helper, &configMapVars, templateVars, ospSecret) + err = r.generateServiceConfigMaps(ctx, instance, helper, &configMapVars, templateVars, ospSecret, redis) if err != nil { instance.Status.Conditions.Set(condition.FalseCondition( condition.ServiceConfigReadyCondition, @@ -516,6 +583,7 @@ func (r *OctaviaAmphoraControllerReconciler) generateServiceConfigMaps( envVars *map[string]env.Setter, templateVars OctaviaTemplateVars, ospSecret *corev1.Secret, + redis *redisv1.Redis, ) error { r.Log.Info(fmt.Sprintf("generating service config map for %s (%s)", instance.Name, instance.Kind)) cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.ObjectMeta.Name), map[string]string{}) @@ -678,7 +746,8 @@ 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[:], ",") + templateParameters["JobboardBackendHosts"] = redis.GetRedisServerListString() + templateParameters["RedisTLS"] = redis.GetRedisTLSSupport() // TODO(beagles): populate the template parameters cms := []util.Template{ diff --git a/controllers/octavia_controller.go b/controllers/octavia_controller.go index d2b44bf1..fc7d6091 100644 --- a/controllers/octavia_controller.go +++ b/controllers/octavia_controller.go @@ -476,15 +476,6 @@ func (r *OctaviaReconciler) reconcileNormal(ctx context.Context, instance *octav return rbacResult, nil } - redis, op, err := r.redisCreateOrUpdate(ctx, instance, helper) - if err != nil { - // TODO(gthiemonge) Set conditions? - return ctrl.Result{}, err - } - if op != controllerutil.OperationResultNone { - Log.Info(fmt.Sprintf("Redis %s successfully reconciled - operation: %s", redis.Name, string(op))) - } - transportURL, op, err := r.transportURLCreateOrUpdate(instance) if err != nil { instance.Status.Conditions.Set(condition.FalseCondition( @@ -1228,54 +1219,6 @@ func (r *OctaviaReconciler) transportURLCreateOrUpdate( return transportURL, op, err } -func getRedisServiceIPs( - ctx context.Context, - instance *octaviav1.Octavia, - helper *helper.Helper, - redis *redisv1.Redis, -) ([]string, error) { - getOptions := metav1.GetOptions{} - service, err := helper.GetKClient().CoreV1().Services(instance.Namespace).Get(ctx, "redis", getOptions) - if err != nil { - return []string{}, err - } - // TODO Ensure that the correct port is exposed - return service.Spec.ClusterIPs, nil -} - -func (r *OctaviaReconciler) redisCreateOrUpdate( - ctx context.Context, - instance *octaviav1.Octavia, - helper *helper.Helper, -) (*redisv1.Redis, controllerutil.OperationResult, error) { - redis := &redisv1.Redis{ - // Use the "global" redis instance. - ObjectMeta: metav1.ObjectMeta{ - Name: "redis", - Namespace: instance.Namespace, - }, - } - - op, err := controllerutil.CreateOrUpdate(context.TODO(), r.Client, redis, func() error { - // We probably don't want to own the redis instance. - //err := controllerutil.SetControllerReference(instance, redis, r.Scheme) - //return err - return nil - }) - if err != nil { - return nil, op, err - } - - hostIPs, err := getRedisServiceIPs(ctx, instance, helper, redis) - if err != nil { - return redis, op, err - } - - instance.Status.RedisHostIPs = hostIPs - - return redis, op, err -} - func (r *OctaviaReconciler) amphoraControllerDaemonSetCreateOrUpdate( instance *octaviav1.Octavia, networkInfo octavia.NetworkProvisioningSummary, @@ -1305,7 +1248,6 @@ func (r *OctaviaReconciler) amphoraControllerDaemonSetCreateOrUpdate( daemonset.Spec.LbMgmtNetworkID = networkInfo.TenantNetworkID daemonset.Spec.LbSecurityGroupID = networkInfo.SecurityGroupID daemonset.Spec.AmphoraCustomFlavors = instance.Spec.AmphoraCustomFlavors - daemonset.Spec.RedisHostIPs = instance.Status.RedisHostIPs daemonset.Spec.TLS = instance.Spec.OctaviaAPI.TLS.Ca if len(daemonset.Spec.NodeSelector) == 0 { daemonset.Spec.NodeSelector = instance.Spec.NodeSelector diff --git a/go.mod b/go.mod index 1e03301c..325b6958 100644 --- a/go.mod +++ b/go.mod @@ -6,19 +6,19 @@ require ( github.com/go-logr/logr v1.4.1 github.com/gophercloud/gophercloud v1.9.0 github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.4.0 - github.com/onsi/ginkgo/v2 v2.16.0 - github.com/onsi/gomega v1.31.1 + github.com/onsi/ginkgo/v2 v2.17.1 + github.com/onsi/gomega v1.32.0 github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20240221083751-49edc0df8a12 github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240220135139-2dc967b0f6de - github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240326081751-56015b1ae3f6 + github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240402131709-f2ff3c9b230b github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240224182407-3b6c02b195f6 github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240313124955-f152bee56715 github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-00010101000000-000000000000 github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240221131248-e97a8e5ca98f go.uber.org/zap v1.27.0 - k8s.io/api v0.28.7 - k8s.io/apimachinery v0.28.7 - k8s.io/client-go v0.28.7 + k8s.io/api v0.28.8 + k8s.io/apimachinery v0.28.8 + k8s.io/client-go v0.28.8 sigs.k8s.io/controller-runtime v0.16.5 ) @@ -41,7 +41,7 @@ require ( github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect @@ -65,19 +65,19 @@ require ( golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect golang.org/x/net v0.21.0 // indirect golang.org/x/oauth2 v0.16.0 // indirect - golang.org/x/sys v0.17.0 // indirect - golang.org/x/term v0.17.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.18.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.28.7 // indirect - k8s.io/component-base v0.28.7 // indirect + k8s.io/apiextensions-apiserver v0.28.8 // indirect + k8s.io/component-base v0.28.8 // indirect k8s.io/klog/v2 v2.120.1 // indirect k8s.io/kube-openapi v0.0.0-20240126223410-2919ad4fcfec // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect @@ -90,3 +90,7 @@ replace github.com/openstack-k8s-operators/octavia-operator/api => ./api // mschuppert: map to latest commit from release-4.13 tag // must consistent within modules and service operators replace github.com/openshift/api => github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 //allow-merging + +replace github.com/openstack-k8s-operators/infra-operator/apis => github.com/stuggi/infra-operator/apis v0.0.0-20240410131007-b667046845bd + +replace github.com/openstack-k8s-operators/lib-common/modules/common => github.com/stuggi/lib-common/modules/common v0.0.0-20240410091541-d22e3276c3a1 diff --git a/go.sum b/go.sum index 37856175..a110f6ef 100644 --- a/go.sum +++ b/go.sum @@ -33,8 +33,8 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -72,18 +72,14 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.16.0 h1:7q1w9frJDzninhXxjZd+Y/x54XNjG/UlRLIYPZafsPM= -github.com/onsi/ginkgo/v2 v2.16.0/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= -github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= -github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= +github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= +github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= +github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk= +github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg= github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 h1:rncLxJBpFGqBztyxCMwNRnMjhhIDOWHJowi6q8G6koI= github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7/go.mod h1:ctXNyWanKEjGj8sss1KjjHQ3ENKFm33FFnS5BKaIPh4= -github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20240221083751-49edc0df8a12 h1:n+A0L+6w3Yt9iOVWdu0aU8Ig0fICv4luruVjH5kU7KM= -github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20240221083751-49edc0df8a12/go.mod h1:2//rIZ8ucDbK+gLxvwmU6uPCm6o/C6GxXJHDo4ye7I8= github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240220135139-2dc967b0f6de h1:2OxiGrl3iT/KYBNKddfQUCF6FAaGrNqrHGisEHtU3ZQ= github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240220135139-2dc967b0f6de/go.mod h1:YyoDWNxCFstwhVRAcEh2X6bXBG0ML5iEhOYQhltgqi4= -github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240326081751-56015b1ae3f6 h1:4Z7LjnjEF82XiusXJTI/4TqgwnJas3cdvg/qEgkrW8Q= -github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240326081751-56015b1ae3f6/go.mod h1:DL+Ts0k+fzgZmx0XxWArIeAmdKuTkPa1I5DThdybfmE= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240224182407-3b6c02b195f6 h1:u03dfqrO8ml0gShw11Mm+vmqOsSXbY9pv+4sfo2HaTQ= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240224182407-3b6c02b195f6/go.mod h1:K1FWWDoDOvMkeyz26x2dNKFJMOad041AXhTL2S8JAlA= github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240313124955-f152bee56715 h1:p/27BiJbPCel9U12Q3ym4N7brVK5CMqx1plLO6j/fcU= @@ -109,6 +105,10 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stuggi/infra-operator/apis v0.0.0-20240410131007-b667046845bd h1:cZGwcbzzy3M/vzr60X5ATBQxTYHl7iG8f87F2wvbOVU= +github.com/stuggi/infra-operator/apis v0.0.0-20240410131007-b667046845bd/go.mod h1:ii0O3I9B+mkX6/D8qDQjg/q76sojufkYhM7bq7qo41E= +github.com/stuggi/lib-common/modules/common v0.0.0-20240410091541-d22e3276c3a1 h1:1OKJEAaKTAlP4HGiWOALqnD0L0Ad4LIru1kOCwobQck= +github.com/stuggi/lib-common/modules/common v0.0.0-20240410091541-d22e3276c3a1/go.mod h1:gqByVGUdKQB/NkhKV4eD+8NWYkHq961nC96rTCB3ywE= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= @@ -153,12 +153,12 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -185,8 +185,8 @@ google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAs google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -197,16 +197,16 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.28.7 h1:YKIhBxjXKaxuxWJnwohV0aGjRA5l4IU0Eywf/q19AVI= -k8s.io/api v0.28.7/go.mod h1:y4RbcjCCMff1930SG/TcP3AUKNfaJUgIeUp58e/2vyY= -k8s.io/apiextensions-apiserver v0.28.7 h1:NQlzP/vmvIO9Qt7wQTdMe9sGWGkozQZMPk9suehAvR8= -k8s.io/apiextensions-apiserver v0.28.7/go.mod h1:ST+ZOppyy+Z0mIxezSOK8qwIXctNwdFLNpGkQp8bw4M= -k8s.io/apimachinery v0.28.7 h1:2Z38/XRAOcpb+PonxmBEmjG7hBfmmr41xnr0XvpTnB4= -k8s.io/apimachinery v0.28.7/go.mod h1:QFNX/kCl/EMT2WTSz8k4WLCv2XnkOLMaL8GAVRMdpsA= -k8s.io/client-go v0.28.7 h1:3L6402+tjmOl8twX3fjUQ/wsYAkw6UlVNDVP+rF6YGA= -k8s.io/client-go v0.28.7/go.mod h1:xIoEaDewZ+EwWOo1/F1t0IOKMPe1rwBZhLu9Es6y0tE= -k8s.io/component-base v0.28.7 h1:Cq5aQ52N0CTaOMiary4rXzR4RoTP77Z3ll4qSg4qH7s= -k8s.io/component-base v0.28.7/go.mod h1:RrtNBKrSuckksSQ3fV9PhwBSHO/ZbwJXM2Z0OPx+UJk= +k8s.io/api v0.28.8 h1:G0/G7yX1puRAcon/+XPLsKXZ9A5L7Ds6oKbDIe027xw= +k8s.io/api v0.28.8/go.mod h1:rU8f1t9CNUAXlk/1j/wMJ7XnaxkR1g1AlZGQAOOL+sw= +k8s.io/apiextensions-apiserver v0.28.8 h1:JucS9tcaMMlfFrJ09cgh1Maeb8X2wlnxcfNpplyGHXs= +k8s.io/apiextensions-apiserver v0.28.8/go.mod h1:IKpLiKmvEYq/ti8sNtB1sM3A3vVV7fILIsvdmZswhoQ= +k8s.io/apimachinery v0.28.8 h1:hi/nrxHwk4QLV+W/SHve1bypTE59HCDorLY1stBIxKQ= +k8s.io/apimachinery v0.28.8/go.mod h1:cBnwIM3fXoRo28SqbV/Ihxf/iviw85KyXOrzxvZQ83U= +k8s.io/client-go v0.28.8 h1:TE59Tjd87WKvS2FPBTfIKLFX0nQJ4SSHsnDo5IHjgOw= +k8s.io/client-go v0.28.8/go.mod h1:uDVQ/rPzWpWIy40c6lZ4mUwaEvRWGnpoqSO4FM65P3o= +k8s.io/component-base v0.28.8 h1:N/c5L6Ty5rcrFyhsMYsqRFUOVGrqGQsLfjB0yj6npqM= +k8s.io/component-base v0.28.8/go.mod h1:9PjQ4nM1Hth6WGe/O+wgLF32eSwf4oPOoN5elmFznJM= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240126223410-2919ad4fcfec h1:iGTel2aR8vCZdxJDgmbeY0zrlXy9Qcvyw4R2sB4HLrA= diff --git a/templates/octaviaamphoracontroller/config/octavia.conf b/templates/octaviaamphoracontroller/config/octavia.conf index b7435946..64afe981 100644 --- a/templates/octaviaamphoracontroller/config/octavia.conf +++ b/templates/octaviaamphoracontroller/config/octavia.conf @@ -46,6 +46,10 @@ client_ca = /etc/octavia/certs/client_ca.cert.pem persistence_connection = {{ .PersistenceDatabaseConnection }} jobboard_enabled = True jobboard_backend_hosts = {{ .JobboardBackendHosts }} +#{{ if (index . "TransportURL") }} +jobboard_redis_backend_ssl_options = ssl:{{ .RedisTLS }},ssl_cert_reqs:'required' +#jobboard_redis_backend_ssl_options = ssl:False,ssl_ca_certs:None,ssl_cert_reqs:required,ssl_certfile:None,ssl_keyfile:None +#{{ end }} # TODO(gthiemonge) enable sentinel when it is exposed in the redis service. #jobboard_backend_port = 26379 #jobboard_backend_password = ""