Skip to content

Commit

Permalink
Merge branch 'release/v1.0.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
meiserloh authored and cesmarvin committed Oct 18, 2024
2 parents 7b0e382 + 4c01e75 commit d3ee773
Show file tree
Hide file tree
Showing 23 changed files with 99 additions and 289 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v1.0.0] - 2024-10-18
### Changed
- [#63] Use dogu v2 api

## [v0.15.2] - 2024-09-19
### Changed
- Relicense to AGPL-3.0-only
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.22 AS builder
FROM golang:1.23.2 AS builder

WORKDIR /workspace

Expand Down Expand Up @@ -31,7 +31,7 @@ RUN make compile-generic
FROM gcr.io/distroless/static:nonroot
LABEL maintainer="[email protected]" \
NAME="k8s-service-discovery" \
VERSION="0.15.2"
VERSION="1.0.0"

WORKDIR /

Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!groovy

@Library(['github.com/cloudogu/ces-build-lib@1.68.0'])
@Library(['github.com/cloudogu/ces-build-lib@2.5.0'])
import com.cloudogu.ces.cesbuildlib.*

// Creating necessary git objects
Expand All @@ -12,7 +12,7 @@ github = new GitHub(this, git)
changelog = new Changelog(this)
Docker docker = new Docker(this)
gpg = new Gpg(this, docker)
goVersion = "1.22"
goVersion = "1.23.2"
makefile = new Makefile(this)

// Configuration of repository
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Set these to the desired values
ARTIFACT_ID=k8s-service-discovery
VERSION=0.15.2
VERSION=1.0.0

IMAGE=cloudogu/${ARTIFACT_ID}:${VERSION}
GOTAG?=1.22
MAKEFILES_VERSION=9.1.0
GOTAG?=1.23.2
MAKEFILES_VERSION=9.3.1

ADDITIONAL_CLEAN=dist-clean

Expand Down
2 changes: 1 addition & 1 deletion build/make/bats.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BATS_SUPPORT=$(BATS_LIBRARY_DIR)/bats-support
BATS_FILE=$(BATS_LIBRARY_DIR)/bats-file
BATS_BASE_IMAGE?=bats/bats
BATS_CUSTOM_IMAGE?=cloudogu/bats
BATS_TAG?=1.2.1
BATS_TAG?=1.11.0
BATS_DIR=build/make/bats
BATS_WORKDIR="${WORKDIR}"/"${BATS_DIR}"

Expand Down
4 changes: 3 additions & 1 deletion build/make/bats/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
ARG BATS_BASE_IMAGE
ARG BATS_TAG

FROM ${BATS_BASE_IMAGE}:${BATS_TAG}
FROM ${BATS_BASE_IMAGE:-bats/bats}:${BATS_TAG:-1.11.0}

# Make bash more findable by scripts and tests
RUN apk add make git bash
# suppress git "detected dubious ownership" error/warning for repos which are checked out later
RUN git config --global --add safe.directory /workspace
2 changes: 1 addition & 1 deletion build/make/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ADDITIONAL_LDFLAGS?=-extldflags -static
LDFLAGS?=-ldflags "$(ADDITIONAL_LDFLAGS) -X main.Version=$(VERSION) -X main.CommitID=$(COMMIT_ID)"
GOIMAGE?=golang
GOTAG?=1.22
GOTAG?=1.23
GOOS?=linux
GOARCH?=amd64
PRE_COMPILE?=
Expand Down
2 changes: 1 addition & 1 deletion build/make/k8s.mk
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ ${K8S_RESOURCE_TEMP_FOLDER}:
##@ K8s - Docker

.PHONY: docker-build
docker-build: check-docker-credentials check-k8s-image-env-var ## Builds the docker image of the K8s app.
docker-build: check-docker-credentials check-k8s-image-env-var ${BINARY_YQ} ## Builds the docker image of the K8s app.
@echo "Building docker image $(IMAGE)..."
@DOCKER_BUILDKIT=1 docker build . -t $(IMAGE)

Expand Down
4 changes: 2 additions & 2 deletions build/make/static-analysis.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

STATIC_ANALYSIS_DIR=$(TARGET_DIR)/static-analysis
GOIMAGE?=golang
GOTAG?=1.22
GOTAG?=1.23
CUSTOM_GO_MOUNT?=-v /tmp:/tmp

REVIEW_DOG=$(TMP_DIR)/bin/reviewdog
LINT=$(TMP_DIR)/bin/golangci-lint
LINT_VERSION?=v1.58.2
LINT_VERSION?=v1.61.0
# ignore tests and mocks
LINTFLAGS=--tests=false --exclude-files="^.*_mock.go$$" --exclude-files="^.*/mock.*.go$$" --timeout 10m --issues-exit-code 0
ADDITIONAL_LINTER=-E bodyclose -E containedctx -E contextcheck -E decorder -E dupl -E errname -E forcetypeassert -E funlen -E unparam
Expand Down
13 changes: 13 additions & 0 deletions build/make/vulnerability-scan.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
##@ Vulnerability scan

GOVULNCHECK_BIN=${UTILITY_BIN_PATH}/govulncheck
GOVULNCHECK_VERSION?=latest

${GOVULNCHECK_BIN}: ${UTILITY_BIN_PATH}
$(call go-get-tool,$(GOVULNCHECK_BIN),golang.org/x/vuln/cmd/govulncheck@$(GOVULNCHECK_VERSION))

.PHONY: govulncheck
govulncheck: ${GOVULNCHECK_BIN} ## This target is used to scan the go repository against known vulnerabilities
@echo "Start vulnerability against repository"
${GOVULNCHECK_BIN} -show verbose ./...
@echo "Finished scan"
4 changes: 2 additions & 2 deletions controllers/deploymentController.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

k8sv1 "github.com/cloudogu/k8s-dogu-operator/api/v1"
doguv2 "github.com/cloudogu/k8s-dogu-operator/v2/api/v2"
"k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
ctrl "sigs.k8s.io/controller-runtime"
Expand Down Expand Up @@ -80,7 +80,7 @@ func (r *deploymentReconciler) getDeployment(ctx context.Context, req ctrl.Reque

func hasDoguLabel(deployment client.Object) bool {
for label := range deployment.GetLabels() {
if label == legacyDoguLabel || label == k8sv1.DoguLabelName {
if label == legacyDoguLabel || label == doguv2.DoguLabelName {
return true
}
}
Expand Down
12 changes: 6 additions & 6 deletions controllers/ingressUpdater.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"encoding/json"
"fmt"
doguv1 "github.com/cloudogu/k8s-dogu-operator/api/v1"
"github.com/cloudogu/k8s-dogu-operator/controllers/annotation"
doguv2 "github.com/cloudogu/k8s-dogu-operator/v2/api/v2"
"github.com/cloudogu/k8s-dogu-operator/v2/controllers/annotation"
"github.com/cloudogu/k8s-service-discovery/controllers/dogustart"
"github.com/cloudogu/k8s-service-discovery/controllers/util"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -160,7 +160,7 @@ func (i *ingressUpdater) getCesServices(service *corev1.Service) ([]CesService,

func (i *ingressUpdater) upsertIngressForCesService(ctx context.Context, cesService CesService, service *corev1.Service, isMaintenanceMode bool) error {
namespacedName := types.NamespacedName{Name: service.Name, Namespace: service.Namespace}
dogu := &doguv1.Dogu{}
dogu := &doguv2.Dogu{}
err := i.client.Get(ctx, namespacedName, dogu)
if err != nil {
return fmt.Errorf("failed to get dogu for service [%s]: %w", service.Name, err)
Expand Down Expand Up @@ -190,8 +190,8 @@ func (i *ingressUpdater) upsertIngressForCesService(ctx context.Context, cesServ
return err
}

func getAdditionalIngressAnnotations(doguService *corev1.Service) (doguv1.IngressAnnotations, error) {
annotations := doguv1.IngressAnnotations(nil)
func getAdditionalIngressAnnotations(doguService *corev1.Service) (doguv2.IngressAnnotations, error) {
annotations := doguv2.IngressAnnotations(nil)
annotationsJson, exists := doguService.Annotations[annotation.AdditionalIngressAnnotationsAnnotation]
if exists {
err := json.Unmarshal([]byte(annotationsJson), &annotations)
Expand All @@ -203,7 +203,7 @@ func getAdditionalIngressAnnotations(doguService *corev1.Service) (doguv1.Ingres
return annotations, nil
}

func (i *ingressUpdater) upsertMaintenanceModeIngressObject(ctx context.Context, cesService CesService, service *corev1.Service, dogu *doguv1.Dogu) error {
func (i *ingressUpdater) upsertMaintenanceModeIngressObject(ctx context.Context, cesService CesService, service *corev1.Service, dogu *doguv2.Dogu) error {
ctrl.LoggerFrom(ctx).Info(fmt.Sprintf("system is in maintenance mode -> create maintenance ingress object for service [%s]", service.GetName()))
annotations := map[string]string{ingressRewriteTargetAnnotation: staticContentBackendRewrite}

Expand Down
38 changes: 19 additions & 19 deletions controllers/ingressUpdater_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package controllers
import (
"context"
"encoding/json"
v1 "github.com/cloudogu/k8s-dogu-operator/api/v1"
"github.com/cloudogu/k8s-dogu-operator/controllers/annotation"
doguv2 "github.com/cloudogu/k8s-dogu-operator/v2/api/v2"
"github.com/cloudogu/k8s-dogu-operator/v2/controllers/annotation"
registryconfig "github.com/cloudogu/k8s-registry-lib/config"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
Expand Down Expand Up @@ -218,7 +218,7 @@ func Test_ingressUpdater_UpdateIngressOfService(t *testing.T) {
{Name: "testPort", Port: 55},
}},
}
dogu := &v1.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
dogu := &doguv2.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
clientMock := testclient.NewClientBuilder().WithScheme(getScheme()).WithObjects(dogu).Build()
creator, creationError := NewIngressUpdater(clientMock, getGlobalConfigRepoMockWithMaintenance(t, false), myNamespace, myIngressClass, newMockEventRecorder(t))
require.NoError(t, creationError)
Expand Down Expand Up @@ -259,10 +259,10 @@ func Test_ingressUpdater_UpdateIngressOfService(t *testing.T) {
}},
}

dogu := &v1.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
dogu := &doguv2.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
clientMock := testclient.NewClientBuilder().WithScheme(getScheme()).WithObjects(dogu).Build()
recorderMock := newMockEventRecorder(t)
recorderMock.EXPECT().Eventf(mock.IsType(&v1.Dogu{}), "Normal", "IngressCreation", "Created regular ingress for service [%s].", "test")
recorderMock.EXPECT().Eventf(mock.IsType(&doguv2.Dogu{}), "Normal", "IngressCreation", "Created regular ingress for service [%s].", "test")
creator, creationError := NewIngressUpdater(clientMock, getGlobalConfigRepoMockWithMaintenance(t, false), myNamespace, myIngressClass, recorderMock)
require.NoError(t, creationError)

Expand Down Expand Up @@ -300,10 +300,10 @@ func Test_ingressUpdater_upsertIngressForCesService(t *testing.T) {
Namespace: myNamespace,
Labels: map[string]string{"dogu.name": "test"}},
}
dogu := &v1.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
dogu := &doguv2.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
clientMock := testclient.NewClientBuilder().WithScheme(getScheme()).WithObjects(dogu).Build()
recorderMock := newMockEventRecorder(t)
recorderMock.EXPECT().Eventf(mock.IsType(&v1.Dogu{}), "Normal", "IngressCreation", "Created regular ingress for service [%s].", "test")
recorderMock.EXPECT().Eventf(mock.IsType(&doguv2.Dogu{}), "Normal", "IngressCreation", "Created regular ingress for service [%s].", "test")

creator, creationError := NewIngressUpdater(clientMock, nil, myNamespace, myIngressClass, recorderMock)
require.NoError(t, creationError)
Expand Down Expand Up @@ -355,10 +355,10 @@ func Test_ingressUpdater_upsertIngressForCesService(t *testing.T) {
Namespace: myNamespace,
Labels: map[string]string{"dogu.name": "test"}},
}
dogu := &v1.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
dogu := &doguv2.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
clientMock := testclient.NewClientBuilder().WithScheme(getScheme()).WithObjects(dogu).Build()
recorderMock := newMockEventRecorder(t)
recorderMock.EXPECT().Eventf(mock.IsType(&v1.Dogu{}), "Normal", "IngressCreation", "Created regular ingress for service [%s].", "test")
recorderMock.EXPECT().Eventf(mock.IsType(&doguv2.Dogu{}), "Normal", "IngressCreation", "Created regular ingress for service [%s].", "test")

creator, creationError := NewIngressUpdater(clientMock, nil, myNamespace, myIngressClass, recorderMock)
require.NoError(t, creationError)
Expand Down Expand Up @@ -413,10 +413,10 @@ func Test_ingressUpdater_upsertIngressForCesService(t *testing.T) {
},
},
}
dogu := &v1.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
dogu := &doguv2.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
clientMock := testclient.NewClientBuilder().WithScheme(getScheme()).WithObjects(dogu).Build()
recorderMock := newMockEventRecorder(t)
recorderMock.EXPECT().Eventf(mock.IsType(&v1.Dogu{}), "Normal", "IngressCreation", "Created regular ingress for service [%s].", "test")
recorderMock.EXPECT().Eventf(mock.IsType(&doguv2.Dogu{}), "Normal", "IngressCreation", "Created regular ingress for service [%s].", "test")

creator, creationError := NewIngressUpdater(clientMock, nil, myNamespace, myIngressClass, recorderMock)
require.NoError(t, creationError)
Expand Down Expand Up @@ -473,7 +473,7 @@ func Test_ingressUpdater_upsertIngressForCesService(t *testing.T) {
},
},
}
dogu := &v1.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
dogu := &doguv2.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
clientMock := testclient.NewClientBuilder().WithScheme(getScheme()).WithObjects(dogu).Build()

creator, creationError := NewIngressUpdater(clientMock, nil, myNamespace, myIngressClass, nil)
Expand Down Expand Up @@ -506,10 +506,10 @@ func Test_ingressUpdater_upsertIngressForCesService(t *testing.T) {
Namespace: myNamespace,
Labels: map[string]string{"dogu.name": doguName}},
}
dogu := &v1.Dogu{ObjectMeta: metav1.ObjectMeta{Name: doguName, Namespace: myNamespace}}
dogu := &doguv2.Dogu{ObjectMeta: metav1.ObjectMeta{Name: doguName, Namespace: myNamespace}}
clientMock := testclient.NewClientBuilder().WithScheme(getScheme()).WithObjects(dogu).Build()
recorderMock := newMockEventRecorder(t)
recorderMock.EXPECT().Eventf(mock.IsType(&v1.Dogu{}), "Normal", "IngressCreation", "Created regular ingress for service [%s].", doguName)
recorderMock.EXPECT().Eventf(mock.IsType(&doguv2.Dogu{}), "Normal", "IngressCreation", "Created regular ingress for service [%s].", doguName)

creator, creationError := NewIngressUpdater(clientMock, nil, myNamespace, myIngressClass, recorderMock)
require.NoError(t, creationError)
Expand Down Expand Up @@ -557,10 +557,10 @@ func Test_ingressUpdater_upsertIngressForCesService(t *testing.T) {
service := corev1.Service{
ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace},
}
dogu := &v1.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
dogu := &doguv2.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
clientMock := testclient.NewClientBuilder().WithScheme(getScheme()).WithObjects(dogu).Build()
recorderMock := newMockEventRecorder(t)
recorderMock.EXPECT().Eventf(mock.IsType(&v1.Dogu{}), "Normal", "IngressCreation", "Ingress for service [%s] has been updated to maintenance mode.", "test")
recorderMock.EXPECT().Eventf(mock.IsType(&doguv2.Dogu{}), "Normal", "IngressCreation", "Ingress for service [%s] has been updated to maintenance mode.", "test")
creator, creationError := NewIngressUpdater(clientMock, nil, myNamespace, myIngressClass, recorderMock)
require.NoError(t, creationError)

Expand Down Expand Up @@ -607,7 +607,7 @@ func Test_ingressUpdater_upsertIngressForCesService(t *testing.T) {
Namespace: myNamespace,
Labels: map[string]string{"dogu.name": "test"}},
}
dogu := &v1.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
dogu := &doguv2.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
clientMock := testclient.NewClientBuilder().WithScheme(getScheme()).WithObjects(dogu).Build()
creator, creationError := NewIngressUpdater(clientMock, nil, myNamespace, myIngressClass, newMockEventRecorder(t))
require.NoError(t, creationError)
Expand Down Expand Up @@ -683,10 +683,10 @@ func Test_ingressUpdater_upsertIngressForCesService(t *testing.T) {
},
}}}}}}}}},
}
dogu := &v1.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
dogu := &doguv2.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: myNamespace}}
clientMock := testclient.NewClientBuilder().WithScheme(getScheme()).WithObjects(dogu, existingIngress).Build()
recorderMock := newMockEventRecorder(t)
recorderMock.EXPECT().Eventf(mock.IsType(&v1.Dogu{}), "Normal", "IngressCreation", "Created regular ingress for service [%s].", "test")
recorderMock.EXPECT().Eventf(mock.IsType(&doguv2.Dogu{}), "Normal", "IngressCreation", "Created regular ingress for service [%s].", "test")

creator, creationError := NewIngressUpdater(clientMock, nil, myNamespace, myIngressClass, recorderMock)
require.NoError(t, creationError)
Expand Down
12 changes: 6 additions & 6 deletions controllers/maintenanceModeUpdater.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/cloudogu/k8s-registry-lib/repository"
"strings"

k8sv1 "github.com/cloudogu/k8s-dogu-operator/api/v1"
doguv2 "github.com/cloudogu/k8s-dogu-operator/v2/api/v2"
"github.com/hashicorp/go-multierror"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -144,7 +144,7 @@ func (mmu *maintenanceModeUpdater) handleMaintenanceModeUpdate(ctx context.Conte

func (mmu *maintenanceModeUpdater) restartStaticNginxPod(ctx context.Context) error {
podList := &v1.PodList{}
staticNginxRequirement, _ := labels.NewRequirement(k8sv1.DoguLabelName, selection.Equals, []string{"nginx-static"})
staticNginxRequirement, _ := labels.NewRequirement(doguv2.DoguLabelName, selection.Equals, []string{"nginx-static"})
err := mmu.client.List(ctx, podList, &client.ListOptions{Namespace: mmu.namespace, LabelSelector: labels.NewSelector().Add(*staticNginxRequirement)})
if err != nil {
return fmt.Errorf("failed to list [%s] pods: %w", "nginx-static", err)
Expand Down Expand Up @@ -247,7 +247,7 @@ func rewriteNonSimpleServiceRoute(ctx context.Context, cli k8sClient, recorder e
return nil
}

if service.Spec.Selector[k8sv1.DoguLabelName] == "" {
if service.Spec.Selector[doguv2.DoguLabelName] == "" {
return nil
}

Expand All @@ -260,10 +260,10 @@ func rewriteNonSimpleServiceRoute(ctx context.Context, cli k8sClient, recorder e
var serviceEventMsg string
if rewriteToMaintenance {
serviceEventMsg = "Maintenance mode was activated, rewriting exposed service %s"
service.Spec.Selector = map[string]string{k8sv1.DoguLabelName: exposedServiceMaintenanceSelectorKey}
service.Spec.Selector = map[string]string{doguv2.DoguLabelName: exposedServiceMaintenanceSelectorKey}
} else {
serviceEventMsg = "Maintenance mode was deactivated, restoring exposed service %s"
service.Spec.Selector = map[string]string{k8sv1.DoguLabelName: service.Labels[k8sv1.DoguLabelName]}
service.Spec.Selector = map[string]string{doguv2.DoguLabelName: service.Labels[doguv2.DoguLabelName]}
}
recorder.Eventf(service, v1.EventTypeNormal, maintenanceChangeEventReason, serviceEventMsg, service.Name)

Expand All @@ -276,5 +276,5 @@ func rewriteNonSimpleServiceRoute(ctx context.Context, cli k8sClient, recorder e
}

func isServiceNginxRelated(service *v1.Service) bool {
return strings.HasPrefix(service.Spec.Selector[k8sv1.DoguLabelName], "nginx-")
return strings.HasPrefix(service.Spec.Selector[doguv2.DoguLabelName], "nginx-")
}
6 changes: 3 additions & 3 deletions controllers/serviceController_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"context"
_ "embed"
"fmt"
doguv1 "github.com/cloudogu/k8s-dogu-operator/api/v1"
doguv2 "github.com/cloudogu/k8s-dogu-operator/v2/api/v2"
"github.com/cloudogu/k8s-registry-lib/repository"
"github.com/cloudogu/k8s-service-discovery/controllers/dogustart"
"k8s.io/api/apps/v1"
Expand Down Expand Up @@ -96,10 +96,10 @@ var _ = Describe("Creating ingress objects with the ingress generator", func() {

It("Should do nothing if service without annotations", func() {
By("Create dogu")
dogu := &doguv1.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "nexus", Namespace: myNamespace}}
dogu := &doguv2.Dogu{ObjectMeta: metav1.ObjectMeta{Name: "nexus", Namespace: myNamespace}}
Expect(k8sApiClient.Create(context.Background(), dogu)).Should(Succeed())
Eventually(func() bool {
err := k8sApiClient.Get(ctx, types.NamespacedName{Name: "nexus", Namespace: myNamespace}, &doguv1.Dogu{})
err := k8sApiClient.Get(ctx, types.NamespacedName{Name: "nexus", Namespace: myNamespace}, &doguv2.Dogu{})
return err == nil
}, timeoutInterval, pollingInterval).Should(BeTrue())

Expand Down
Loading

0 comments on commit d3ee773

Please sign in to comment.