Skip to content

Commit

Permalink
#1 Move functionality back to blueprint operator
Browse files Browse the repository at this point in the history
  • Loading branch information
ppxl committed Jan 16, 2025
1 parent d976dad commit c2c4c67
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 102 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ module github.com/cloudogu/blueprint-lib
go 1.23.4

require (
github.com/Masterminds/semver/v3 v3.3.0
github.com/cloudogu/ces-commons-lib v0.2.0
github.com/cloudogu/cesapp-lib v0.18.0
github.com/cloudogu/k8s-blueprint-operator/v2 v2.2.2
github.com/cloudogu/k8s-registry-lib v0.5.1
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.10.0
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
k8s.io/apimachinery v0.31.2
)

require (
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/cloudogu/k8s-registry-lib v0.5.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/eapache/go-resiliency v1.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
Expand All @@ -21,9 +23,7 @@ require (
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/sys v0.29.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apimachinery v0.31.2 // indirect
)
20 changes: 1 addition & 19 deletions v2/component.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package v2

import (
"errors"
"fmt"

"github.com/Masterminds/semver/v3"
"github.com/cloudogu/k8s-blueprint-operator/v2/pkg/domain/ecosystem"
)

// Component represents a CES component (e.g. operators), its version, and the installation state in which it is supposed to be
Expand All @@ -19,19 +15,5 @@ type Component struct {
// TargetState defines a state of installation of this package. Optional field, but defaults to "TargetStatePresent"
TargetState TargetState
// DeployConfig defines generic properties for the component. This field is optional.
DeployConfig ecosystem.DeployConfig
}

// Validate checks if the component is semantically correct.
func (component *Component) Validate() error {
nameError := component.Name.Validate()

var versionErr error
if component.TargetState == TargetStatePresent {
if component.Version == nil {
versionErr = fmt.Errorf("version of component %q must not be empty", component.Name)
}
}

return errors.Join(versionErr, nameError)
DeployConfig map[string]interface{}
}
79 changes: 0 additions & 79 deletions v2/component_test.go

This file was deleted.

0 comments on commit c2c4c67

Please sign in to comment.