@@ -29,12 +29,52 @@ const (
29
29
30
30
// SubscriptionSpec defines an Application that can be installed
31
31
type SubscriptionSpec struct {
32
- CatalogSource string `json:"source"`
33
- CatalogSourceNamespace string `json:"sourceNamespace"`
34
- Package string `json:"name"`
35
- Channel string `json:"channel,omitempty"`
36
- StartingCSV string `json:"startingCSV,omitempty"`
37
- InstallPlanApproval Approval `json:"installPlanApproval,omitempty"`
32
+ CatalogSource string `json:"source"`
33
+ CatalogSourceNamespace string `json:"sourceNamespace"`
34
+ Package string `json:"name"`
35
+ Channel string `json:"channel,omitempty"`
36
+ StartingCSV string `json:"startingCSV,omitempty"`
37
+ InstallPlanApproval Approval `json:"installPlanApproval,omitempty"`
38
+ Config SubscriptionConfig `json:"config,omitempty"`
39
+ }
40
+
41
+ // SubscriptionConfig contains configuration specified for a subscription.
42
+ type SubscriptionConfig struct {
43
+ // Label selector for pods. Existing ReplicaSets whose pods are
44
+ // selected by this will be the ones affected by this deployment.
45
+ // It must match the pod template's labels.
46
+ Selector * metav1.LabelSelector `json:"selector,omitempty"`
47
+
48
+ // NodeSelector is a selector which must be true for the pod to fit on a node.
49
+ // Selector which must match a node's labels for the pod to be scheduled on that node.
50
+ // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
51
+ // +optional
52
+ NodeSelector map [string ]string `json:"nodeSelector,omitempty"`
53
+
54
+ // If specified, the pod's tolerations.
55
+ // +optional
56
+ Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
57
+
58
+ // Compute Resources required by this container.
59
+ // Cannot be updated.
60
+ // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
61
+ // +optional
62
+ Resources corev1.ResourceRequirements `json:"resources,omitempty"`
63
+
64
+ // List of sources to populate environment variables in the container.
65
+ // The keys defined within a source must be a C_IDENTIFIER. All invalid keys
66
+ // will be reported as an event when the container is starting. When a key exists in multiple
67
+ // sources, the value associated with the last source will take precedence.
68
+ // Values defined by an Env with a duplicate key will take precedence.
69
+ // Cannot be updated.
70
+ // +optional
71
+ EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
72
+ // List of environment variables to set in the container.
73
+ // Cannot be updated.
74
+ // +optional
75
+ // +patchMergeKey=name
76
+ // +patchStrategy=merge
77
+ Env []corev1.EnvVar `json:"env,omitempty"`
38
78
}
39
79
40
80
// SubscriptionConditionType indicates an explicit state condition about a Subscription in "abnormal-true"
@@ -81,7 +121,7 @@ const (
81
121
InstallPlanNotYetReconciled = "InstallPlanNotYetReconciled"
82
122
83
123
// InstallPlanFailed is a reason string for Subscriptions that transitioned due to a referenced InstallPlan failing without setting an explicit failure condition.
84
- InstallPlanFailed = "InstallPlanFailed"
124
+ InstallPlanFailed = "InstallPlanFailed"
85
125
)
86
126
87
127
// SubscriptionCondition represents the latest available observations of a Subscription's state.
0 commit comments