Skip to content

Commit

Permalink
Upgrade to go 1.20.3 (#579)
Browse files Browse the repository at this point in the history
* Reuse `gardener.cloud` annotations in code

* Upgrade to go 1.20.3
  • Loading branch information
shreyas-s-rao authored Apr 18, 2023
1 parent 8ed2287 commit e30729f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .ci/pipeline_definitions
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ etcd-druid:
build: ~
steps:
check:
image: 'golang:1.20.1'
image: 'golang:1.20.3'
test:
image: 'golang:1.20.1'
image: 'golang:1.20.3'
test_integration:
image: 'golang:1.20.1'
image: 'golang:1.20.3'
build:
image: 'golang:1.20.1'
image: 'golang:1.20.3'
output_dir: 'binary'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.20.1 as builder
FROM golang:1.20.3 as builder
WORKDIR /go/src/github.com/gardener/etcd-druid
COPY . .

Expand Down
8 changes: 3 additions & 5 deletions pkg/component/etcd/poddisruptionbudget/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ package poddisruptionbudget
import "k8s.io/apimachinery/pkg/types"

const (
ownedByAnnotationKey = "gardener.cloud/owned-by"
ownerTypeAnnotationKey = "gardener.cloud/owner-type"
instanceKey = "instance"
nameKey = "name"
appKey = "app"
instanceKey = "instance"
nameKey = "name"
appKey = "app"
)

// Values contains the values necessary for creating PodDisruptionBudget.
Expand Down
5 changes: 3 additions & 2 deletions pkg/component/etcd/poddisruptionbudget/valueshelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"fmt"

druidv1alpha1 "github.com/gardener/etcd-druid/api/v1alpha1"
"github.com/gardener/etcd-druid/pkg/common"
)

// GenerateValues generates `poddisruptionbudget.Values` for the lease component with the given parameters.
Expand All @@ -33,8 +34,8 @@ func GenerateValues(etcd *druidv1alpha1.Etcd) Values {
}

annotations := map[string]string{
ownedByAnnotationKey: fmt.Sprintf("%s/%s", etcd.Namespace, etcd.Name),
ownerTypeAnnotationKey: "etcd",
common.GardenerOwnedBy: fmt.Sprintf("%s/%s", etcd.Namespace, etcd.Name),
common.GardenerOwnerType: "etcd",
}

return Values{
Expand Down
5 changes: 3 additions & 2 deletions test/utils/etcdcopybackupstask.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"time"

druidv1alpha1 "github.com/gardener/etcd-druid/api/v1alpha1"
"github.com/gardener/etcd-druid/pkg/common"
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -115,7 +116,7 @@ func CreateEtcdCopyBackupsJob(taskName, namespace string) *batchv1.Job {

func createJobAnnotations(taskName, namespace string) map[string]string {
annotations := make(map[string]string, 2)
annotations["gardener.cloud/owned-by"] = fmt.Sprintf("%s/%s", namespace, taskName)
annotations["gardener.cloud/owner-type"] = "etcdcopybackupstask"
annotations[common.GardenerOwnedBy] = fmt.Sprintf("%s/%s", namespace, taskName)
annotations[common.GardenerOwnerType] = "etcdcopybackupstask"
return annotations
}

0 comments on commit e30729f

Please sign in to comment.