From 00f8d74dc2a6af76af7ce4303471f2a7cadd8cd7 Mon Sep 17 00:00:00 2001 From: jgilaber Date: Wed, 15 Jan 2025 13:13:03 +0100 Subject: [PATCH] Rename the watcherapi deployment Remove the '-api' suffix from the deployment name, as it usually is redundant. --- pkg/watcherapi/deployment.go | 4 +--- tests/kuttl/test-suites/default/watcher/01-assert.yaml | 2 +- tests/kuttl/test-suites/default/watcher/04-assert.yaml | 2 +- tests/kuttl/test-suites/default/watcher/05-errors.yaml | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/watcherapi/deployment.go b/pkg/watcherapi/deployment.go index 79edb90..e2c5a67 100644 --- a/pkg/watcherapi/deployment.go +++ b/pkg/watcherapi/deployment.go @@ -1,8 +1,6 @@ package watcherapi import ( - "fmt" - "github.com/openstack-k8s-operators/lib-common/modules/common/env" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -69,7 +67,7 @@ func Deployment( deployment := &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%s-api", instance.Name), + Name: instance.Name, Namespace: instance.Namespace, Labels: labels, }, diff --git a/tests/kuttl/test-suites/default/watcher/01-assert.yaml b/tests/kuttl/test-suites/default/watcher/01-assert.yaml index 8837c8a..7e6d2ea 100644 --- a/tests/kuttl/test-suites/default/watcher/01-assert.yaml +++ b/tests/kuttl/test-suites/default/watcher/01-assert.yaml @@ -224,7 +224,7 @@ status: apiVersion: apps/v1 kind: Deployment metadata: - name: watcher-kuttl-api-api + name: watcher-kuttl-api labels: service: watcher-api spec: diff --git a/tests/kuttl/test-suites/default/watcher/04-assert.yaml b/tests/kuttl/test-suites/default/watcher/04-assert.yaml index fcbe128..0f45843 100644 --- a/tests/kuttl/test-suites/default/watcher/04-assert.yaml +++ b/tests/kuttl/test-suites/default/watcher/04-assert.yaml @@ -205,7 +205,7 @@ status: apiVersion: apps/v1 kind: Deployment metadata: - name: watcher-kuttl-api-api + name: watcher-kuttl-api labels: service: watcher-api spec: diff --git a/tests/kuttl/test-suites/default/watcher/05-errors.yaml b/tests/kuttl/test-suites/default/watcher/05-errors.yaml index c891e5c..26c20cf 100644 --- a/tests/kuttl/test-suites/default/watcher/05-errors.yaml +++ b/tests/kuttl/test-suites/default/watcher/05-errors.yaml @@ -60,7 +60,7 @@ metadata: apiVersion: apps/v1 kind: Deployment metadata: - name: watcher-kuttl-api-api + name: watcher-kuttl-api --- apiVersion: v1 kind: Pod