Skip to content

Commit

Permalink
Add PodPreset support (openshift#917)
Browse files Browse the repository at this point in the history
* Add support for PodPreset

* Regen code
  • Loading branch information
pmorie authored and Jeff Peeler committed Jun 9, 2017
1 parent 0d9b810 commit cbfa39b
Show file tree
Hide file tree
Showing 12 changed files with 716 additions and 137 deletions.
14 changes: 14 additions & 0 deletions contrib/examples/walkthrough/ups-binding-pp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: servicecatalog.k8s.io/v1alpha1
kind: Binding
metadata:
name: ups-binding
namespace: test-ns
spec:
instanceRef:
name: ups-instance
secretName: my-secret
alphaPodPresetTemplate:
name: my-pod-preset
selector:
matchLabels:
app: my-app
22 changes: 22 additions & 0 deletions pkg/apis/servicecatalog/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,28 @@ type BindingSpec struct {
//
// Immutable.
ExternalID string

// Currently, this field is ALPHA: it may change or disappear at any time
// and its data will not be migrated.
//
// AlphaPodPresetTemplate describes how a PodPreset should be created once
// the Binding has been made. If supplied, a PodPreset will be created
// using information in this field once the Binding has been made in the
// Broker. The PodPreset will use the EnvFrom feature to expose the keys
// from the Secret (specified by SecretName) that holds the Binding
// information into Pods.
//
// In the future, we will provide a higher degree of control over the PodPreset.
AlphaPodPresetTemplate *AlphaPodPresetTemplate
}

// AlphaPodPresetTemplate represents how a PodPreset should be created for a
// Binding.
type AlphaPodPresetTemplate struct {
// Name is the name of the PodPreset to create.
Name string
// Selector is the LabelSelector of the PodPreset to create.
Selector metav1.LabelSelector
}

// BindingStatus represents the current status of a Binding.
Expand Down
Loading

0 comments on commit cbfa39b

Please sign in to comment.