Skip to content

Commit

Permalink
Remove dependency on metal-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
robertvolkmann committed Mar 13, 2024
1 parent cb567c2 commit cd574a7
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 17 deletions.
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/lib/pq v1.10.9
github.com/meilisearch/meilisearch-go v0.26.1
github.com/metal-stack/metal-lib v0.14.4
github.com/metal-stack/v v1.0.3
github.com/mholt/archiver/v3 v3.5.1
github.com/olekukonko/tablewriter v0.0.5
Expand Down Expand Up @@ -126,6 +125,7 @@ require (
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.1 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tklauser/go-sysconf v0.3.13 // indirect
github.com/tklauser/numcpus v0.7.0 // indirect
Expand All @@ -142,6 +142,7 @@ require (
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/trace v1.22.0 // indirect
go.uber.org/goleak v1.3.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
Expand All @@ -154,6 +155,7 @@ require (
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.17.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,6 @@ github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZ
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/meilisearch/meilisearch-go v0.26.1 h1:3bmo2uLijX7kvBmiZ9LupVfC95TFcRJDgrRTzbOoE4A=
github.com/meilisearch/meilisearch-go v0.26.1/go.mod h1:SxuSqDcPBIykjWz1PX+KzsYzArNLSCadQodWs8extS0=
github.com/metal-stack/metal-lib v0.14.4 h1:vm2868vcua6khoyWL7d0to8Hq5RayrjMse0FZTyWEec=
github.com/metal-stack/metal-lib v0.14.4/go.mod h1:Z3PAh8dkyWC4B19fXsu6EYwXXee0Lk9JZbjoHPLbDbc=
github.com/metal-stack/v v1.0.3 h1:Sh2oBlnxrCUD+mVpzfC8HiqL045YWkxs0gpTvkjppqs=
github.com/metal-stack/v v1.0.3/go.mod h1:YTahEu7/ishwpYKnp/VaW/7nf8+PInogkfGwLcGPdXg=
github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo=
Expand Down
4 changes: 4 additions & 0 deletions pkg/generate/examples/examples/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ package examples
const (
backupRestoreSidecarContainerImage = "ghcr.io/metal-stack/backup-restore-sidecar:latest"
)

func pointer[T any](t T) *T {
return &t
}
3 changes: 1 addition & 2 deletions pkg/generate/examples/examples/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package examples

import (
"github.com/metal-stack/backup-restore-sidecar/pkg/constants"
"github.com/metal-stack/metal-lib/pkg/pointer"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -31,7 +30,7 @@ func EtcdSts(namespace string) *appsv1.StatefulSet {
},
Spec: appsv1.StatefulSetSpec{
ServiceName: "etcd",
Replicas: pointer.Pointer(int32(1)),
Replicas: pointer(int32(1)),
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{
"app": "etcd",
Expand Down
3 changes: 1 addition & 2 deletions pkg/generate/examples/examples/keydb.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package examples

import (
"github.com/metal-stack/backup-restore-sidecar/pkg/constants"
"github.com/metal-stack/metal-lib/pkg/pointer"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -30,7 +29,7 @@ func KeyDBSts(namespace string) *appsv1.StatefulSet {
},
Spec: appsv1.StatefulSetSpec{
ServiceName: "keydb",
Replicas: pointer.Pointer(int32(1)),
Replicas: pointer(int32(1)),
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{
"app": "keydb",
Expand Down
3 changes: 1 addition & 2 deletions pkg/generate/examples/examples/localfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package examples

import (
"github.com/metal-stack/backup-restore-sidecar/pkg/constants"
"github.com/metal-stack/metal-lib/pkg/pointer"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -30,7 +29,7 @@ func LocalfsSts(namespace string) *appsv1.StatefulSet {
},
Spec: appsv1.StatefulSetSpec{
ServiceName: "localfs",
Replicas: pointer.Pointer(int32(1)),
Replicas: pointer(int32(1)),
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{
"app": "localfs",
Expand Down
3 changes: 1 addition & 2 deletions pkg/generate/examples/examples/meilisearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package examples

import (
"github.com/metal-stack/backup-restore-sidecar/pkg/constants"
"github.com/metal-stack/metal-lib/pkg/pointer"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -33,7 +32,7 @@ func MeilisearchSts(namespace string) *appsv1.StatefulSet {
},
Spec: appsv1.StatefulSetSpec{
ServiceName: "meilisearch",
Replicas: pointer.Pointer(int32(1)),
Replicas: pointer(int32(1)),
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{
"app": "meilisearch",
Expand Down
3 changes: 1 addition & 2 deletions pkg/generate/examples/examples/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package examples

import (
"github.com/metal-stack/backup-restore-sidecar/pkg/constants"
"github.com/metal-stack/metal-lib/pkg/pointer"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -36,7 +35,7 @@ func PostgresSts(namespace string) *appsv1.StatefulSet {
},
Spec: appsv1.StatefulSetSpec{
ServiceName: "postgres",
Replicas: pointer.Pointer(int32(1)),
Replicas: pointer(int32(1)),
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{
"app": "postgres",
Expand Down
3 changes: 1 addition & 2 deletions pkg/generate/examples/examples/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package examples

import (
"github.com/metal-stack/backup-restore-sidecar/pkg/constants"
"github.com/metal-stack/metal-lib/pkg/pointer"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -30,7 +29,7 @@ func RedisSts(namespace string) *appsv1.StatefulSet {
},
Spec: appsv1.StatefulSetSpec{
ServiceName: "redis",
Replicas: pointer.Pointer(int32(1)),
Replicas: pointer(int32(1)),
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{
"app": "redis",
Expand Down
3 changes: 1 addition & 2 deletions pkg/generate/examples/examples/rethinkdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package examples

import (
"github.com/metal-stack/backup-restore-sidecar/pkg/constants"
"github.com/metal-stack/metal-lib/pkg/pointer"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -34,7 +33,7 @@ func RethinkDbSts(namespace string) *appsv1.StatefulSet {
},
Spec: appsv1.StatefulSetSpec{
ServiceName: "rethinkdb",
Replicas: pointer.Pointer(int32(1)),
Replicas: pointer(int32(1)),
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{
"app": "rethinkdb",
Expand Down

0 comments on commit cd574a7

Please sign in to comment.