Skip to content

Commit

Permalink
Addtional CAEP Feedback
Browse files Browse the repository at this point in the history
- Adds Env to ContainerSpec to allow specifying env vars directly.
- Adds NodeSelector, Tolerations, Affinity to DeploymentSpec
  • Loading branch information
Warren Fernandes committed Dec 18, 2020
1 parent 13571e0 commit d963724
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions docs/proposals/20201020-management-cluster-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,17 @@ management cluster based on a declarative API.
### Goals

- Define an API that enables declarative management of the lifecycle of
Cluster API providers
Cluster API and all of its providers.
- Support air-gapped environments through sufficient documentation initially.
- Identify and document differences between clusterctl CLI and the operator in
managing the lifecycle of providers, if any.
- Define how the clusterctl CLI should be changed in order to interact with
the management cluster operator in a transparent and effective way.
- To support the ability to upgrade from an earlier version of Cluster API to
one managed by the operator. As a minimum, we will support upgrading from a
version of v1alpha3 cluster (i.e. v0.3.[TBD]).
- To support the ability to upgrade from a v1alpha3 based version (v0.3.[TBD])
of Cluster API to one managed by the operator.

### Non-Goals/Future Work

- Manage cluster templates using the operator.
- Implement an operator driven version of `clusterctl move`.
- Manage cert-manager using the operator.
- Support multiple installations of the same provider within a management
Expand Down Expand Up @@ -271,14 +269,28 @@ type ManagerSpec struct {
// FeatureGates define provider specific feature flags that will be passed
// in as container args to the provider's controller manager.
// Controller Manager flag is --feature-gates.
FeatureGates map[string]bool `json:"featureGates, omitempty"`
FeatureGates map[string]bool `json:"featureGates,omitempty"`
}

// DeploymentSpec defines the properties that can be enabled on the Deployment for the provider.
type DeploymentSpec struct {
// Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
// +optional
Replicas int `json:"replicas,omitempty"`
Replicas *int `json:"replicas,omitempty"`

// NodeSelector is a selector which must be true for the pod to fit on a node.
// Selector which must match a node's labels for the pod to be scheduled on that node.
// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
// +optional
NodeSelector map[string]string `json:"nodeSelector,omitempty"`

// If specified, the pod's tolerations.
// +optional
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

// If specified, the pod's scheduling constraints
// +optional
Affinity *corev1.Affinity `json:"affinity,omitempty"`

// List of containers specified in the Deployment
// +optional
Expand All @@ -305,6 +317,10 @@ type ContainerSpec struct {
// +optional
Args map[string]string `json:"args,omitempty"`

// List of environment variables to set in the container.
// +optional
Env []corev1.EnvVar `json:"env,omitempty"
// Compute resources required by this container.
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
Expand Down

0 comments on commit d963724

Please sign in to comment.