Skip to content

Commit 758c9a3

Browse files
committed
fix validation
1 parent 0036f5f commit 758c9a3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

cmd/manageDeploymentRepo.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import (
88
"k8s.io/apimachinery/pkg/runtime"
99
controllerruntime "sigs.k8s.io/controller-runtime"
1010

11+
"github.com/openmcp-project/bootstrapper/internal/config"
12+
1113
"github.com/openmcp-project/bootstrapper/internal/util"
1214

1315
deploymentrepo "github.com/openmcp-project/bootstrapper/internal/deployment-repo"
@@ -51,7 +53,7 @@ openmcp-bootstrapper manageDeploymentRepo <configFile>`,
5153
return fmt.Errorf("failed to get platform cluster: %w", err)
5254
}
5355

54-
config := &deploymentrepo.DeploymentRepoConfig{}
56+
config := &config.BootstrapperConfig{}
5557
err = config.ReadFromFile(configFilePath)
5658
if err != nil {
5759
return fmt.Errorf("failed to read config file: %w", err)

internal/deployment-repo/deploymentRepoManager.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import (
1212
"sigs.k8s.io/kustomize/api/krusty"
1313
"sigs.k8s.io/kustomize/kyaml/filesys"
1414

15+
"github.com/openmcp-project/bootstrapper/internal/config"
16+
1517
gitconfig "github.com/openmcp-project/bootstrapper/internal/git-config"
1618
"github.com/openmcp-project/bootstrapper/internal/log"
1719
ocmcli "github.com/openmcp-project/bootstrapper/internal/ocm-cli"
@@ -41,7 +43,7 @@ type DeploymentRepoManager struct {
4143
// +optional
4244
OcmConfigPath string
4345

44-
Config *DeploymentRepoConfig
46+
Config *config.BootstrapperConfig
4547

4648
// TargetCluster is the Kubernetes cluster to which the deployment will be applied
4749
TargetCluster *clusters.Cluster
@@ -71,7 +73,7 @@ type DeploymentRepoManager struct {
7173
}
7274

7375
// NewDeploymentRepoManager creates a new DeploymentRepoManager with the specified parameters.
74-
func NewDeploymentRepoManager(config *DeploymentRepoConfig, targetCluster *clusters.Cluster, gitConfigPath, ocmConfigPath string) *DeploymentRepoManager {
76+
func NewDeploymentRepoManager(config *config.BootstrapperConfig, targetCluster *clusters.Cluster, gitConfigPath, ocmConfigPath string) *DeploymentRepoManager {
7577
return &DeploymentRepoManager{
7678
Config: config,
7779
TargetCluster: targetCluster,
@@ -384,7 +386,7 @@ func (m *DeploymentRepoManager) UpdateResourcesKustomization() error {
384386
len(m.Config.Providers.PlatformServices)+
385387
len(m.crdFiles))
386388

387-
//len(m.Config.OpenMCPOperator.Manifests))
389+
// len(m.Config.OpenMCPOperator.Manifests))
388390

389391
for _, crdFile := range m.crdFiles {
390392
files = append(files, filepath.Join(CRDsDirectoryName, filepath.Base(crdFile)))

0 commit comments

Comments
 (0)