Skip to content

Commit

Permalink
Removed obsolete operator version fields (#1027)
Browse files Browse the repository at this point in the history
`delete` and `objects` fields are a remnant of the old API and were removed.
  • Loading branch information
Aleksey Dukhovniy authored Nov 5, 2019
1 parent cc22578 commit 086d170
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
14 changes: 2 additions & 12 deletions pkg/apis/kudo/v1beta1/operatorversion_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package v1beta1
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)

// OperatorVersionSpec defines the desired state of OperatorVersion.
Expand Down Expand Up @@ -90,11 +89,6 @@ type Parameter struct {
// Trigger identifies the plan that gets executed when this parameter changes in the Instance object.
// Default is `update` if a plan with that name exists, otherwise it's `deploy`
Trigger string `json:"trigger,omitempty"`

// TODO: Add generated parameters (e.g. passwords).
// These values should be saved off in a secret instead of updating the spec
// with values that viewing the instance does not return credentials.

}

// Phase specifies a list of steps that contain Kubernetes objects.
Expand All @@ -108,12 +102,8 @@ type Phase struct {

// Step defines a specific set of operations that occur.
type Step struct {
Name string `json:"name" validate:"required"` // makes field mandatory and checks if set and non empty
Tasks []string `json:"tasks" validate:"required,gt=0,dive"` // makes field mandatory and checks if non empty
Delete bool `json:"delete,omitempty"` // no checks needed

// Objects will be serialized for each instance as the params and defaults are provided.
Objects []runtime.Object `json:"-"` // no checks needed
Name string `json:"name" validate:"required"` // makes field mandatory and checks if set and non empty
Tasks []string `json:"tasks" validate:"required,gt=0,dive"` // makes field mandatory and checks if non empty
}

// Task is a global, polymorphic implementation of all publicly available tasks
Expand Down
14 changes: 5 additions & 9 deletions pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/client/clientset/versioned/clientset.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 086d170

Please sign in to comment.