Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
Store in-progress and external properties in instance and binding sta…
Browse files Browse the repository at this point in the history
…tus.
  • Loading branch information
staebler committed Sep 25, 2017
1 parent 83d95ca commit be82b70
Show file tree
Hide file tree
Showing 20 changed files with 4,026 additions and 1,160 deletions.
18 changes: 18 additions & 0 deletions pkg/apis/servicecatalog/testing/fuzzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,24 @@ func FuzzerFor(t *testing.T, version schema.GroupVersion, src rand.Source) *fuzz
}
bs.Parameters = parameters
},
func(bs *servicecatalog.ServiceInstancePropertiesState, c fuzz.Continue) {
c.FuzzNoCustom(bs)
parameters, err := createParameter(c)
if err != nil {
t.Errorf("Failed to create parameter object: %v", err)
return
}
bs.Parameters = parameters
},
func(bs *servicecatalog.ServiceInstanceCredentialPropertiesState, c fuzz.Continue) {
c.FuzzNoCustom(bs)
parameters, err := createParameter(c)
if err != nil {
t.Errorf("Failed to create parameter object: %v", err)
return
}
bs.Parameters = parameters
},
func(sc *servicecatalog.ServiceClass, c fuzz.Continue) {
c.FuzzNoCustom(sc)
metadata, err := createServiceMetadata(c)
Expand Down
50 changes: 50 additions & 0 deletions pkg/apis/servicecatalog/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,14 @@ type ServiceInstanceStatus struct {

// OperationStartTime is the time at which the current operation began.
OperationStartTime *metav1.Time

// InProgressProperties is the properties state for which there is a
// provision or update action in progress.
InProgressProperties *ServiceInstancePropertiesState

// ExternalProperties is the properites state which the broker knows
// about.
ExternalProperties *ServiceInstancePropertiesState
}

// ServiceInstanceCondition contains condition information about an Instance.
Expand Down Expand Up @@ -510,6 +518,25 @@ const (
ServiceInstanceOperationDeprovision ServiceInstanceOperation = "Deprovision"
)

// ServiceInstancePropertiesState is the state of a ServiceInstance that
// the ServiceBroker knows about.
type ServiceInstancePropertiesState struct {
// PlanName is the name of the plan that the broker knows this
// ServiceInstance to be on.
PlanName string

// Parameters is a blob of the parameters and their values that the broker
// knows about for this ServiceInstance. If a parameter was sourced from
// a secret, its value will be "<redacted>" in this blob.
Parameters *runtime.RawExtension

// ParametersChecksum is the checksum of the parameters that were sent.
ParametersChecksum string

// UserInfo is information about the user that made the request.
UserInfo *UserInfo
}

// ServiceInstanceCredentialList is a list of ServiceInstanceCredentials.
type ServiceInstanceCredentialList struct {
metav1.TypeMeta
Expand Down Expand Up @@ -593,6 +620,14 @@ type ServiceInstanceCredentialStatus struct {

// OperationStartTime is the time at which the current operation began.
OperationStartTime *metav1.Time

// InProgressProperties is the properties state for which there is a bind
// operation in progress.
InProgressProperties *ServiceInstanceCredentialPropertiesState

// ExternalProperties is the properties state that the broker knows
// about for this ServiceInstanceCredential.
ExternalProperties *ServiceInstanceCredentialPropertiesState
}

// ServiceInstanceCredentialCondition condition information for a ServiceInstanceCredential.
Expand Down Expand Up @@ -646,6 +681,21 @@ const (
FinalizerServiceCatalog string = "kubernetes-incubator/service-catalog"
)

// ServiceInstanceCredentialPropertiesState is the state of a
// ServiceInstanceCredential that the ServiceBroker knows about.
type ServiceInstanceCredentialPropertiesState struct {
// Parameters is a blob of the parameters and their values that the broker
// knows about for this ServiceInstanceCredential. If a parameter was
// sourced from a secret, its value will be "<redacted>" in this blob.
Parameters *runtime.RawExtension

// ParametersChecksum is the checksum of the parameters that were sent.
ParametersChecksum string

// UserInfo is information about the user that made the request.
UserInfo *UserInfo
}

// ParametersFromSource represents the source of a set of Parameters
type ParametersFromSource struct {
// The Secret key to select from.
Expand Down
Loading

0 comments on commit be82b70

Please sign in to comment.