Code Monkey home page Code Monkey logo

imperator's People

Contributors

tenzen-y avatar

Stargazers

 avatar

Watchers

 avatar  avatar

imperator's Issues

Support updating pod managed by impelator

Now, Impelator does not support updating Pods managed by imperator, pod-resource-injector reject to update Pod.

func (r *resourceInjector) replacePods(ctx context.Context, pod *corev1.Pod) error {
// fetch old Pod
oldPod := &corev1.Pod{}
if err := r.Client.Get(ctx, client.ObjectKey{Name: pod.Name, Namespace: pod.Namespace}, oldPod); errors.IsNotFound(err) {
return nil
}
return fmt.Errorf("it is forbidden to update the Pod")
// TODO: Implementing replace pod
//if len(oldPod.OwnerReferences) == 0 && os.Getenv("SKIP_OWNER_CHECK") != "true" {
// return fmt.Errorf("name: %s, namespace: %s; pods that are not managed by the parent resource can not be updated",
// oldPod.Name, oldPod.Namespace)
//}
//
//if !oldPod.GetDeletionTimestamp().IsZero() {
// return fmt.Errorf("name: %s, namespace: %s; the pod is replacing now", pod.Name, pod.Namespace)
//}
//
//if err := r.Client.Delete(ctx, oldPod, &client.DeleteOptions{}); err != nil {
// return err
//}
//
//return nil
}

Must set label for nodeAffinity to Node

Currently, machinenodepool controller sets labels or taints to use as nodeAffinity at imperator-reservation and guest Pod although taints can not use as nodeAffinity. So it must set labels to Node and change MachineNodePool API to make taints optional.

  • design
type NodePool struct {

	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Enum=ready;maintenance
	Mode NodePoolMode `json:"mode"`

	// +optional
- 	// default=label
- 	AssignmentType NodePoolAssignmentType `json:"assignmentType,omitempty"`
+       // default=false
+       Taint *bool `json:"taint,omitempty"`

	// +kubebuilder:validation:Required
	MachineType NodePoolMachineType `json:"machineType"`
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.