-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
2,760 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,6 @@ rules: | |
resources: | ||
- secrets | ||
verbs: | ||
- get | ||
- create | ||
- update | ||
- get |
18 changes: 18 additions & 0 deletions
18
pkg/adapter/combinedSecretEtcdSensitiveDoguConfigRepository.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package adapter | ||
|
||
import ( | ||
"github.com/cloudogu/k8s-blueprint-operator/pkg/adapter/config/etcd" | ||
"github.com/cloudogu/k8s-blueprint-operator/pkg/adapter/kubernetes/config" | ||
) | ||
|
||
type SecretEtcdSensitiveDoguConfigRepository struct { | ||
*etcd.EtcdSensitiveDoguConfigRepository | ||
*config.SecretSensitiveDoguConfigRepository | ||
} | ||
|
||
func NewCombinedSecretEtcdSensitiveDoguConfigRepository(etcdRepo *etcd.EtcdSensitiveDoguConfigRepository, secretRepo *config.SecretSensitiveDoguConfigRepository) *SecretEtcdSensitiveDoguConfigRepository { | ||
return &SecretEtcdSensitiveDoguConfigRepository{ | ||
EtcdSensitiveDoguConfigRepository: etcdRepo, | ||
SecretSensitiveDoguConfigRepository: secretRepo, | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
pkg/adapter/combinedSecretEtcdSensitiveDoguConfigRepository_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package adapter | ||
|
||
import ( | ||
"github.com/cloudogu/k8s-blueprint-operator/pkg/adapter/config/etcd" | ||
"github.com/cloudogu/k8s-blueprint-operator/pkg/adapter/kubernetes/config" | ||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
"testing" | ||
) | ||
|
||
func TestNewCombinedSecretEtcdSensitiveDoguConfigRepository(t *testing.T) { | ||
t.Run("success", func(t *testing.T) { | ||
// given | ||
secretRepo := &config.SecretSensitiveDoguConfigRepository{} | ||
etcdRepo := &etcd.EtcdSensitiveDoguConfigRepository{} | ||
|
||
// when | ||
combinedRepo := NewCombinedSecretEtcdSensitiveDoguConfigRepository(etcdRepo, secretRepo) | ||
|
||
// then | ||
require.NotNil(t, combinedRepo) | ||
assert.Equal(t, secretRepo, combinedRepo.SecretSensitiveDoguConfigRepository) | ||
assert.Equal(t, etcdRepo, combinedRepo.EtcdSensitiveDoguConfigRepository) | ||
}) | ||
} |
2 changes: 1 addition & 1 deletion
2
...dapter/config/etcdDoguConfigRepository.go → ...r/config/etcd/etcdDoguConfigRepository.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package config | ||
package etcd | ||
|
||
import ( | ||
"context" | ||
|
2 changes: 1 addition & 1 deletion
2
...r/config/etcdDoguConfigRepository_test.go → ...fig/etcd/etcdDoguConfigRepository_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package config | ||
package etcd | ||
|
||
import ( | ||
"context" | ||
|
2 changes: 1 addition & 1 deletion
2
...pter/config/etcdGlobalConfigRepository.go → ...config/etcd/etcdGlobalConfigRepository.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package config | ||
package etcd | ||
|
||
import ( | ||
"context" | ||
|
2 changes: 1 addition & 1 deletion
2
...config/etcdGlobalConfigRepository_test.go → ...g/etcd/etcdGlobalConfigRepository_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package config | ||
package etcd | ||
|
||
import ( | ||
"fmt" | ||
|
2 changes: 1 addition & 1 deletion
2
...nfig/etcdSensitiveDoguConfigRepository.go → ...etcd/etcdSensitiveDoguConfigRepository.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package config | ||
package etcd | ||
|
||
import ( | ||
"context" | ||
|
2 changes: 1 addition & 1 deletion
2
...etcdSensitiveDoguConfigRepository_test.go → ...etcdSensitiveDoguConfigRepository_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package config | ||
package etcd | ||
|
||
import ( | ||
"github.com/cloudogu/k8s-blueprint-operator/pkg/domain/common" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package etcd | ||
|
||
import ( | ||
"github.com/cloudogu/cesapp-lib/registry" | ||
) | ||
|
||
type etcdStore interface { | ||
registry.Registry | ||
} | ||
type globalConfigStore interface { | ||
registry.ConfigurationContext | ||
} | ||
|
||
type configurationContext interface { | ||
registry.ConfigurationContext | ||
} |
Oops, something went wrong.