Skip to content

Commit

Permalink
Merge pull request #203 from gthiemonge/labels
Browse files Browse the repository at this point in the history
Change the label of the octavia controllers
  • Loading branch information
openshift-merge-bot[bot] authored Nov 29, 2023
2 parents c7d4b4c + 6f13bbe commit 07f81dd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
versions:
- additionalPrinterColumns:
- description: NetworkAttachments
jsonPath: .status.spec.networkAttachments
jsonPath: .status.networkAttachments
name: NetworkAttachments
type: string
- description: Status
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/amphoracontroller_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ type OctaviaAmphoraControllerStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="NetworkAttachments",type="string",JSONPath=".status.spec.networkAttachments",description="NetworkAttachments"
//+kubebuilder:printcolumn:name="NetworkAttachments",type="string",JSONPath=".status.networkAttachments",description="NetworkAttachments"
//+kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[0].status",description="Status"
//+kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[0].message",description="Message"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
versions:
- additionalPrinterColumns:
- description: NetworkAttachments
jsonPath: .status.spec.networkAttachments
jsonPath: .status.networkAttachments
name: NetworkAttachments
type: string
- description: Status
Expand Down
5 changes: 2 additions & 3 deletions controllers/amphoracontroller_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import (
neutronv1 "github.com/openstack-k8s-operators/neutron-operator/api/v1beta1"
octaviav1 "github.com/openstack-k8s-operators/octavia-operator/api/v1beta1"
"github.com/openstack-k8s-operators/octavia-operator/pkg/amphoracontrollers"
"github.com/openstack-k8s-operators/octavia-operator/pkg/octavia"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
k8s_errors "k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -316,7 +315,7 @@ func (r *OctaviaAmphoraControllerReconciler) reconcileNormal(ctx context.Context
//

serviceLabels := map[string]string{
common.AppSelector: octavia.ServiceName,
common.AppSelector: instance.ObjectMeta.Name,
}

// Define a new Deployment object
Expand Down Expand Up @@ -399,7 +398,7 @@ func (r *OctaviaAmphoraControllerReconciler) generateServiceConfigMaps(
templateVars OctaviaTemplateVars,
) error {
r.Log.Info(fmt.Sprintf("generating service config map for %s (%s)", instance.Name, instance.Kind))
cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(octavia.ServiceName), map[string]string{})
cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.ObjectMeta.Name), map[string]string{})
customData := map[string]string{common.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig}
for key, data := range instance.Spec.DefaultConfigOverwrite {
customData[key] = data
Expand Down

0 comments on commit 07f81dd

Please sign in to comment.