Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions apis/appcatalog/v1alpha1/appbinding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type AppBindingSpec struct {

// Secret is the name of the secret to create in the AppBinding's
// namespace that will hold the credentials associated with the AppBinding.
Secret *core.LocalObjectReference `json:"secret,omitempty"`
Secret *TypedLocalObjectReference `json:"secret,omitempty"`

// List of transformations that should be applied to the credentials
// associated with the ServiceBinding before they are inserted into the Secret.
Expand All @@ -90,7 +90,7 @@ type AppBindingSpec struct {

// TLSSecret is the name of the secret that will hold
// the client certificate and private key associated with the AppBinding.
TLSSecret *core.LocalObjectReference `json:"tlsSecret,omitempty"`
TLSSecret *TypedLocalObjectReference `json:"tlsSecret,omitempty"`
}

type AppType string
Expand Down Expand Up @@ -175,6 +175,20 @@ type ServiceReference struct {
Query string `json:"query,omitempty"`
}

// +structType=atomic
type TypedLocalObjectReference struct {
// APIGroup is the group for the resource being referenced.
// If APIGroup is not specified, the specified Kind must be in the core API group.
// For any other third-party types, APIGroup is required.
// +optional
APIGroup *string `json:"apiGroup"`
// Kind is the type of resource being referenced
// +kubebuilder:default="Secret"
Kind string `json:"kind"`
// Name is the name of resource being referenced
Name string `json:"name"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// AppBindingList is a list of Apps
Expand Down
Loading
Loading