Skip to content

Commit d71d195

Browse files
perdasilvatimflannagan
authored andcommitted
Add node affinity and pod (anti)affinity to Subscription spec.config (openshift#250)
Signed-off-by: perdasilva <[email protected]> Upstream-repository: api Upstream-commit: f8da7254a5aabb477235d297f080af29f7fb0be4
1 parent 84e208a commit d71d195

File tree

9 files changed

+1427
-2
lines changed

9 files changed

+1427
-2
lines changed

manifests/0000_50_olm_00-subscriptions.crd.yaml

Lines changed: 457 additions & 0 deletions
Large diffs are not rendered by default.

staging/api/crds/operators.coreos.com_subscriptions.yaml

Lines changed: 457 additions & 0 deletions
Large diffs are not rendered by default.

staging/api/crds/zz_defs.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/api/pkg/operators/v1alpha1/subscription_types.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ type SubscriptionConfig struct {
8484
// List of VolumeMounts to set in the container.
8585
// +optional
8686
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
87+
88+
// Describes node affinity scheduling rules for the pod.
89+
// +optional
90+
NodeAffinity *corev1.NodeAffinity `json:"nodeAffinity,omitempty" protobuf:"bytes,1,opt,name=nodeAffinity"`
91+
92+
// Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
93+
// +optional
94+
PodAffinity *corev1.PodAffinity `json:"podAffinity,omitempty" protobuf:"bytes,2,opt,name=podAffinity"`
95+
96+
// Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
97+
// +optional
98+
PodAntiAffinity *corev1.PodAntiAffinity `json:"podAntiAffinity,omitempty" protobuf:"bytes,3,opt,name=podAntiAffinity"`
8799
}
88100

89101
// SubscriptionConditionType indicates an explicit state condition about a Subscription in "abnormal-true"

staging/api/pkg/operators/v1alpha1/zz_generated.deepcopy.go

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/operator-framework/api/crds/operators.coreos.com_subscriptions.yaml

Lines changed: 457 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/operator-framework/api/crds/zz_defs.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/operator-framework/api/pkg/operators/v1alpha1/subscription_types.go

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/operator-framework/api/pkg/operators/v1alpha1/zz_generated.deepcopy.go

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)